ElieNamias / xbee-arduino

Automatically exported from code.google.com/p/xbee-arduino
GNU General Public License v3.0
0 stars 0 forks source link

Xbee.cpp - BYTE #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.try to compile the series1_Rx example

What is the expected output? What do you see instead?
It wont compile, and the exception says that the BYTE variable was not declared.

What version of the product are you using? On what operating system?
Arduino 1.0
Board: arduino UNO

Please provide any additional information below.
I just wanna know what is this BYTE variable. 

Original issue reported on code.google.com by gzio...@gmail.com on 9 Dec 2011 at 11:28

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Correcting my own advice.  In XBee.h, the final routine should use 
serial.write.  Sorry.

Here is the text:

void XBee::sendByte(uint8_t b, bool escape) {

    if (escape && (b == START_BYTE || b == ESCAPE || b == XON || b == XOFF)) {
//      std::cout << "escaping byte [" << toHexString(b) << "] " << std::endl;
        Serial.write(ESCAPE);
        Serial.write(b ^ 0x20);
    } else {
        Serial.write(b);
    }

}

Original comment by Cayenne...@gmail.com on 17 Dec 2011 at 3:20

GoogleCodeExporter commented 9 years ago

Original comment by andrew.rapp@gmail.com on 2 Feb 2014 at 6:43