diff --git a/README.md b/README.md index 46025dde..753b1741 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,9 @@ A 3d-printable housing can be found here: https://www.thingiverse.com/thing:4571 **General remark:** Beside the `firmware.bin`, typically also the content of `/html` needs to be updated! -##### Rolling - (2020-10-25) +##### Rolling - (2020-11-03) + +* Bug-Fix in time sync on warm reboot * based on v3.1.0 (2020-10-26) diff --git a/code/lib/jomjol_time_sntp/time_sntp.cpp b/code/lib/jomjol_time_sntp/time_sntp.cpp index dc0f6d64..92dd1876 100644 --- a/code/lib/jomjol_time_sntp/time_sntp.cpp +++ b/code/lib/jomjol_time_sntp/time_sntp.cpp @@ -75,24 +75,18 @@ void setup_time(void) time(&now); localtime_r(&now, &timeinfo); // Is time set? If not, tm_year will be (1970 - 1900). - if (timeinfo.tm_year < (2016 - 1900)) { + if ((timeinfo.tm_year < (2016 - 1900)) || setTimeAlwaysOnReboot) { ESP_LOGI(TAG, "Time is not set yet. Connecting to WiFi and getting time over NTP."); initialize_sntp(); obtain_time(); // update 'now' variable with current time time(&now); } - else - { - if (setTimeAlwaysOnReboot) - { - obtain_time(); - } - } char strftime_buf[64]; // Set timezone to Berlin Standard Time setenv("TZ", "UTC+9", 1); +// setenv("TZ", "Europe/Berlin", 1); tzset(); localtime_r(&now, &timeinfo); strftime(strftime_buf, sizeof(strftime_buf), "%c", &timeinfo); diff --git a/code/src/version.cpp b/code/src/version.cpp index 9d743c7e..d1393fa2 100644 --- a/code/src/version.cpp +++ b/code/src/version.cpp @@ -1,4 +1,4 @@ -const char* GIT_REV="3cec93e"; +const char* GIT_REV="2ab2f07"; const char* GIT_TAG=""; const char* GIT_BRANCH="master"; -const char* BUILD_TIME="2020-10-26 18:31"; \ No newline at end of file +const char* BUILD_TIME="2020-11-03 22:12"; \ No newline at end of file diff --git a/code/version.cpp b/code/version.cpp index 9d743c7e..d1393fa2 100644 --- a/code/version.cpp +++ b/code/version.cpp @@ -1,4 +1,4 @@ -const char* GIT_REV="3cec93e"; +const char* GIT_REV="2ab2f07"; const char* GIT_TAG=""; const char* GIT_BRANCH="master"; -const char* BUILD_TIME="2020-10-26 18:31"; \ No newline at end of file +const char* BUILD_TIME="2020-11-03 22:12"; \ No newline at end of file diff --git a/firmware/bootloader.bin b/firmware/bootloader.bin index c4cdb973..edb2308e 100644 Binary files a/firmware/bootloader.bin and b/firmware/bootloader.bin differ diff --git a/firmware/firmware.bin b/firmware/firmware.bin index fe4c2a83..1f5bbce8 100644 Binary files a/firmware/firmware.bin and b/firmware/firmware.bin differ