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); //
|
vTaskDelay(1); //
|
||||||
|
|
||||||
#ifdef WITH_AXP
|
#ifdef WITH_AXP
|
||||||
bool PowerOffRequest = AXP.readLongPressIRQ() /* || AXP.readShortPressIRQ() */ ;
|
bool PowerOffRequest1 = AXP.readLongPressIRQ(); // read long-press status
|
||||||
if(PowerOffRequest)
|
bool PowerOffRequest2 = AXP.readLongPressIRQ(); // read again to make sure
|
||||||
|
if(PowerOffRequest1 && PowerOffRequest2)
|
||||||
{ PowerMode=0;
|
{ PowerMode=0;
|
||||||
#ifdef WITH_SPIFFS
|
#ifdef WITH_SPIFFS
|
||||||
FlashLog_SaveReq=1;
|
FlashLog_SaveReq=1;
|
||||||
|
|
Ładowanie…
Reference in New Issue