Dual CANbus monitor and instrumentation cluster supporting ILI9341 display controller
Dependencies: SPI_TFTx2_ILI9341 TOUCH_TFTx2_ILI9341 TFT_fonts mbed
Fork of CANary by
Diff: displayModes.cpp
- Branch:
- Metric
- Revision:
- 120:041edeec08f5
- Parent:
- 119:0e2b641e98a2
- Child:
- 121:553faf139a20
diff -r 0e2b641e98a2 -r 041edeec08f5 displayModes.cpp --- a/displayModes.cpp Fri Jul 05 16:55:04 2013 +0000 +++ b/displayModes.cpp Mon Jul 08 02:08:08 2013 +0000 @@ -65,18 +65,18 @@ laccV=accV; } if(force||kW[0]!=lkW){ - tt.locate(180,70); + tt.locate(180,40); printf("%3.2fkW \n",kW[0]); - //printf("%3.1f mpkWh \n",mpkWh[0]); lkW=kW[0]; } + tt.foreground(DarkGrey); if(force||Ah_x10000!=lAh){ tt.locate(10,70); printf("% 4.2fAh \n",(float)Ah_x10000/10000); lAh=Ah_x10000; } if(force||SOH_x100!=lSOH){ - tt.locate(180,40); + tt.locate(180,70); printf(" %3.1f%s\n",(float)SOH_x100/100,"% "); lSOH=SOH_x100; } @@ -88,7 +88,6 @@ tt.locate(40,40); // gg - add GIDs Percent of 281 printf("%4.1f%s \n", (float)gids*0.355872, "% ") ; tt.locate(20,70); - //printf("%4.1f kWh \n",(float)gids*0.08); // is input, not usable printf("%4.1f kwh \n",(float)gids*0.075); // gg - closer to usable tt.set_font((unsigned char*) SCProSB31x55); @@ -253,22 +252,22 @@ } if(force||Ah_x10000!=lAh){ tt.locate(10,100); - printf(" %4.2fAh \n",(float)Ah_x10000/10000); + printf(" %4.2f Ah cap \n",(float)Ah_x10000/10000); lAh=Ah_x10000; } if(force||maxTemp!=lmaxTemp){ tt.locate(10,130); - printf(" %4.1f%s max temp \n",convertTemperature(maxTemp),temperatureUnit()); + printf(" %4.1f %s (max) \n",convertTemperature(maxTemp),temperatureUnit()); lmaxTemp=maxTemp; } if(force||unloadedV_x2!=lunlV){ tt.locate(10,160); - printf(" %4.1fV \n",unloadedV_x2/2); + printf(" %4.1f V \n",unloadedV_x2/2); lunlV=unloadedV_x2; } if(force||Resr!=lresr){ tt.locate(10,190); - printf(" %4.1fmOhms ESR \n",Resr*1000); + printf(" %3.0f mOhms \n",Resr*1000); lresr=Resr; } }