Push current time back to web page.

This commit is contained in:
mattbk 2023-09-03 10:56:54 -05:00
parent d5852bb3bb
commit d4db1fa1f8

View File

@ -86,7 +86,8 @@ const char index_html[] PROGMEM = R"rawliteral(
WPM (current value %inputWPM%): <input type="number " name="inputWPM" value = %inputWPM%> (doesn't work yet)<br>
<input type="hidden" name="inputTimeUnix" id="js_time_unix">
Current time (UTC): %inputTimeUnix%
<input type="hidden" name="inputTimeUnix" id="js_time_unix"><br>
inputFloat (current value %inputFloat%): <input type="number " name="inputFloat" value = %inputFloat%><br>
<input type="submit" value="Submit"">
@ -178,6 +179,8 @@ String processor(const String& var){
}
else if(var == "inputFloat"){
return readFile(SPIFFS, "/inputFloat.txt");
} else if(var == "inputTimeUnix"){
return rtc.now().timestamp();
}
return String();
}