test fork
Dependencies: SPI_TFTx2 SPI_TFTx2_ILI9341 TFT_fonts TOUCH_TFTx2 mbed
Fork of CANary_9341 by
Diff: main.cpp
- Revision:
- 32:c9d9b6cb5de1
- Parent:
- 31:082372c83f68
- Child:
- 33:a277743ebdeb
--- a/main.cpp Sun Mar 17 12:17:33 2013 +0000 +++ b/main.cpp Tue Mar 19 01:23:26 2013 +0000 @@ -1,14 +1,22 @@ // main.cpp //To Do: -// * USB device detect -// * end user programmable message decode -// * brake trainer -// * write and read the Mode Data -// * Date entry config screen (keypad) -// * auto-poll option for cellpair data -// * cellpair histogram -// * config screen (with ts cal, data, time, autopoll, enable/disable logging +/* +* Auto-poll cellpair data (user selectable) +* Log file playback (to enable testing of new passive display modes without having to drive around) +* USB device detect +* Ability to update binary from the thumb-drive (requires file timestamp) +* Cellpair histogram +* Audible friction brake feedback +* User-configurable watchpoint +* LCD Autodim +* Immediately turn off when car is turned off and logging +* 12V monitor +* Better graphical DTE display with historic efficiency information considered and displayed +* Add 50% charge option +* Tire Pressure Sensor display +* CSV dump of key parameters on car on/off +*/ #include "mbed.h" #include "CAN.h" @@ -108,7 +116,7 @@ struct tm t; // pointer to a static tm structure NVIC_SetPriority(TIMER3_IRQn, 1); //set ticker priority NVIC_SetPriority(CAN_IRQn, 2); //higher than can (so RTC sync works) - //ticker.attach(&tickerISR, 0.016); //send commands at 16ms rate + //ticker.attach(&tickerISR, 300); //Auto-request CP data every 5 minutes ticker.attach(&msgSend, 0.016); //send commands at 16ms rate seconds = time(NULL); @@ -373,12 +381,8 @@ } if (Tcount>4){ - display=display<1?display+1:0; // toggle display + display=display<1?display+1:0; // update display (unless sending Consult3 requests updateDisplay(display); - }/* else if(tick16){ // We do this inside main loop instead of ticker so CAN RX will not be blocked - msgSend(); - tick16=false; - }*/ - + } } //while (true) } \ No newline at end of file