diff --git a/firmware/firmware.ino b/firmware/firmware.ino index 3fe7abb..6f3cd8e 100644 --- a/firmware/firmware.ino +++ b/firmware/firmware.ino @@ -766,7 +766,12 @@ void init_webserver() "console.log('upperIndex='+upperIndex);" "if (lowerIndex === -1 || upperIndex === -1) {" "console.log(\"Error: Current time not found in time array and not between two elements in time array.\");" - "return;" + "lowerIndex = 0;" + "upperIndex = 1;" + "var tmp1 = time[0].split(':');" + "console.log('tmp1 = ' + tmp1);" + "currenttime[0] = tmp1[0];" + "currenttime[1] = tmp1[1];" "}" "var lowerTime = time[lowerIndex].split(\":\");" "var upperTime = time[upperIndex].split(\":\");"