瀏覽代碼

TimerManager interval check

master
gituser 3 週之前
父節點
當前提交
a13947d6ad
共有 2 個文件被更改,包括 16 次插入2 次删除
  1. 15
    1
      LEDLamp.ino
  2. 1
    1
      sloeber.ino.cpp

+ 15
- 1
LEDLamp.ino 查看文件

@@ -257,6 +257,8 @@ void handleSTAMode() {
webServer.handleClient();
webSocket.loop();

static uint32_t lastNtpCheck = 0;

if (WiFi.status() != WL_CONNECTED) {
Serial.println("WLAN verloren");
WiFi.begin(configManager.getConfig().ssid, configManager.getConfig().pass);
@@ -265,7 +267,19 @@ void handleSTAMode() {
return;
}

//TODO: TimerManager::isNowInTimeInterval()
// uint32_t now = millis();
// if (now - lastNtpCheck >= 5000) {
// lastNtpCheck = now;
// if (timerManager.isNowInTimeInterval()) {
// if (ledMngr.isOn()) {
// ledMngr.off();
// }
// } else {
// if (!ledMngr.isOn()) {
// ledMngr.on();
// }
// }
// }

driveLEDStrip();
}

+ 1
- 1
sloeber.ino.cpp 查看文件

@@ -2,7 +2,7 @@
//This is a automatic generated file
//Please do not modify this file
//If you touch this file your change will be overwritten during the next build
//This file has been generated on 2026-07-13 20:13:32
//This file has been generated on 2026-07-14 11:10:18

#include "Arduino.h"
#include "Arduino.h"

Loading…
取消
儲存