Try to fix an update error
The update is faster then 1 second so it get executed multiple times, this should prevent it
This commit is contained in:
@@ -52,7 +52,7 @@ void app_main(void *argument)
|
|||||||
{
|
{
|
||||||
Get_Time(&sDate, &sTime);
|
Get_Time(&sDate, &sTime);
|
||||||
DS3231_GetTime(&utc);
|
DS3231_GetTime(&utc);
|
||||||
if ((utc.Hour == 0) && (utc.Minute == 0) && (utc.Second == 0))
|
if ((utc.Hour == 0) && (utc.Minute == 0) && (utc.Second == 0) && sBefore == 59)
|
||||||
{
|
{
|
||||||
debugln("Updating time");
|
debugln("Updating time");
|
||||||
breakTime(NTPToEpochUnix(), &utc, 0);
|
breakTime(NTPToEpochUnix(), &utc, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user