Move Time set from system to main (#4583)

This commit is contained in:
Jonathan Bennett 2024-08-29 05:39:30 -05:00 committed by GitHub
parent 50f06840d7
commit 92eae39a1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 7 deletions

View File

@ -257,6 +257,12 @@ void setup()
#ifdef DEBUG_PORT
consoleInit(); // Set serial baud rate and init our mesh console
#endif
#if ARCH_PORTDUINO
struct timeval tv;
tv.tv_sec = time(NULL);
tv.tv_usec = 0;
perhapsSetRTC(RTCQualityNTP, &tv);
#endif
powerMonInit();

View File

@ -1,6 +1,5 @@
#include "CryptoEngine.h"
#include "PortduinoGPIO.h"
#include "RTC.h"
#include "SPIChip.h"
#include "mesh/RF95Interface.h"
#include "sleep.h"
@ -8,7 +7,6 @@
#include <Utility.h>
#include <assert.h>
#include <time.h>
#include "PortduinoGlue.h"
#include "linux/gpio/LinuxGPIOPin.h"
@ -372,11 +370,6 @@ void portduinoSetup()
}
}
struct timeval tv;
tv.tv_sec = time(NULL);
tv.tv_usec = 0;
perhapsSetRTC(RTCQualityNTP, &tv);
return;
}