Dual CANbus monitor and instrumentation cluster supporting ILI9341 display controller

Dependencies:   SPI_TFTx2_ILI9341 TOUCH_TFTx2_ILI9341 TFT_fonts mbed

Fork of CANary by Tick Tock

Revision:
46:73e8716f976f
Parent:
45:6069010de7d7
Child:
47:9cc7d876dd6d
diff -r 6069010de7d7 -r 73e8716f976f main.cpp
--- a/main.cpp	Tue Apr 02 06:55:43 2013 +0000
+++ b/main.cpp	Tue Apr 02 07:10:57 2013 +0000
@@ -141,7 +141,7 @@
     t = *localtime(&seconds) ;
     strftime(sTemp, 32, "%a %m/%d/%Y %X\n", &t);
     logMsg(sTemp);
-    sprintf(sTemp,"CANary firmware rev45\n");
+    sprintf(sTemp,"CANary firmware rev46\n");
     logMsg(sTemp);
 
     // Look for new binary on thumbdrive
@@ -180,13 +180,14 @@
 
     secsNoMsg = 0;
 
+    // Read config file
+    readConfig();
+    i=dMode[1];
     dMode[1]=logScreen;
     lastDMode[1]=99;
     updateDisplay(1);
-
-    // Read config file
-    readConfig();
     wait_ms(4000); // Pause for a few seconds
+    dMode[1]=i;
 
     touched=false;
     secsNoTouch=2;
@@ -343,6 +344,8 @@
                                     lastDMode[whichTouched]=99;//force refresh
                                 } else if (dMode[whichTouched]==cpScreen) {
                                     pollCP=true;
+                                } else if (dMode[whichTouched]==cpHistScreen) {
+                                    pollCP=true;
                                 } else if (dMode[whichTouched]==config1Screen) {
                                     mbed_reset();
                                 } else if (dMode[whichTouched]==playbackScreen) { // pause/unpause