kopia lustrzana https://github.com/pjalocha/esp32-ogn-tracker
Double check for long-push of the power button
rodzic
c56159119c
commit
8a9ceff73c
|
@ -376,8 +376,9 @@ void vTaskCTRL(void* pvParameters)
|
|||
vTaskDelay(1); //
|
||||
|
||||
#ifdef WITH_AXP
|
||||
bool PowerOffRequest = AXP.readLongPressIRQ() /* || AXP.readShortPressIRQ() */ ;
|
||||
if(PowerOffRequest)
|
||||
bool PowerOffRequest1 = AXP.readLongPressIRQ(); // read long-press status
|
||||
bool PowerOffRequest2 = AXP.readLongPressIRQ(); // read again to make sure
|
||||
if(PowerOffRequest1 && PowerOffRequest2)
|
||||
{ PowerMode=0;
|
||||
#ifdef WITH_SPIFFS
|
||||
FlashLog_SaveReq=1;
|
||||
|
|
Ładowanie…
Reference in New Issue