Attempts to merge SPI_TFT2 & SPI_TFT_ILI9341

Dependencies:   SPI_TFTx2 TFT_fonts TOUCH_TFTx2 mbed

Fork of CANary by Tick Tock

Revision:
166:ec3951ba9701
Parent:
165:4daa921730dd
Child:
167:58d4edf403d4
--- a/main.cpp	Tue Dec 03 02:56:50 2013 +0000
+++ b/main.cpp	Tue Dec 03 13:54:07 2013 +0000
@@ -1,6 +1,7 @@
 // main.cpp
 //
 //To Do:
+// * Fix USB hot plug (must reset every time USB plugged)
 // * Add 50% charge option
 // * Add linear efficiency graph with 10 minute values
 // * Add in-device config editor
@@ -8,8 +9,9 @@
 // * Add tire pressure cal (40psi for me = FR 38, RR 38.2, FL 37.8, RL 38 - maybe 2psi error on my tire gauge?)
 // * Add on screen messages for heater on, etc, and use refresh feature above to clear in x seconds
 
-// rev165
+// rev166
 // Re-formatted main and dte displays
+// Fixed flicker on CC DTE
 
 #include "mbed.h"
 #include "CAN.h"
@@ -19,7 +21,7 @@
 #include "utility.h"
 #include "displayModes.h"
 #include "TOUCH_TFTx2.h"
-char revStr[7] = "165"; // gg - revision string, max 6 characters
+char revStr[7] = "166"; // gg - revision string, max 6 characters
 
 FATFS USBdrive;
 LocalFileSystem local("local");
@@ -217,6 +219,7 @@
             if(!feof(hfile)){
                 fscanf(hfile,"%f %f\r\n",&mph[i],&kW[i]);
                 mpkWh[i]=mph[i]/kW[i];
+                if(i==dtePeriod) mpkWh_noCC=mpkWh[i];
             }
         }
         if(!feof(hfile)){