update Venus gui

This commit is contained in:
Yinyin Liu 2024-07-31 15:30:54 +02:00
parent 959af2bf5e
commit 2bc09112ae
1 changed files with 6 additions and 1 deletions

View File

@ -130,6 +130,11 @@ MbPage {
isCalibrationActive = true; isCalibrationActive = true;
} else if (controllerState.value === 3 && isCalibrationActive) { } else if (controllerState.value === 3 && isCalibrationActive) {
console.log("Stopping manual calibration charge..."); console.log("Stopping manual calibration charge...");
lastEoc.setValue(previousEocValue);
console.log("Reverted lastEoc to previous value: " + previousEocValue);
isCalibrationActive = false;
} else if (controllerState.value === 3 && !isCalibrationActive) {
console.log("Stopping automatic calibration charge...");
if(previousEocValue==0){ if(previousEocValue==0){
console.log("Postpone automatic calibration charge to 1 day later."); console.log("Postpone automatic calibration charge to 1 day later.");
lastEoc.setValue((new Date().getTime() - 24*60*60*1000)/1000); lastEoc.setValue((new Date().getTime() - 24*60*60*1000)/1000);
@ -138,7 +143,7 @@ MbPage {
console.log("Reverted lastEoc to previous value: " + previousEocValue); console.log("Reverted lastEoc to previous value: " + previousEocValue);
} }
isCalibrationActive = false; isCalibrationActive = false;
} else { } else {
isCalibrationActive = false; isCalibrationActive = false;
} }