From 523292a2fed1dc278a93ed1aec3bc1d4513c282b Mon Sep 17 00:00:00 2001 From: Kai Lauterbach Date: Fri, 28 Apr 2023 22:38:59 +0200 Subject: [PATCH] Fixed vertical line - is shown at the start in case that there is no point before or after the current time available. --- firmware/firmware.ino | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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(\":\");"