Naprawiono wyzwalanie akcji pojedynczego przycisku przy wciskaniu kombinacji UP+OK

This commit is contained in:
Victus
2026-05-10 23:49:39 +02:00
parent 74026a3ce0
commit 2cc517c98b

View File

@@ -385,6 +385,23 @@ void settingsDevice(){
///////////// LOOP ////////////////////////////////////////////
void loop() {
if (settings.readBtnUp() || settings.readBtnDown() || settings.readBtnOk()) {
delay(50); // Krótkie opóźnienie na "wciśnięcie drugiego przycisku"
if (settings.readBtnUp() && settings.readBtnOk()) {
ESP_LOGI(TAG_MAIN, "Manual AP Mode trigger");
wifi.startCaptivePortal();
display.clear();
display.textCenter(1, "AP MODE");
display.textCenter(2, "192.168.4.1");
while(settings.readBtnUp() || settings.readBtnOk() || settings.readBtnDown()) {
Watchdog::feed();
delay(50);
}
delay(200); // Odczekanie po puszczeniu przycisków, żeby nie wywołać innych akcji
return;
}
}
if (settings.isPressed(2)){
Watchdog::feed();
if(runMeasure) {
@@ -403,17 +420,7 @@ void loop() {
if(settings.isPressed(3)) settingsDevice(); // DOWN
if(settings.isPressed(1)) toogleMode(); // UP
if (settings.readBtnUp() && settings.readBtnOk()) {
ESP_LOGI(TAG_MAIN, "Manual AP Mode trigger");
wifi.startCaptivePortal();
display.clear();
display.textCenter(1, "AP MODE");
display.textCenter(2, "192.168.4.1");
while(settings.readBtnUp() && settings.readBtnOk()) {
Watchdog::feed();
delay(50);
}
}
if(testingNow) {
if((runMeasure) && (settings.isPressed(2))){