Set up scheduled program cycles #24

Merged
W1CDN merged 41 commits from program-cycle into main 2023-09-15 16:51:45 -05:00
Showing only changes of commit 2060df9691 - Show all commits

View File

@ -61,10 +61,18 @@ const char index_html[] PROGMEM = R"rawliteral(
<!DOCTYPE HTML><html><head>
<title>ESP Input Form</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script>
<script type='text/javascript'>
// Submit timestamps as unix seconds
var putDate = function(form) {
form.inputTimeUnix.value = Math.floor(Date.now() / 1000);
document.getElementById("js_start_time_unix").value = (Date.parse(js_start_time_unix_entry.value))/1000;
};
// Refresh page after submit so values are right https://stackoverflow.com/a/1860732/2152245
window.onload = function() {
document.getElementById("hidden-form").onload = function() {
top.location.reload();
}
}
</script></head><body>
<form action="/get" target="hidden-form" onsubmit="putDate(this);">
@ -99,10 +107,7 @@ const char index_html[] PROGMEM = R"rawliteral(
<input type="submit" value="Submit"">
</form>
<iframe style="display:none" name="hidden-form"></iframe>
<script>
document.getElementById("js_start_time_unix").value = (Date.parse(js_start_time_unix_entry.value))/1000;
</script>
<iframe style="display:none" name="hidden-form" id="hidden-form"></iframe>
</body></html>)rawliteral";
// Auxiliary variables to store the current output state