![](/media/cache/profiles/0df840aed5f513a02964d0c27bc4f277.jpg.50x50_q85.jpg)
Attempts to merge SPI_TFT2 & SPI_TFT_ILI9341
Dependencies: SPI_TFTx2 TFT_fonts TOUCH_TFTx2 mbed
Fork of CANary by
Diff: main.cpp
- Branch:
- Metric
- Revision:
- 122:138a40892a4c
- Parent:
- 121:553faf139a20
- Child:
- 123:a8c0042df617
diff -r 553faf139a20 -r 138a40892a4c main.cpp --- a/main.cpp Thu Jul 11 05:29:18 2013 +0000 +++ b/main.cpp Wed Jul 17 13:48:51 2013 +0000 @@ -1,13 +1,11 @@ // main.cpp // //To Do: -// * USB device detect // * Audible friction brake feedback // * User-configurable watchpoint // * Add 50% charge option // * Tire Pressure Sensor display // * Fix bug in playback while connected to canbus (hangs) -// ** Force regen display to zero when in neutral // * Add coasting regen to regen/braking display // * Change semilog efficiency graph to linear with 10 minute values // * Add additional 79b bank readouts @@ -47,10 +45,8 @@ InterruptIn touchpad(p17); CAN can1(p9, p10); // CAN1 (EV) uses pins 9 and 10 (rx, tx) and pin 8 (rs) DigitalOut can1SleepMode(p8); // Use pin 8 to control the sleep mode of can2 -//DigitalInOut can1SleepMode(p8); // Use pin 8 to control the sleep mode of can2 CAN can2(p30, p29); // CAN2 (CAR) uses pins 30 and 29 (rx, tx) and pin 28 (rs) DigitalOut can2SleepMode(p28); // Use pin 28 to control the sleep mode of can1 -//DigitalInOut can2SleepMode(p28); // Use pin 28 to control the sleep mode of can1 AnalogIn mon12V(p15); TOUCH_TFTx2 tt(p16, p17, p19, p20, p11, p12, p13, p6, p7, p5, "TFT"); // x+,x-,y+,y-,mosi, miso, sclk, cs0, cs1, reset PwmOut dled(p23); @@ -480,7 +476,7 @@ // and re-paint the other screen too, to see new skin there lastDMode[whichTouched ^ 1]=99; // repaint other screen (^ = XOR) } else if (dMode[whichTouched] == indexScreen) { // gg - index - dMode[whichTouched] = dteScreen ; // GoTo DTE Screen + dMode[whichTouched] = healthScreen ; // Goto health screen sMode=0; } else { lastDMode[whichTouched]=99;//repaint to clear highlight