Dual CANbus monitor and instrumentation cluster

Dependencies:   SPI_TFTx2 TFT_fonts TOUCH_TFTx2 beep mbed

Fork of CANary by Tick Tock

Revision:
39:eef8beac7411
Parent:
38:155ec32c5e91
Child:
40:0e6e71a7323f
--- a/displayModes.cpp	Sun Mar 24 17:26:09 2013 +0000
+++ b/displayModes.cpp	Mon Mar 25 15:13:15 2013 +0000
@@ -69,7 +69,7 @@
 void printDTE (bool force){
     unsigned short gids, SOC, packV;
     static unsigned short lgids=0, lSOC=0, lpackV=0;
-    static float lmpkWh=0;
+    static float lmpkWh=0, laccV=0;;
     CANMessage msg;
 
     msg = lastMsg[indexLastMsg[0x5bc]]; //Get gids
@@ -106,7 +106,7 @@
         printf("%4.1fV \n",(float)packV/2);
         lpackV=packV;
     }
-    if(force||tick){
+    if(force||accV!=laccV){
         tt.locate(20,200);
         printf("%4.2fV  \n",accV);
     }