MCPcopy Create free account
hub / github.com/OpenEPaperLink/OpenEPaperLink / sendPing

Function sendPing

ESP32_AP-Flasher/src/serialap.cpp:345–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343 return false;
344}
345bool 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}
364bool sendGetInfo() {
365 if (apInfo.state == AP_STATE_NORADIO) return true;
366 if (!txStart()) return false;

Callers 2

bringAPOnlineFunction · 0.70
APTaskFunction · 0.70

Calls 6

txStartFunction · 0.85
waitCmdReplyFunction · 0.85
txEndFunction · 0.85
printfMethod · 0.80
printlnMethod · 0.80
printMethod · 0.45

Tested by

no test coverage detected