Skip to content

Commit

Permalink
[py wrap] c'tor overload is bad
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Apr 11, 2021
1 parent fe87b19 commit bc64e6f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyRF24/pyRF24.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,10 @@ bp::enum_< bcm2835SPIChipSelect>("bcm2835SPIChipSelect")

// ******************** RF24 class **************************
//
bp::class_< RF24 >("RF24", bp::init< bp::optional< uint16_t, uint16_t > >((bp::arg("_cepin"), bp::arg("_cspin"))))
bp::class_< RF24 >("RF24", bp::init< uint16_t, uint16_t >((bp::arg("_cepin"), bp::arg("_cspin"))))
#if defined (RF24_LINUX) && !defined (MRAA)
.def(bp::init< bp::optional< uint16_t, uint16_t, uint32_t > >((bp::arg("_cepin"), bp::arg("_cspin"), bp::arg("spispeed"))))
.def(bp::init< uint16_t, uint16_t, bp::optional< uint32_t > >((bp::arg("_cepin"), bp::arg("_cspin"), bp::arg("spispeed"))))
.def(bp::init< bp::optional< uint32_t > >((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
Expand Down

0 comments on commit bc64e6f

Please sign in to comment.