Skip to content

Commit

Permalink
Ensure pyRF24 constructors match C++ conditionals.
Browse files Browse the repository at this point in the history
  • Loading branch information
wamonite committed Jan 7, 2018
1 parent 4dcf86c commit ae4c03b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyRF24/pyRF24.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,10 @@ BOOST_PYTHON_MODULE(RF24){

// ******************** RF24 class **************************
//
bp::class_< RF24 >( "RF24", bp::init< uint8_t, uint8_t >(( bp::arg("_cepin"), bp::arg("_cspin") )) )
.def( bp::init< uint8_t, uint8_t, uint32_t >(( bp::arg("_cepin"), bp::arg("_cspin"), bp::arg("spispeed") )) )
bp::class_< RF24 >( "RF24", bp::init< uint8_t, uint8_t >(( bp::arg("_cepin"), bp::arg("_cspin") )) )
#if defined (RF24_LINUX) && !defined (MRAA)
.def( bp::init< uint8_t, uint8_t, uint32_t >(( bp::arg("_cepin"), bp::arg("_cspin"), bp::arg("spispeed") )) )
#endif
.def("available", (bool ( ::RF24::* )( ) )( &::RF24::available ) )
.def("available_pipe", &available_wrap ) // needed to rename this method as python does not allow such overloading
.def("begin", &RF24::begin)
Expand Down

0 comments on commit ae4c03b

Please sign in to comment.