Update RFM69_OTA.cpp

Fixes #139
This commit is contained in:
Felix Rusu 2020-05-01 12:39:59 -04:00
parent ca3140ca32
commit ab87d090a0
1 changed files with 2 additions and 2 deletions

View File

@ -488,12 +488,12 @@ uint8_t sendHEXPacket(RFM69& radio, uint8_t targetID, uint8_t* sendBuf, uint8_t
long now = millis(); long now = millis();
while(1) { while(1) {
if (DEBUG) { Serial.print(F("RFTX > ")); PrintHex83(sendBuf, hexDataLen); } if (DEBUG) { Serial.print(F("RFTX > ")); PrintHex83(sendBuf, hexDataLen); Serial.println(); }
if (radio.sendWithRetry(targetID, sendBuf, hexDataLen, 2, ACKTIMEOUT)) if (radio.sendWithRetry(targetID, sendBuf, hexDataLen, 2, ACKTIMEOUT))
{ {
uint8_t ackLen = radio.DATALEN; uint8_t ackLen = radio.DATALEN;
if (DEBUG) { Serial.print(F("RFACK > ")); Serial.print(ackLen); Serial.print(F(" > ")); PrintHex83((uint8_t*)radio.DATA, ackLen); } if (DEBUG) { Serial.print(F("RFACK > ")); Serial.print(ackLen); Serial.print(F(" > ")); PrintHex83((uint8_t*)radio.DATA, ackLen); Serial.println(); }
if (ackLen >= 8 && radio.DATA[0]=='F' && radio.DATA[1]=='L' && radio.DATA[2]=='X' && if (ackLen >= 8 && radio.DATA[0]=='F' && radio.DATA[1]=='L' && radio.DATA[2]=='X' &&
radio.DATA[3]==':' && radio.DATA[ackLen-3]==':' && radio.DATA[3]==':' && radio.DATA[ackLen-3]==':' &&