diff --git a/vulpes/src/main.cpp b/vulpes/src/main.cpp index d40a17a..46c2ae7 100644 --- a/vulpes/src/main.cpp +++ b/vulpes/src/main.cpp @@ -73,9 +73,15 @@ const char index_html[] PROGMEM = R"rawliteral( document.getElementById("hidden-form").onload = function() { top.location.reload(); } + // Current start date to string + s = %inputStartTimeUnix%; + current_start = new Date(s * 1000); + current_start_utc = current_start.toUTCString(); + document.getElementById('current-start').innerHTML = current_start_utc; } + -
+ Sending program (cycle doesn't work yet) (current value: %inputSend%):
- Program start time (current value %inputStartTimeUnix%):
+ Program start time (current value ):
Current time (UTC): %inputTimeUnix% @@ -426,7 +432,7 @@ void setup() { yourInputWPM = readFile(SPIFFS, "/inputWPM.txt").toInt(); yourInputMsg = readFile(SPIFFS, "/inputMsg.txt").toInt(); yourInputFloat = readFile(SPIFFS, "/inputFloat.txt").toFloat(); - yourInputStartTimeUnix = readFile(SPIFFS, "inputStartTimeUnix.txt").toInt(); + yourInputStartTimeUnix = readFile(SPIFFS, "/inputStartTimeUnix.txt").toInt(); // On restart, keep doing what you were doing before yourInputMsg_old = yourInputMsg; @@ -530,7 +536,6 @@ void setup() { // GET inputStartTimeUnix value on /get?inputStartTimeUnix= if (request->hasParam(PARAM_START)) { inputMessage = request->getParam(PARAM_START)->value(); - Serial.println(inputMessage); writeFile(SPIFFS, "/inputStartTimeUnix.txt", inputMessage.c_str()); yourInputStartTimeUnix = atol(inputMessage.c_str()); Serial.println(yourInputStartTimeUnix);