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
- Revision:
- 96:a6c6a6fd1d28
- Parent:
- 95:248b3c25a7df
- Child:
- 97:a25940fd7b5b
- Child:
- 98:9f8bab96edff
diff -r 248b3c25a7df -r a6c6a6fd1d28 displayModes.cpp --- a/displayModes.cpp Fri May 03 12:18:10 2013 +0000 +++ b/displayModes.cpp Fri May 03 14:31:07 2013 +0000 @@ -72,7 +72,8 @@ void mainDisplay (bool force, bool showButtons){ unsigned short gids, SOC, packV; - static unsigned short lgids=0, lSOC=0, lpackV=0, lbattTemp_x4=99, maxPS=0; + static unsigned short lgids=0, lSOC=0, lpackV=0, maxPS=0; + static unsigned char lbattTemp_x4=0; static float lkW=0, laccV=0, lmpkWh=0; CANMessage msg; @@ -117,9 +118,9 @@ printf("%4.1fV \n",(float)packV/2); lpackV=packV; } - if(battTemp_x4!=lbattTemp_x4){ + if(force||battTemp_x4!=lbattTemp_x4){ tt.locate(200,170); - printf("%4.1fF \n",(float)battTemp_x4*9/20+32); + printf("%4.1fF\n",(float)battTemp_x4*9/20+32); lbattTemp_x4=battTemp_x4; } if(force||accV!=laccV){