main.cpp: small change in main loop
This commit is contained in:
parent
a3e26cad91
commit
24eed4a55e
12
src/main.cpp
12
src/main.cpp
@ -520,20 +520,22 @@ do_send(&sendjob);
|
|||||||
// Arduino main moop, runs on core 1
|
// Arduino main moop, runs on core 1
|
||||||
// https://techtutorialsx.com/2017/05/09/esp32-get-task-execution-core/
|
// https://techtutorialsx.com/2017/05/09/esp32-get-task-execution-core/
|
||||||
void loop() {
|
void loop() {
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
#ifdef HAS_BUTTON
|
|
||||||
|
#ifdef HAS_BUTTON
|
||||||
if (ButtonTriggered) {
|
if (ButtonTriggered) {
|
||||||
ButtonTriggered = false;
|
ButtonTriggered = false;
|
||||||
ESP_LOGI(TAG, "Button pressed, resetting device to factory defaults");
|
ESP_LOGI(TAG, "Button pressed, resetting device to factory defaults");
|
||||||
eraseConfig();
|
eraseConfig();
|
||||||
esp_restart();
|
esp_restart();
|
||||||
}
|
}
|
||||||
else
|
#endif
|
||||||
#endif
|
|
||||||
{ vTaskDelay(500/portTICK_PERIOD_MS);
|
vTaskDelay(500/portTICK_PERIOD_MS);
|
||||||
uptimecounter = uptime() / 1000; // count uptime seconds
|
uptimecounter = uptime() / 1000; // count uptime seconds
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* end Aruino LOOP ------------------------------------------------------------ */
|
/* end Aruino LOOP ------------------------------------------------------------ */
|
||||||
|
Loading…
Reference in New Issue
Block a user