diff Discovery/Src/t7.c @ 693:79ce499e26aa Betatest

Improvment charge percent visualization: The percent display is now clipped to 100.0%. As small deviation may happen between physical battery and the theoretical counter value, percent > 100 may happen. To avoid confusion values > 100% are no longer displayed. In addition a small % has been added to the visualization of the value.
author Ideenmodellierer
date Fri, 05 Aug 2022 16:04:52 +0200
parents 5575f21382d5
children 8c48553a0176
line wrap: on
line diff
--- a/Discovery/Src/t7.c	Fri Aug 05 15:27:01 2022 +0200
+++ b/Discovery/Src/t7.c	Fri Aug 05 16:04:52 2022 +0200
@@ -3977,9 +3977,15 @@
 				speed = (localCharge - lastCharge) * 1000.0 / deltatime;
 			}
 
+			if(localCharge > 100.0)
+			{
+				localCharge = 100.0;
+			}
+
 			lastCharge = localCharge;
 		}
 
+
 		if(deltatime > 1000)
 		{
 			deltatime = 0;
@@ -4011,7 +4017,7 @@
     if((stateUsed->lifeData.battery_charge > 0) && (stateUsed->chargeStatus != CHARGER_off))
     {
 		snprintf(text,60,
-			"\001%0.2f\n\r"
+			"\001%0.2f\016\016%%\017\n\r"
 			"\001%c%d\n\r"
 			,stateUsed->lifeData.battery_charge
 			,indicator