Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SPI_TFTx2 TFT_fonts TOUCH_TFTx2 mbed
Fork of CANary by
Diff: utility.cpp
- Revision:
- 77:7c136766466c
- Parent:
- 75:77bd26829dca
- Child:
- 78:a383971fe02f
- Child:
- 80:24f1793171e7
--- a/utility.cpp Mon Apr 15 14:40:05 2013 +0000 +++ b/utility.cpp Tue Apr 16 03:28:55 2013 +0000 @@ -60,15 +60,15 @@ for(i=5;i<13;i++){ // Is there a better way to do this? (writeBuffer[writePointer][i]=canRXmsg.data?) writeBuffer[writePointer][i]=canRXmsg.data[i-5]; } + if (++writePointer >= maxBufLen) { + writePointer = 0; + led3 = !led3; + } if (writePointer==readPointer) { // Just overwrote an entry that hasn't been sent to thumbdrive sprintf(sTemp,"Write buffer overrun.\n"); logMsg(sTemp); // write buffer overrun - spkr.beep(1000,0.25); - } - if (++writePointer >= maxBufLen) { - writePointer = 0; - led3 = !led3; + spkr.beep(500,0.25); } } }