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.
Diff: Motor.cpp
- Revision:
- 2:3bf51023ea23
- Parent:
- 0:18e417fff669
- Child:
- 3:8f4f4d3a91bc
--- a/Motor.cpp Fri Mar 13 08:18:24 2015 +0000 +++ b/Motor.cpp Mon Mar 23 19:06:20 2015 +0000 @@ -19,7 +19,7 @@ void addToRingBuf(int val, volatile int *ringBuf, volatile int *ringBufIdx) //Is called in ISR. Adds stuff to ring buffer, obviously. { ringBuf[*ringBufIdx] = val; - *ringBufIdx = (*ringBufIdx + 1) % RING_BUF_SZ; + *ringBufIdx = (*ringBufIdx + 1) % RING_BUF_SZ; //avoid mod, do if }