Removed Ethernet, added default WiFi (mikrotik AP) and fixed various Clock bugs.

This commit is contained in:
2026-01-07 01:02:57 +02:00
parent 9f07e9ea39
commit 51b7722e1d
5 changed files with 251 additions and 169 deletions

View File

@@ -524,14 +524,14 @@ void CommandHandler::handleSetRtcTimeCommand(JsonVariant contents, const Message
// Verify the time was set correctly by reading it back
unsigned long verifyTime = _timeKeeper->getTime();
if (verifyTime > 0 && abs((long)verifyTime - (long)timestamp) < 5) { // Allow 5 second tolerance
if (verifyTime > 0 && abs((long)verifyTime - (long)localTimestamp) < 5) { // Allow 5 second tolerance
sendSuccessResponse("set_rtc_time",
"RTC time and timezone updated successfully", context);
LOG_INFO("RTC time set with timezone: UTC %lu + %ld = local %lu",
timestamp, totalOffset, localTimestamp);
} else {
sendErrorResponse("set_rtc_time", "Failed to verify RTC time was set correctly", context);
LOG_ERROR("RTC time verification failed - expected: %lu, got: %lu", timestamp, verifyTime);
LOG_ERROR("RTC time verification failed - expected: %lu, got: %lu", localTimestamp, verifyTime);
}
} else {
// Legacy method: Use device's existing timezone config