XBee API mode library
Diff: XBee.cpp
- Revision:
- 10:3da24a020e67
- Parent:
- 8:776b8dc51932
- Child:
- 11:3bf9f8790340
--- a/XBee.cpp Tue Jan 29 14:18:18 2013 +0000 +++ b/XBee.cpp Wed Mar 13 19:09:55 2013 +0000 @@ -41,7 +41,7 @@ XBee::XBee(Serial& ser, Serial& mon, int apiMode, bool debug) : Serial(ser), mon(mon), leds(LED1, LED2, LED3, LED4), apiMode(apiMode), - state(UNKNOWN), in(0), out(0), received(-1), free(BUFSIZE), frame_id(1), debug(debug) + state(UNKNOWN), in(0), out(0), received(-1), free(BUFSIZE), frame_id(1), sendConfirmation(0), debug(debug) { memset(buf, 0, BUFSIZE); attach(this, &XBee::rxInterruptHandler, RxIrq); @@ -49,7 +49,7 @@ XBee::XBee(PinName tx, PinName rx, Serial& mon, int apiMode, bool debug) : Serial(tx, rx), mon(mon), leds(LED1, LED2, LED3, LED4), apiMode(apiMode), - state(UNKNOWN), in(0), out(0), received(-1), free(BUFSIZE), frame_id(1), debug(debug) + state(UNKNOWN), in(0), out(0), received(-1), free(BUFSIZE), frame_id(1), sendConfirmation(0), debug(debug) { memset(buf, 0, BUFSIZE); attach(this, &XBee::rxInterruptHandler, RxIrq); @@ -57,7 +57,7 @@ #else XBee::XBee(Serial& ser, int apiMode, bool debug) : Serial(ser), mon(USBTX, USBRX), leds(LED1, LED2, LED3, LED4), apiMode(apiMode), - state(UNKNOWN), in(0), out(0), received(-1), free(BUFSIZE), frame_id(1), debug(debug) + state(UNKNOWN), in(0), out(0), received(-1), free(BUFSIZE), frame_id(1), sendConfirmation(0), debug(debug) { memset(buf, 0, BUFSIZE); start(); @@ -66,7 +66,7 @@ XBee::XBee(PinName tx, PinName rx, int apiMode, bool debug) : Serial(tx, rx), mon(USBTX, USBRX), leds(LED1, LED2, LED3, LED4), apiMode(apiMode), - state(UNKNOWN), in(0), out(0), received(-1), free(BUFSIZE), frame_id(1), debug(debug) + state(UNKNOWN), in(0), out(0), received(-1), free(BUFSIZE), frame_id(1), sendConfirmation(0), debug(debug) { memset(buf, 0, BUFSIZE); start(); @@ -75,7 +75,7 @@ XBee::XBee(Serial& ser, Serial& mon, int apiMode, bool debug) : Serial(ser), mon(mon), leds(LED1, LED2, LED3, LED4), apiMode(apiMode), - state(UNKNOWN), in(0), out(0), received(-1), free(BUFSIZE), frame_id(1), debug(debug) + state(UNKNOWN), in(0), out(0), received(-1), free(BUFSIZE), frame_id(1), sendConfirmation(0), debug(debug) { memset(buf, 0, BUFSIZE); start(); @@ -84,7 +84,7 @@ XBee::XBee(PinName tx, PinName rx, Serial& mon, int apiMode, bool debug) : Serial(tx, rx), mon(mon), leds(LED1, LED2, LED3, LED4), apiMode(apiMode), - state(UNKNOWN), in(0), out(0), received(-1), free(BUFSIZE), frame_id(1), debug(debug) + state(UNKNOWN), in(0), out(0), received(-1), free(BUFSIZE), frame_id(1), sendConfirmation(0), debug(debug) { memset(buf, 0, BUFSIZE); start(); @@ -206,7 +206,7 @@ bool succeeded = false; char id = getFrameID(); - sendCommand(command, param, param_length); + sendCommand(command, param, param_length, 0); int index = seekFor(XBee::ATCommandResponse, id, 0.1); if (index != -1) { char status;