# HG changeset patch # User heinrichsweikamp # Date 1582026105 -3600 # Node ID 2b4440f75434b2e05c436bef5801931214e8f9a9 # Parent 49c3c5f0d0cba338105c5b2768946fe82fda7e16 show battery percent and voltage and surfacemode. That gives additional information to the user to detect a wrong calibrated battery symbol and helps debugging issues around charging and battery life diff -r 49c3c5f0d0cb -r 2b4440f75434 Discovery/Src/t7.c --- a/Discovery/Src/t7.c Tue Feb 18 09:58:52 2020 +0100 +++ b/Discovery/Src/t7.c Tue Feb 18 12:41:45 2020 +0100 @@ -1089,7 +1089,8 @@ GFX_write_string_color(&Batt24,&t7batt,text,0,CLUT_WarningRed); if((stateUsed->lifeData.battery_charge > 0) && (stateUsed->lifeData.battery_charge < 140)) { - snprintf(text,16,"\004\025\f\002%u%%",(uint8_t)stateUsed->lifeData.battery_charge); + // show battery percent and voltage + snprintf(text,16,"\f\002%u%% \f%.1fV",(uint8_t)stateUsed->lifeData.battery_charge,stateUsed->lifeData.battery_voltage); if(warning_count_high_time) text[0] = '\a'; GFX_write_string(&FontT24,&t7voltage,text,0); @@ -1106,7 +1107,8 @@ if((stateUsed->lifeData.battery_charge > 0) && (stateUsed->lifeData.battery_charge < 140)) { - snprintf(text,16,"\f\002%u%%",(uint8_t)stateUsed->lifeData.battery_charge); + // show battery percent and voltage + snprintf(text,16,"\f\002%u%% \f%.1fV",(uint8_t)stateUsed->lifeData.battery_charge,stateUsed->lifeData.battery_voltage); // GFX_write_string(&FontT24,&t7batt,text,0); GFX_write_string(&FontT24,&t7voltage,text,0); }