Dual CANbus monitor and instrumentation cluster supporting ILI9341 display controller
Dependencies: SPI_TFTx2_ILI9341 TOUCH_TFTx2_ILI9341 TFT_fonts mbed
Fork of CANary by
Diff: displayModes.cpp
- Revision:
- 62:ffd15edb5431
- Parent:
- 60:9d191ff745fb
- Child:
- 65:821fc79cd7fe
--- a/displayModes.cpp Wed Apr 10 04:20:44 2013 +0000 +++ b/displayModes.cpp Wed Apr 10 12:55:22 2013 +0000 @@ -985,43 +985,23 @@ //--------------------- // 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){ - - // 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 - +void highlightButton(unsigned char column, unsigned char row, unsigned char tScn, unsigned char columns, unsigned char rows){ + unsigned short x1,x2,y1,y2; x1=column*(320/columns)+btnGap/2; x2=(column+1)*(320/columns)-btnGap/2; y1=row*(240/rows)+btnGap/2; y2=(row+1)*(240/rows)-btnGap/2; - - tt.set_display( 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 { - // screens do not match - tt.fillrect(x1,y1,x2,y2,Red); // DarkCyan); - } + else + tt.fillrect(x1,y1,x2,y2,Green); // DarkCyan);*/ // paint the outer pixel as a yellow frame + tt.set_display(tScn); tt.rect(x1,y1,x2,y2,Yellow) ; // DarkCyan); - - - // adapt formatting of text to the smaller 4x4 box - //tt.locate(x1+btnGap/2,y1+btnGap); // gg - 4x4 - //printf("%s\n",text1); - - //tt.locate(x1+btnGap/2,y1+btnGap+20); - //printf("%s\n",text2); } //---------------------