Dual CANbus monitor and instrumentation cluster

Dependencies:   SPI_TFTx2 TFT_fonts TOUCH_TFTx2 beep mbed

Fork of CANary by Tick Tock

Revision:
94:c3a14b3975d6
Parent:
93:c2402e8cd0e2
Child:
95:248b3c25a7df
--- a/main.cpp	Wed May 01 03:02:59 2013 +0000
+++ b/main.cpp	Fri May 03 11:25:03 2013 +0000
@@ -5,7 +5,6 @@
 // * Ability to update binary from the thumb-drive (requires file timestamp)
 // * Audible friction brake feedback
 // * User-configurable watchpoint
-// * Better graphical DTE display with historic efficiency information considered and displayed
 // * Add 50% charge option
 // * Tire Pressure Sensor display
 // * Fix bug in playback while connected to canbus (hangs)
@@ -51,7 +50,7 @@
 // gg - revStr is used in 2 places
 // gg - and is easy to edit here
 // gg - added ZeroSecTick and revStr
-char revStr[7] = "93";
+char revStr[7] = "94";
 
 bool debugMode = false;
 bool logEn = false, logOpen = false; 
@@ -229,9 +228,6 @@
     // Read config file
     readConfig();
 
-    // Start 15ms timer for requests
-    //msgReq.attach(&sendReq,0.015);
-
     // Start monitors
     can1.monitor(true); // set to snoop mode
     can2.monitor(true); // set to snoop mode
@@ -253,7 +249,8 @@
                 //sprintf(sTemp,"Using file %s\n",fileName);
                 //printMsg(sTemp); // using alc file ...
                 file = fopen(fileName, "ab");
-                lastDMode[whichTouched]=99;//force refresh
+                lastDMode[0]=99;//force refresh
+                lastDMode[1]=99;//force refresh
                 if(file==NULL){
                     sprintf(sTemp,"\nUnable to open %s\n\n\n\n",fileName);
                     printMsg(sTemp); // cannot open alc file
@@ -427,13 +424,13 @@
                                     dMode[whichTouched] = brakeScreen ; // GoTo Brake Screen
                                 } else if (dMode[whichTouched]==cpScreen) {
                                     reqMsgCnt=0;
-                                    msgReq.attach(&sendReq,0.025);
+                                    msgReq.attach(&sendReq,0.015);
                                 } else if (dMode[whichTouched]==cpHistScreen) { // gg - hist
                                     reqMsgCnt=0;
-                                    msgReq.attach(&sendReq,0.025);
+                                    msgReq.attach(&sendReq,0.015);
                                 } else if (dMode[whichTouched]==cpBarScreen) { // gg - cpbars
                                     reqMsgCnt=0;
-                                    msgReq.attach(&sendReq,0.025);
+                                    msgReq.attach(&sendReq,0.015);
                                 } else if (dMode[whichTouched]==config1Screen) {
                                     mbed_reset();
                                 } else if (dMode[whichTouched]==playbackScreen) { // pause/unpause