andrewrapp / xbee-arduino

Arduino library for communicating with XBee radios in API mode
GNU General Public License v2.0
334 stars 162 forks source link

error: invalid conversion from 'uint8_t* {aka unsigned char*}' to 'char*' #33

Closed allangalera closed 7 years ago

allangalera commented 7 years ago

Its giving this error when trying to complile.

I think its a recent change.

I'm compiling using platformiIO.

Full error: lib/xbee-arduino-master/XBee.cpp: In member function 'char* NodeIdentifierResponse::getNodeIdentifierString()': lib/xbee-arduino-master/XBee.cpp:787:27: error: invalid conversion from 'uint8t* {aka unsigned char}' to 'char_' [-fpermissive] return getFrameData() + 21;

^ *\ [.pioenvs/megaatmega2560/lib/xbee-arduino-master/XBee.o] Error 1

sodcorec commented 7 years ago

Has anyone found the anwser to this problem. I am getting the same thing on Android IDE linux. Please help or investigate. Thank you, Donald

sodcorec commented 7 years ago

In the cpp file and the header file I changed the return value of char to uint8_t. There does not seem to be anything to be calling that function at present from the header or .cpp file, so it will work in the short them. I am not sure what they are all trying to do, so if you call the function getNodeIdentifierString() it may not work with what I did, because I am returning a pointer to uint8_t, which I am not sure if that is what they wanted or if I should have cast it into a char. At any rate hopefully this will work for short patch. Thanks, Donald

sodcorec commented 7 years ago

Sorry Short Term

allangalera commented 7 years ago

As a short term solution I downloaded the code from a previous commit. But I think your solution is better.

andrewrapp commented 7 years ago

change reverted

sodcorec commented 7 years ago

I did not write this to the actual repository on the GitHub, I just meant I changed the file in my own computer. What does change reverted mean?