kopia lustrzana https://github.com/meshtastic/firmware
set current time to system time in portduino build (#4556)
* set current time to system time in portduino build * fix includes order --------- Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>pull/4527/head
rodzic
e3ce3a3a4f
commit
cc93df27a5
|
@ -1,5 +1,6 @@
|
|||
#include "CryptoEngine.h"
|
||||
#include "PortduinoGPIO.h"
|
||||
#include "RTC.h"
|
||||
#include "SPIChip.h"
|
||||
#include "mesh/RF95Interface.h"
|
||||
#include "sleep.h"
|
||||
|
@ -370,6 +371,12 @@ void portduinoSetup()
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
struct timeval tv;
|
||||
tv.tv_sec = time(NULL);
|
||||
tv.tv_usec = 0;
|
||||
perhapsSetRTC(RTCQualityNTP, &tv);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue