Dual CANbus monitor and instrumentation cluster

Dependencies:   SPI_TFTx2 TFT_fonts TOUCH_TFTx2 beep mbed

Fork of CANary by Tick Tock

Revision:
59:58894493fb29
Parent:
58:4d06288d75a2
--- a/displayModes.cpp	Tue Apr 09 20:09:31 2013 +0000
+++ b/displayModes.cpp	Wed Apr 10 04:06:23 2013 +0000
@@ -986,7 +986,7 @@
 //---------------------
 // gg - highlight
 //void highlightButton(unsigned char column, unsigned char row, char * text1, char * text2, unsigned char columns, unsigned char rows){
-void highlightButton(unsigned char column, unsigned char row, unsigned char tScn, unsigned char cScn, unsigned char columns, unsigned char rows){
+void highlightButton(unsigned char column, unsigned char row, unsigned char tScn, unsigned char columns, unsigned char rows){
     
     // tScn is the screen number derived from the touch location, is 0 or 1
     // cScn is the whichTouched screen value, apparently also 0 and 1
@@ -997,19 +997,20 @@
     x2=(column+1)*(320/columns)-btnGap/2;
     y1=row*(240/rows)+btnGap/2;
     y2=(row+1)*(240/rows)-btnGap/2;
-    if( tScn == cScn ){
+    //if( tScn == cScn ){
       // screens match
-      if( tScn == 0 )
+    //  if( tScn == 0 )
         // paint the whole button box
-        tt.fillrect(x1,y1,x2,y2,White); // DarkCyan);
-      else
-        tt.fillrect(x1,y1,x2,y2,Green); // DarkCyan);
-    } else {
+    //    tt.fillrect(x1,y1,x2,y2,White); // DarkCyan);
+   //   else
+   //     tt.fillrect(x1,y1,x2,y2,Green); // DarkCyan);
+   // } else {
       // screens do not match
-      tt.fillrect(x1,y1,x2,y2,Red); // DarkCyan);      
-    }
+   //   tt.fillrect(x1,y1,x2,y2,Red); // DarkCyan);      
+   //}
 
     // paint the outer pixel as a yellow frame
+    tt.set_display(tScn);
     tt.rect(x1,y1,x2,y2,Yellow) ; // DarkCyan);