=================================================================================================================== CheckForSerialHEX() - returns TRUE if a HEX file transmission was detected and it was actually transmitted successfully this is called at the OTA programmer side ===================================================================================================================
| 286 | // this is called at the OTA programmer side |
| 287 | //=================================================================================================================== |
| 288 | uint8_t CheckForSerialHEX(uint8_t* input, uint8_t inputLen, RFM69& radio, uint16_t targetID, uint16_t TIMEOUT, uint16_t ACKTIMEOUT, uint8_t DEBUG) |
| 289 | { |
| 290 | if (inputLen == 4 && input[0]=='F' && input[1]=='L' && input[2]=='X' && input[3]=='?') { |
| 291 | if (HandleSerialHandshake(radio, targetID, false, TIMEOUT, ACKTIMEOUT, DEBUG)) |
| 292 | { |
| 293 | if (radio.DATALEN >= 7 && radio.DATA[4] == 'N') |
| 294 | { |
| 295 | Serial.println((char*)radio.DATA); //signal serial handshake fail/error and return |
| 296 | return false; |
| 297 | } |
| 298 | |
| 299 | Serial.println(F("\nFLX?OK")); //signal serial handshake back to host script |
| 300 | #ifdef SHIFTCHANNEL |
| 301 | if (HandleSerialHEXDataWrapper(radio, targetID, TIMEOUT, ACKTIMEOUT, DEBUG)) |
| 302 | #else |
| 303 | if (HandleSerialHEXData(radio, targetID, TIMEOUT, ACKTIMEOUT, DEBUG)) |
| 304 | #endif |
| 305 | { |
| 306 | Serial.println(F("FLX?OK")); //signal EOF serial handshake back to host script |
| 307 | if (DEBUG) Serial.println(F("FLASH IMG TRANSMISSION SUCCESS")); |
| 308 | return true; |
| 309 | } |
| 310 | if (DEBUG) Serial.println(F("FLASH IMG TRANSMISSION FAIL")); |
| 311 | return false; |
| 312 | } |
| 313 | else Serial.println(F("FLX?NOK")); |
| 314 | } |
| 315 | return false; |
| 316 | } |
| 317 | |
| 318 | |
| 319 | //=================================================================================================================== |
nothing calls this directly
no test coverage detected