File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -61,19 +61,20 @@ void handleForm() {
61
61
if (tz.length ()) {
62
62
timezone = tz.toInt ();
63
63
}
64
- setTime (getNtpTime ());
65
-
64
+
65
+ time_t newTime = getNtpTime ();
66
+ if (newTime) {
67
+ setTime (newTime);
68
+ }
66
69
String syncInt = server.arg (" ntpint" );
67
70
syncInterval = syncInt.toInt ();
68
71
69
72
clockName = server.arg (" clockname" );
70
-
71
73
httpUpdateResponse = " The configuration was updated." ;
72
74
73
- // server.send(200, "text/plain", response);
74
75
server.sendHeader (" Location" , " /" );
75
76
server.send (302 , " text/plain" , " Moved" );
76
- // handleRoot();
77
+
77
78
saveSettings ();
78
79
if (update_wifi == " 1" ) {
79
80
delay (500 );
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ byte sendBuffer[] = {
12
12
String ipToString (IPAddress ip) {
13
13
uint32_t addr = ip;
14
14
String ret;
15
- // ret = String(addr >> 24) + "." + String(addr >> 16 & 0xff) + "." + String(addr >> 8 & 0xff) + "." + String(addr & 0xff);
16
15
ret = String (addr & 0xff ) + " ." + String (addr >> 8 & 0xff ) + " ." + String (addr >> 16 & 0xff ) + " ." + String (addr >> 24 );
17
16
return ret;
18
17
}
You can’t perform that action at this time.
0 commit comments