Skip to content

Commit 05a0f6f

Browse files
committed
Bug-Fix
1 parent 2ab2f07 commit 05a0f6f

File tree

6 files changed

+9
-13
lines changed

6 files changed

+9
-13
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ A 3d-printable housing can be found here: https://www.thingiverse.com/thing:4571
2525

2626
**General remark:** Beside the `firmware.bin`, typically also the content of `/html` needs to be updated!
2727

28-
##### Rolling - (2020-10-25)
28+
##### Rolling - (2020-11-03)
29+
30+
* Bug-Fix in time sync on warm reboot
2931

3032
* based on v3.1.0 (2020-10-26)
3133

code/lib/jomjol_time_sntp/time_sntp.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,24 +75,18 @@ void setup_time(void)
7575
time(&now);
7676
localtime_r(&now, &timeinfo);
7777
// Is time set? If not, tm_year will be (1970 - 1900).
78-
if (timeinfo.tm_year < (2016 - 1900)) {
78+
if ((timeinfo.tm_year < (2016 - 1900)) || setTimeAlwaysOnReboot) {
7979
ESP_LOGI(TAG, "Time is not set yet. Connecting to WiFi and getting time over NTP.");
8080
initialize_sntp();
8181
obtain_time();
8282
// update 'now' variable with current time
8383
time(&now);
8484
}
85-
else
86-
{
87-
if (setTimeAlwaysOnReboot)
88-
{
89-
obtain_time();
90-
}
91-
}
9285
char strftime_buf[64];
9386

9487
// Set timezone to Berlin Standard Time
9588
setenv("TZ", "UTC+9", 1);
89+
// setenv("TZ", "Europe/Berlin", 1);
9690
tzset();
9791
localtime_r(&now, &timeinfo);
9892
strftime(strftime_buf, sizeof(strftime_buf), "%c", &timeinfo);

code/src/version.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const char* GIT_REV="3cec93e";
1+
const char* GIT_REV="2ab2f07";
22
const char* GIT_TAG="";
33
const char* GIT_BRANCH="master";
4-
const char* BUILD_TIME="2020-10-26 18:31";
4+
const char* BUILD_TIME="2020-11-03 22:12";

code/version.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const char* GIT_REV="3cec93e";
1+
const char* GIT_REV="2ab2f07";
22
const char* GIT_TAG="";
33
const char* GIT_BRANCH="master";
4-
const char* BUILD_TIME="2020-10-26 18:31";
4+
const char* BUILD_TIME="2020-11-03 22:12";

firmware/bootloader.bin

0 Bytes
Binary file not shown.

firmware/firmware.bin

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)