mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-08 22:22:05 +00:00
Move Time set from system to main (#4583)
This commit is contained in:
parent
50f06840d7
commit
92eae39a1b
@ -257,6 +257,12 @@ void setup()
|
|||||||
|
|
||||||
#ifdef DEBUG_PORT
|
#ifdef DEBUG_PORT
|
||||||
consoleInit(); // Set serial baud rate and init our mesh console
|
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
|
#endif
|
||||||
powerMonInit();
|
powerMonInit();
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#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"
|
||||||
@ -8,7 +7,6 @@
|
|||||||
|
|
||||||
#include <Utility.h>
|
#include <Utility.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#include "PortduinoGlue.h"
|
#include "PortduinoGlue.h"
|
||||||
#include "linux/gpio/LinuxGPIOPin.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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user