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: ServoRingBuffer.cpp
- Revision:
- 2:da00ed8a1cd5
- Parent:
- 0:01fb4588b738
diff -r f109687a28fe -r da00ed8a1cd5 ServoRingBuffer.cpp
--- a/ServoRingBuffer.cpp Mon Apr 06 21:10:08 2015 +0000
+++ b/ServoRingBuffer.cpp Wed Apr 29 21:52:23 2015 +0000
@@ -97,12 +97,12 @@
static unsigned int currentReadIdx;
for (ii = 0; ii < readsRemaining(); ii ++) {
currentReadIdx = (lastRead + 1) % BUFFER_SIZE;
+ fprintf(txtFile,"%d,", ringBuffer[currentReadIdx].time);
for(jj=0;jj<NUMBER_OF_SPINDLES;jj++)
{
fprintf(txtFile,"%d,%d,", ringBuffer[currentReadIdx].myServoData[jj].pos,
ringBuffer[currentReadIdx].myServoData[jj].force);
}
- fprintf(txtFile,"%d,", ringBuffer[currentReadIdx].time);
fprintf(txtFile,"%d,", ringBuffer[currentReadIdx].direction);
fprintf(txtFile,"%d\n", ringBuffer[currentReadIdx].cycle);
lastRead = currentReadIdx;