Attempts to merge SPI_TFT2 & SPI_TFT_ILI9341

Dependencies:   SPI_TFTx2 TFT_fonts TOUCH_TFTx2 mbed

Fork of CANary by Tick Tock

Revision:
173:9815b1467039
Parent:
172:53548bf8bf85
Child:
174:cd27e80f197d
--- a/main.cpp	Sun Dec 29 12:38:00 2013 +0000
+++ b/main.cpp	Sun Dec 29 22:35:09 2013 +0000
@@ -11,8 +11,8 @@
 // * Add climate control impact to main max/min dte and new trip display
 // * Be more efficient with write buffer (use msgLen instead of always storing 8 bytes)
 
-// rev172
-// added wh/gid display to Health screen
+// rev173
+// fixed bugs
 
 #include "mbed.h"
 #include "CAN.h"
@@ -23,7 +23,7 @@
 #include "displayModes.h"
 #include "TOUCH_TFTx2.h"
 
-char revStr[7] = "172";
+char revStr[7] = "173";
 unsigned long maxTarget = 1000;
 FATFS USBdrive;
 LocalFileSystem local("local");
@@ -907,14 +907,13 @@
                         lastDMode[0]=99;
                         lastDMode[1]=99;
                     }
-                    //remove health screen once moving
-                    if(moving&&(saveDmode<99)){
-                        dMode[0]=saveDmode;
-                        saveDmode=99;
-                    }
                 }
             }
-
+            //remove health screen once moving
+            if(moving&&(saveDmode<99)&&(wait5secs==0)){
+                dMode[0]=saveDmode;
+                saveDmode=99;
+            }
 
             //compute historic efficiency
             if(numSsamples>0){ // Avoid div0