@@ -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 ];
@@ -340,8 +325,6 @@ BOOST_PYTHON_MODULE(RF24)
340325 .def (" openReadingPipe" , (void (::RF24::*)(::uint8_t , ::uint64_t ))(&::RF24::openReadingPipe), (bp::arg (" number" ), bp::arg (" address" )))
341326 .def (" openWritingPipe" , &openWritingPipe_wrap, (bp::arg (" address" )))
342327 .def (" openWritingPipe" , (void (::RF24::*)(::uint64_t ))(&::RF24::openWritingPipe), (bp::arg (" address" )))
343- .add_property (" txAddress" , &get_tx_address, &set_tx_address)
344- .add_property (" tx_address" , &get_tx_address, &set_tx_address)
345328 .def (" powerDown" , &RF24::powerDown)
346329 .def (" powerUp" , &RF24::powerUp)
347330 .def (" printDetails" , &RF24::printDetails)
@@ -365,7 +348,7 @@ BOOST_PYTHON_MODULE(RF24)
365348 .def (" startListening" , &RF24::startListening)
366349 .def (" startWrite" , &startWrite_wrap, (bp::arg (" buf" ), bp::arg (" len" ), bp::arg (" multicast" )))
367350 .def (" stopListening" , (void (::RF24::*)(void ))(&RF24::stopListening))
368- .def (" stopListening" , &stopListening_wrap, (bp::arg (" tx_address " )))
351+ .def (" stopListening" , &stopListening_wrap, (bp::arg (" txAddress " )))
369352 .def (" testCarrier" , &RF24::testCarrier)
370353 .def (" testRPD" , &RF24::testRPD)
371354 .def (" toggleAllPipes" , &RF24::toggleAllPipes)
0 commit comments