File tree 1 file changed +9
-6
lines changed
arduino/sketches/XBeeUploader
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,7 @@ void loop() {
232
232
233
233
uint8_t *packet = NULL ;
234
234
uint8_t length;
235
+ bool progPacket = false ;
235
236
236
237
if (xbee.getResponse ().getApiId () == ZB_RX_RESPONSE) {
237
238
// series 2
@@ -256,6 +257,8 @@ void loop() {
256
257
257
258
if (packet != NULL ) {
258
259
if (length > 4 && remoteUploader.isProgrammingPacket (packet, length)) {
260
+ progPacket = true ;
261
+
259
262
// send the packet array, length to be processed
260
263
int response = remoteUploader.process (packet);
261
264
@@ -272,12 +275,12 @@ void loop() {
272
275
remoteUploader.getProgrammerSerial ()->begin (XBEE_BAUD_RATE);
273
276
}
274
277
}
275
- } else {
276
- // not a programming packet. forward along
277
- if (PROXY_SERIAL) {
278
- forwardPacket ();
279
- }
280
- }
278
+ }
279
+ }
280
+
281
+ if (!progPacket && PROXY_SERIAL) {
282
+ // not a programming packet. forward along
283
+ forwardPacket ();
281
284
}
282
285
} else if (xbee.getResponse ().isError ()) {
283
286
#if (USBDEBUG || NSSDEBUG)
You can’t perform that action at this time.
0 commit comments