diff --git a/firmware/data/bottom.js b/firmware/data/bottom.js index e70fdf7..62474ca 100644 --- a/firmware/data/bottom.js +++ b/firmware/data/bottom.js @@ -451,6 +451,11 @@ showToast('Error while verifying timing control data. The timestamps are not inc return null; } } +if (tcdata[0].ch1 > 0 || tcdata[0].ch2 > 0 || tcdata[0].ch3 > 0 || tcdata[0].ch4 > 0 || +tcdata[9].ch1 > 0 || tcdata[9].ch2 > 0 || tcdata[9].ch3 > 0 || tcdata[9].ch4 > 0) { +showToast('Error: Values for ch1 to ch4 must be 0 for i=0 and i=9.', 'error'); +return null; +} var currentTime = {hour: new Date().getHours(), min: new Date().getMinutes()}; var jsonData = {tcdata: tcdata, currenttime: currentTime}; return JSON.stringify(jsonData); diff --git a/firmware/html/bottom.js b/firmware/html/bottom.js index 6b2a8fc..189f7ba 100644 --- a/firmware/html/bottom.js +++ b/firmware/html/bottom.js @@ -559,7 +559,14 @@ function createJsonFromTable() { return null; } } - + + // Überprüft die Werte für ch1 bis ch4 bei i=0 und i=9 + if (tcdata[0].ch1 > 0 || tcdata[0].ch2 > 0 || tcdata[0].ch3 > 0 || tcdata[0].ch4 > 0 || + tcdata[9].ch1 > 0 || tcdata[9].ch2 > 0 || tcdata[9].ch3 > 0 || tcdata[9].ch4 > 0) { + showToast('Error: Values for ch1 to ch4 must be 0 for i=0 and i=9.', 'error'); + return null; + } + var currentTime = {hour: new Date().getHours(), min: new Date().getMinutes()}; var jsonData = {tcdata: tcdata, currenttime: currentTime}; //console.log("jsonData = " + JSON.stringify(jsonData));