mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-08 22:22:05 +00:00
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>
This commit is contained in:
parent
ada61ae178
commit
ab62590aa9
@ -1,5 +1,6 @@
|
|||||||
#include "CryptoEngine.h"
|
#include "CryptoEngine.h"
|
||||||
#include "PortduinoGPIO.h"
|
#include "PortduinoGPIO.h"
|
||||||
|
#include "RTC.h"
|
||||||
#include "SPIChip.h"
|
#include "SPIChip.h"
|
||||||
#include "mesh/RF95Interface.h"
|
#include "mesh/RF95Interface.h"
|
||||||
#include "sleep.h"
|
#include "sleep.h"
|
||||||
@ -370,6 +371,12 @@ void portduinoSetup()
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct timeval tv;
|
||||||
|
tv.tv_sec = time(NULL);
|
||||||
|
tv.tv_usec = 0;
|
||||||
|
perhapsSetRTC(RTCQualityNTP, &tv);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user