test fork
Dependencies: SPI_TFTx2 SPI_TFTx2_ILI9341 TFT_fonts TOUCH_TFTx2 mbed
Fork of CANary_9341 by
Diff: displayModes.cpp
- Revision:
- 130:1a9d2a6d99ce
- Parent:
- 128:25314f339565
- Child:
- 131:0d926c080a65
--- a/displayModes.cpp Sun Jul 21 23:59:00 2013 +0000 +++ b/displayModes.cpp Mon Jul 22 00:02:51 2013 +0000 @@ -572,7 +572,7 @@ showButton(3,1," GoTo"," Config",4,4); // bottom (not Nav) row showButton(0,2," GoTo","Playback",4,4); - //showButton(1,2," GoTo","Set Time",4,4); + showButton(1,2," GoTo","Set Time",4,4); showButton(2,2," GoTo"," Log",4,4); showButton(3,2," GoTo"," Trip",4,4); @@ -844,7 +844,7 @@ //-------- top row -------- showButton(0,0,"Calibrate"," Touch",4,4); // gg - 4x4 showButton(1,0," Reset","",4,4); - showButton(2,0," Save"," Config",4,4); + showButton(2,0," Save"," Config",4,4); // a button to step to the next skin unsigned int nextSkin = skin + 1 ; @@ -854,7 +854,7 @@ else if( nextSkin == ggSkin ) sprintf(sTemp1,"Skin GG"); else sprintf(sTemp1,"Skin %d",nextSkin); - showButton(3,0," Use",sTemp1,4,4); + showButton(3,0," Use",sTemp1,4,4); //------- second row ----- if (logEn&&usbEn) { @@ -881,9 +881,9 @@ // add Enable/Disable Debug - debugMode if (debugMode) { - sprintf(sTemp1," Disable"); + sprintf(sTemp1,"Disable"); } else { - sprintf(sTemp1," Enable"); + sprintf(sTemp1,"Enable"); } showButton(3,1,sTemp1," Debug",4,4); @@ -892,13 +892,6 @@ else showButton(0,2,"Metric","",4,4); - showButton(1,2," Set"," Time",4,4); - if (showHealth) { - sprintf(sTemp1," Hide"); - } else { - sprintf(sTemp1," Show"); - } - showButton(2,2,sTemp1," Health",4,4); showButton(3,2,"Update","Firmware",4,4); } @@ -966,6 +959,9 @@ case 5: sprintf(sTemp1,"Second"); break; + case 6: + sprintf(sTemp1,"Select"); + break; default: break; } @@ -1031,8 +1027,8 @@ tt.set_font((unsigned char*) Arial24x23); //for(i=0;i<10;i++){ //y=200-i*20; - for(i=2;i<7;i++){ - y=200-(i-2)*40; + for(i=3;i<8;i++){ + y=200-(i-3)*40; tt.locate(0,y-8); if (showMiles){ printf("%3.0f\n",convertDistance(i*((float)(gids-5)*.075))); // LM - Added metric support @@ -1045,8 +1041,8 @@ lgids=gids; } if(tock||force){ - for(i=2;i<7;i++){ - y=200-(i-2)*40; + for(i=3;i<8;i++){ + y=200-(i-3)*40; tt.line(40,y,158,y,DarkGrey); } @@ -1116,11 +1112,11 @@ radius=2; color=Green; } - if(y<60){ + if(y<100){ y=220; color=Red; - }else if(y<280) { - y=280-y; + }else if(y<320) { + y=320-y; }else{ y=0; }