@@ -39,21 +39,6 @@ int get_bytes_or_bytearray_ln(bp::object buf)
3939 return 0 ;
4040}
4141
42- void set_tx_address (RF24& ref, bp::object buf)
43- {
44- // set the TX address of the RX node for use on the TX pipe (pipe 0)
45- memcpy (ref.txAddress , get_bytes_or_bytearray_str (buf), get_bytes_or_bytearray_ln (buf));
46- }
47-
48- bp::object get_tx_address (RF24& ref)
49- {
50- char * buf = new char [6 ];
51- memcpy (buf, ref.txAddress , 5 );
52- bp::object py_ba (bp::handle<>(PyByteArray_FromStringAndSize (buf, 5 )));
53- delete[] buf;
54- return py_ba;
55- }
56-
5742bp::object read_wrap (RF24& ref, int maxlen)
5843{
5944 char * buf = new char [maxlen + 1 ];
@@ -348,8 +333,6 @@ BOOST_PYTHON_MODULE(RF24)
348333 .def (" openReadingPipe" , (void (::RF24::*)(::uint8_t , ::uint64_t ))(&::RF24::openReadingPipe), (bp::arg (" number" ), bp::arg (" address" )))
349334 .def (" openWritingPipe" , &openWritingPipe_wrap, (bp::arg (" address" )))
350335 .def (" openWritingPipe" , (void (::RF24::*)(::uint64_t ))(&::RF24::openWritingPipe), (bp::arg (" address" )))
351- .add_property (" txAddress" , &get_tx_address, &set_tx_address)
352- .add_property (" tx_address" , &get_tx_address, &set_tx_address)
353336 .def (" powerDown" , &RF24::powerDown)
354337 .def (" powerUp" , &RF24::powerUp)
355338 .def (" printDetails" , &RF24::printDetails)
@@ -374,7 +357,7 @@ BOOST_PYTHON_MODULE(RF24)
374357 .def (" startListening" , &RF24::startListening)
375358 .def (" startWrite" , &startWrite_wrap, (bp::arg (" buf" ), bp::arg (" len" ), bp::arg (" multicast" )))
376359 .def (" stopListening" , (void (::RF24::*)(void ))(&RF24::stopListening))
377- .def (" stopListening" , &stopListening_wrap, (bp::arg (" tx_address " )))
360+ .def (" stopListening" , &stopListening_wrap, (bp::arg (" txAddress " )))
378361 .def (" testCarrier" , &RF24::testCarrier)
379362 .def (" testRPD" , &RF24::testRPD)
380363 .def (" toggleAllPipes" , &RF24::toggleAllPipes)
0 commit comments