Skip to content

Commit

Permalink
Update version, propagate fiddle changes right away
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkx committed Sep 9, 2022
1 parent a88f370 commit 1c31df1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SMPTEGenerator/SMPTEGenerator.ino
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <WiFi.h>
#include <ESPmDNS.h>

#define VERSION "2.01c"
#define VERSION "2.02"

// The 'red' pin is wired through a 2k2 resistor to the base of an NPN
// transistor. The latter its C is pulled up by a 1k resistor to the 5V taken
Expand Down Expand Up @@ -110,9 +110,9 @@ void loop() {
static bool ntpnosync = true;
time_t n = time(NULL);
if (ntpnosync) {
if (n < 5 * 3600)
if (n < 5 * 3600UL)
return;
if (n < 6 * 3600)
if (n < 6 * 3600UL)
Serial.println("Failed to sync; just sending what I have");
else
Serial.println("Synced to NTP server");
Expand Down
3 changes: 3 additions & 0 deletions SMPTEGenerator/WebConfig.ino
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ void handleRoot(void)
return;
}
server.send(200, "textbrlain", "Ok, config stored.");

// force the fiddle setting to be propagated to the clock.
ntp_loop(true);
}

0 comments on commit 1c31df1

Please sign in to comment.