mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 12:36:52 +03:00
extend config.ini handler for GPIO settings
add BootTime incode
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
static const char *TAG = "sntp";
|
||||
|
||||
bool setTimeAlwaysOnReboot = true;
|
||||
time_t bootTime;
|
||||
|
||||
static void obtain_time(void);
|
||||
static void initialize_sntp(void);
|
||||
@@ -125,4 +126,9 @@ static void initialize_sntp(void)
|
||||
sntp_setservername(0, "pool.ntp.org");
|
||||
// sntp_set_time_sync_notification_cb(time_sync_notification_cb);
|
||||
sntp_init();
|
||||
}
|
||||
|
||||
void setBootTime()
|
||||
{
|
||||
time(&bootTime);
|
||||
}
|
||||
@@ -18,4 +18,6 @@ std::string gettimestring(const char * frm);
|
||||
std::string ConvertTimeToString(time_t _time, const char * frm);
|
||||
|
||||
void setTimeZone(std::string _tzstring);
|
||||
void reset_servername(std::string _servername);
|
||||
void reset_servername(std::string _servername);
|
||||
|
||||
void setBootTime();
|
||||
|
||||
@@ -179,6 +179,7 @@ extern "C" void app_main(void)
|
||||
vTaskDelay( xDelay );
|
||||
// LogFile.WriteToFile("Startsequence 07");
|
||||
setup_time();
|
||||
setBootTime();
|
||||
LogFile.WriteToFile("=============================================================================================");
|
||||
LogFile.WriteToFile("=================================== Main Started ============================================");
|
||||
LogFile.WriteToFile("=============================================================================================");
|
||||
|
||||
Reference in New Issue
Block a user