Set getLocalTime timeout to 0 to prevent watchdog triggers

This happens especially when no WiFi is configured and the user enters the NTP info page
This commit is contained in:
Thomas Basler 2022-09-19 20:45:44 +02:00
parent 7dc0123140
commit 950b211fd5
2 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@ HM_Abstract::HM_Abstract(uint64_t serial)
bool HM_Abstract::sendStatsRequest(HoymilesRadio* radio)
{
struct tm timeinfo;
if (!getLocalTime(&timeinfo)) {
if (!getLocalTime(&timeinfo, 0)) {
return false;
}
@ -29,7 +29,7 @@ bool HM_Abstract::sendStatsRequest(HoymilesRadio* radio)
bool HM_Abstract::sendAlarmLogRequest(HoymilesRadio* radio)
{
struct tm timeinfo;
if (!getLocalTime(&timeinfo)) {
if (!getLocalTime(&timeinfo, 0)) {
return false;
}
@ -54,7 +54,7 @@ bool HM_Abstract::sendAlarmLogRequest(HoymilesRadio* radio)
bool HM_Abstract::sendDevInfoRequest(HoymilesRadio* radio)
{
struct tm timeinfo;
if (!getLocalTime(&timeinfo)) {
if (!getLocalTime(&timeinfo, 0)) {
return false;
}
@ -75,7 +75,7 @@ bool HM_Abstract::sendDevInfoRequest(HoymilesRadio* radio)
bool HM_Abstract::sendSystemConfigParaRequest(HoymilesRadio* radio)
{
struct tm timeinfo;
if (!getLocalTime(&timeinfo)) {
if (!getLocalTime(&timeinfo, 0)) {
return false;
}

View File

@ -35,7 +35,7 @@ void WebApiNtpClass::onNtpStatus(AsyncWebServerRequest* request)
root[F("ntp_timezone_descr")] = config.Ntp_TimezoneDescr;
struct tm timeinfo;
if (!getLocalTime(&timeinfo)) {
if (!getLocalTime(&timeinfo, 0)) {
root[F("ntp_status")] = false;
} else {
root[F("ntp_status")] = true;