Replace millis with esp timer

This commit is contained in:
Rune Harlyk
2025-10-09 17:49:36 +02:00
parent 12e1f80830
commit bc31b1b2dd
6 changed files with 32 additions and 26 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
#include <ap_service.h>
#include "esp_timer.h"
#include <string>
static const char *TAG = "APService";
@@ -37,14 +38,14 @@ APNetworkStatus APService::getAPNetworkStatus() {
}
void APService::reconfigureAP() {
_lastManaged = millis() - MANAGE_NETWORK_DELAY;
_lastManaged = esp_timer_get_time() / 1000 - MANAGE_NETWORK_DELAY;
_reconfigureAp = true;
_recoveryMode = false;
}
void APService::recoveryMode() {
ESP_LOGI(TAG, "Recovery Mode needed");
_lastManaged = millis() - MANAGE_NETWORK_DELAY;
_lastManaged = esp_timer_get_time() / 1000 - MANAGE_NETWORK_DELAY;
_recoveryMode = true;
_reconfigureAp = true;
}