| 343 | return false; |
| 344 | } |
| 345 | bool sendPing() { |
| 346 | if (apInfo.state == AP_STATE_NORADIO) return true; |
| 347 | if (apInfo.state == AP_STATE_FLASHING) return false; |
| 348 | Serial.print("ping"); |
| 349 | int t = millis(); |
| 350 | if (!txStart()) return false; |
| 351 | for (uint8_t attempt = 0; attempt < 3; attempt++) { |
| 352 | cmdReplyValue = CMD_REPLY_WAIT; |
| 353 | AP_SERIAL_PORT.print("RDY?"); |
| 354 | if (waitCmdReply()) { |
| 355 | txEnd(); |
| 356 | Serial.printf(" ok, %dms\r\n", millis() - t); |
| 357 | return true; |
| 358 | } |
| 359 | } |
| 360 | txEnd(); |
| 361 | Serial.println(" failed"); |
| 362 | return false; |
| 363 | } |
| 364 | bool sendGetInfo() { |
| 365 | if (apInfo.state == AP_STATE_NORADIO) return true; |
| 366 | if (!txStart()) return false; |