Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SPI_TFTx2_ILI9341 TFT_fonts TOUCH_TFTx2_ILI9341 mbed
Fork of CANary_corrupt by
Diff: displayModes.cpp
- Revision:
- 132:08748a67280a
- Parent:
- 131:0d926c080a65
- Child:
- 133:b0675d9d11dd
--- a/displayModes.cpp Wed Jul 24 11:20:08 2013 +0000
+++ b/displayModes.cpp Wed Jul 24 12:29:22 2013 +0000
@@ -35,15 +35,25 @@
printf("%3d sep %3d max\n",pointerSep,maxPS);
}
tt.locate(10,40);
- printf("%4.1f kWh \n",(float)(gids-5)*0.075);
+ float useable_kWh = (float)(gids-5)*0.075;
+ printf("%4.1f kWh \n",useable_kWh);
+ // Display DTE
tt.set_font((unsigned char*) SCProSB31x55);
tt.foreground(Green);
tt.locate(60,80);
- printf("%4.1f %s \n",convertDistance(mpkWh[dtePeriod]*((float)(gids-5)*.075)),distanceUnit()); //LM - add metric conversion
+ printf("%4.1f %s \n",convertDistance(mpkWh[dtePeriod]*useable_kWh),distanceUnit()); //LM - add metric conversion
lgids=gids;
lmpkWh=mpkWh[dtePeriod];
- tt.foreground(Yellow);
- tt.set_font((unsigned char*) Arial28x28);
+ if(minTripEff<10){
+ // Display max & min DTE
+ tt.set_font((unsigned char*) Arial12x12_prop);
+ tt.locate(5,120);
+ printf("%3.1f \n",convertDistance(minTripEff*useable_kWh));
+ tt.locate(280,120);
+ printf("%4.1f \n",convertDistance(maxTripEff*useable_kWh));
+ tt.foreground(Yellow);
+ tt.set_font((unsigned char*) Arial28x28);
+ }
}
if(force||SOC_x10!=lSOC){
tt.locate(200,10);
@@ -292,7 +302,7 @@
}
if(force||SOH_x100!=lSOH){
tt.locate(10,70);
- printf(" %4.1f,%4.1f %s \n",(float)SOH_x2/2,(float)SOH_x100/100,"% SOH");
+ printf(" %4.1f%s,%4.1f%s \n",(float)SOH_x2/2,"%",(float)SOH_x100/100,"% SOH");
lSOH=SOH_x100;
}
if(force||Ah_x10000!=lAh){
