Dual CANbus monitor and instrumentation cluster
Dependencies: SPI_TFTx2 TFT_fonts TOUCH_TFTx2 beep mbed
Fork of CANary by
Diff: main.cpp
- Branch:
- Metric
- Revision:
- 125:f58b7ab2abee
- Parent:
- 124:0d622967b764
diff -r 0d622967b764 -r f58b7ab2abee main.cpp --- a/main.cpp Sat Jul 20 03:37:28 2013 +0000 +++ b/main.cpp Sun Jul 21 11:08:38 2013 +0000 @@ -4,12 +4,11 @@ // * Audible friction brake feedback // * User-configurable watchpoint // * Add 50% charge option -// * Tire Pressure Sensor display -// * Fix bug in playback while connected to canbus (hangs) // * Add coasting regen to regen/braking display // * Change semilog efficiency graph to linear with 10 minute values // * Add additional 79b bank readouts // * Add ability to transfer settings config file to/from USB +// * Subtract accessory power from efficiency history (add back in when displaying) #include "mbed.h" #include "CAN.h" @@ -21,7 +20,7 @@ #include "displayModes.h" #include "TOUCH_TFTx2.h" -char revStr[7] = "124"; // gg - revision string, max 6 characters +char revStr[7] = "125"; // gg - revision string, max 6 characters FATFS USBdrive; LocalFileSystem local("local"); @@ -514,7 +513,9 @@ } else if (dMode[whichTouched]==playbackScreen) { // Start/stop playback if(!playbackOpen){ - if(!logOpen){ + if(!canIdle){ + printMsg("Cannot playback while connected to canbus\n"); + }else if(!logOpen){ efr = f_open(&efile,"playback.alc",FA_READ|FA_OPEN_EXISTING); lastDMode[whichTouched]=99;//force refresh if(efr != FR_OK){