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: main.cpp
- Revision:
- 58:4d06288d75a2
- Parent:
- 57:0d81e107b449
- Child:
- 59:58894493fb29
- Child:
- 60:9d191ff745fb
--- a/main.cpp Tue Apr 09 13:00:12 2013 +0000 +++ b/main.cpp Tue Apr 09 20:09:31 2013 +0000 @@ -163,7 +163,9 @@ //sprintf(sTemp,"CANary firmware rev51-gg3\n"); // gg - cleaned 4x4 button and touches, //sprintf(sTemp,"CANary firmware rev52\n"); //sprintf(sTemp,"CANary firmware rev54\n"); // merged 53 (51-gg3) and 52 - sprintf(sTemp,"CANary firmware rev57\n"); + //sprintf(sTemp,"CANary firmware rev57\n"); + //sprintf(sTemp,"CANary firmware rev57-gg1\n"); // gg - highlight experiment + sprintf(sTemp,"CANary firmware rev58\n"); // gg - highlight experiment commit and publish logMsg(sTemp); // Look for new binary on thumbdrive @@ -352,7 +354,7 @@ } //--------------- // gg - 4x4 touch - //unsigned char tScrn = 0 ; // screen 0 + unsigned char tScrn = 0 ; // screen 0 unsigned char tCol ; unsigned char tRow ; @@ -372,12 +374,18 @@ //-------------- // gg - 4x4 touch tCol = buttonX(lastTouch.x,4) ; - //if( tCol >= 4 ){ tCol -= 4; tScrn = 1 ; } // touch is on screen 1 - if( tCol >= 4 ){ tCol -= 4; } // touch is on screen 1 + if( tCol >= 4 ){ tCol -= 4; tScrn = 1 ; } // touch is on screen 1 + //if( tCol >= 4 ){ tCol -= 4; } // touch is on screen 1 tRow = buttonY(lastTouch.y,4) ; - if( tRow == tNavRow ) tRow = 7 ; + // highlight the button (what screen?) + // different highlight for tScrn, whichTouched combinations, for debugging + highlightButton( tCol,tRow, tScrn, whichTouched, 4,4) ; // g - highlight + // usually the screen is re-drawn after + // for now, this gives us good feedback that we can use + + if( tRow == tNavRow ) tRow = 7 ; // switch ( (tCol*10) + tRow ) { //--------------------------------- case 00: // 00 on screen 0 or 1