From 175f525bcd44301bbb677dd3a7deb07a76163c68 Mon Sep 17 00:00:00 2001 From: norbert-walter Date: Sun, 26 Jan 2025 22:11:55 +0100 Subject: [PATCH] Fix undervoltage detection, format error --- lib/obp60task/OBPSensorTask.cpp | 8 ++++---- lib/obp60task/obp60task.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/obp60task/OBPSensorTask.cpp b/lib/obp60task/OBPSensorTask.cpp index ac32b40..445fb21 100644 --- a/lib/obp60task/OBPSensorTask.cpp +++ b/lib/obp60task/OBPSensorTask.cpp @@ -493,19 +493,19 @@ void sensorTask(void *param){ float deltaV = sensors.batteryVoltage - sensors.batteryVoltage10; // Higher limits for lower voltages if(sensors.batteryVoltage10 < 4.0){ - if(deltaV > 0.045 && deltaV < 4,15){ + if(deltaV > 0.045 && deltaV < 4.15){ sensors.BatteryChargeStatus = 1; // Charging active } - if(deltaV < -0.04 || deltaV >= 4,15){ // Charging stops by grater than 4,15V + if(deltaV < -0.04 || deltaV >= 4.15){ // Charging stops by grater than 4,15V sensors.BatteryChargeStatus = 0; // Discharging } } // Lower limits for higher voltages else{ - if(deltaV > 0.03 && deltaV < 4,15){ + if(deltaV > 0.03 && deltaV < 4.15){ sensors.BatteryChargeStatus = 1; // Charging active } - if(deltaV < -0.03 || deltaV >= 4,15){ // Charging stops by grater than 4,15V + if(deltaV < -0.03 || deltaV >= 4.15){ // Charging stops by grater than 4,15V sensors.BatteryChargeStatus = 0; // Discharging } } diff --git a/lib/obp60task/obp60task.cpp b/lib/obp60task/obp60task.cpp index ad56df5..1b4b936 100644 --- a/lib/obp60task/obp60task.cpp +++ b/lib/obp60task/obp60task.cpp @@ -337,7 +337,7 @@ void underVoltageDetection(GwApi *api, CommonData &common){ getdisplay().print("Undervoltage"); getdisplay().setFont(&Ubuntu_Bold8pt7b); getdisplay().setCursor(65, 175); - getdisplay().print("Charge battery and restart"); + getdisplay().print("Charge battery and restart system"); getdisplay().nextPage(); // Partial update getdisplay().powerOff(); // Display power off setPortPin(OBP_POWER_EPD, false); // Power off ePaper display