Closed owenduffy closed 8 years ago
This looks really good. Thank you! I will try to test this out over the weekend.
I am still unable to compile because SerialPort.h is throwing errors. Looks like Bill's serial port library hasn't been updated to work with Arduino 1.6x. What libs are you using that you are able to compile?
Also, getSFN() does not compile for me. I had to revert back to getFilename(). I'm guessing you are using a slightly different SD lib. Which one?
I am able to compile with
#define __PROG_TYPES_COMPAT__
fix found here: http://openbci.com/forum/index.php?p=/discussion/271/prog-char-does-not-name-a-type I had to edit the SerialPort.h lib and add the define as well.
I don't recall why, but I believe it's 'better' to change instances of 'prog_char' with 'const char'. At least another option.
Nathan, I used Arduino 1.6.5 and pulled the SerialPort lib from github. I have just checked, there are no updates to SerialPort and my .ino compiles clean for a Uno under 1.6.5.
Further, I did some speed testing on the 'full' version (ie /light). I wrote an expect script to send random length bursts of characters with random delay. At 115200, it suffers overuns on continuous data, but with small gaps (20-50ms) between bursts of up to 200B, it very rarely overruns.
I think they are known for overruns on continuous data, even at moderately low speeds.
Hi Owen - I've spent a bunch of time cleaning up OpenLog. It's a bit slimmer thanks to your help.
I wrote a benchmarking sketch that requires an extra FTDI connection to a Uno (two serial ports needed) but once you get through the setup, the sketch allows you to throw constant chunks of data at an OpenLog. Works well. My testing shows that at 850 bytes in RX SerialPort buffer and 128 bytes in localBuffer (inside append function) OpenLog can log constantly at 115200 for long periods and lots of logs (ie, results are repeatable) with very few glitches. I'm assuming most users will send data with slight delays between blasts.
Also - OpenLog_Minimal is the smallest instantiation of OpenLog I could come up with. This sketch is set to 1024 bytes RX buffer and 128 localBuffer and allows very promising performance at 115200. Because there is always a 3rd party SD card at play it will always be difficult to claim 'it's solved!' but I'm happy with the results.
I'm closing this one out. Please re-open if need be.
Thanks for your help! Your changes are included in the main branch.
Thanks Nathan. Apologies for the delay, I have been doing some testing as time permitted... looks good.
Cheers Owen
For your consideration.