![](/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
- Revision:
- 83:52b1f330a62d
- Parent:
- 82:64b6d8d07f20
- Child:
- 84:fd21e5d32dab
diff -r 64b6d8d07f20 -r 52b1f330a62d main.cpp --- a/main.cpp Tue Apr 16 21:55:41 2013 +0000 +++ b/main.cpp Wed Apr 17 11:48:10 2013 +0000 @@ -51,8 +51,7 @@ // gg - revStr is used in 2 places // gg - and is easy to edit here // gg - added ZeroSecTick and revStr - -char revStr[7] = "81"; +char revStr[7] = "83"; bool logEn = false, logOpen = false; bool yesBattLog = false ; // gg - Batt Log @@ -61,7 +60,7 @@ FILE *cfile; FILE *file; char fileName[35] = "" ; -char writeBuffer[maxBufLen][13]; // buffer for USB write +char writeBuffer[maxBufLen][13];// __attribute__ ((section("AHBSRAM1"))); // buffer for USB write char indexLastMsg[0x800]={0}; // index table for last message CANMessage lastMsg[100]; // table to store last message of eachtype unsigned char battData[256]={0}; @@ -227,7 +226,7 @@ readConfig(); // Start 15ms timer for requests - msgReq.attach(&sendReq,0.015); + //msgReq.attach(&sendReq,0.015); // Start monitors can1.monitor(true); // set to snoop mode @@ -263,9 +262,9 @@ logMsg(sTemp); // starting alc log file logTS(); // Date Time at start - logEvent("Starting"); // Log startup msg for testing + logErrMsg("Starting"); // Log startup msg for testing sprintf(sTemp,"Cr%s",revStr); - logEvent(sTemp); // gg - log firmware version + logErrMsg(sTemp); // gg - log firmware version spkr.beep(2000,0.25); } @@ -335,7 +334,7 @@ if (secsNoTouch>100) secsNoTouch = 100; // also mostly reset user Idle counter } else if (logOpen){ // insert timestamp on each wake if logging enabled (disabled for now) file = fopen(fileName, "ab"); - logEvent("WakingUp"); // gg - use messeges + logErrMsg("WakingUp"); // gg - use messeges logTS(); // Date-Time at wakeup } } // if idle @@ -423,10 +422,13 @@ dMode[whichTouched] = brakeScreen ; // GoTo Brake Screen } else if (dMode[whichTouched]==cpScreen) { reqMsgCnt=0; + msgReq.attach(&sendReq,0.015); } else if (dMode[whichTouched]==cpHistScreen) { // gg - hist reqMsgCnt=0; + msgReq.attach(&sendReq,0.015); } else if (dMode[whichTouched]==cpBarScreen) { // gg - cpbars reqMsgCnt=0; + msgReq.attach(&sendReq,0.015); } else if (dMode[whichTouched]==config1Screen) { mbed_reset(); } else if (dMode[whichTouched]==playbackScreen) { // pause/unpause @@ -585,24 +587,18 @@ case 02: // left col, bottom row (not nav) if (dMode[whichTouched] == indexScreen) { // gg - index dMode[whichTouched] = config1Screen ; // GoTo Config Screen - } else { - lastDMode[whichTouched]=99;//repaint to clear highlight } break; case 12: // left-middle col, bottom row (not nav) if (dMode[whichTouched] == indexScreen) { // gg - index dMode[whichTouched] = playbackScreen ; // GoTo Playback Screen - } else { - lastDMode[whichTouched]=99;//repaint to clear highlight } break; case 22: // right-middle col, bottom row (not nav) if (dMode[whichTouched] == indexScreen) { // gg - index dMode[whichTouched] = dateScreen ; // GoTo Set Date/Time Screen - } else { - lastDMode[whichTouched]=99;//repaint to clear highlight } break; @@ -610,8 +606,6 @@ if (dMode[whichTouched] == indexScreen) { // gg - index dMode[whichTouched] = logScreen ; // GoTo Log Screen sMode=0; - } else { - lastDMode[whichTouched]=99;//repaint to clear highlight } break;