OpenBCI_Cyton_Library
OpenBCI_Cyton_Library copied to clipboard
SD Data-logging Fix- V3.1.4
- Fixed SD Card Logging Issue 1: Data-logging Duration
- Fixed SD Card Logging Issue 2: Data stream to OpenBCI GUI hangs after closing Data file
Thanks for this, I'm in the process of testing this at the moment, the code looks good, I'm just wondering if it wouldn't make sense to also include a check for the current sample rate so the block allocation varies depending on the sample rate, e.g.:
// SD_Card_Stuff.ino
// ...
boolean setupSDcard(char limit){
// ...
BLOCK_COUNT = ceil(BLOCK_COUNT / 250 * board.getSampleRate().toInt());
// ...
}
// ...
That way if you use 1000Hz, you'll get a larger file...also this setting shouldn't affect performance as it only happens once during the SD card setup.
I've just noticed that if the data overruns the file there's no footer written to the sdcard (I'll need to have another look but I'm guessing the limit for writing data should be reserved size - footer length
One more fixed is included
- Fixed - ADS1299 Data Acquisition and Data Streaming on Hardware Side was staying ON even after stop streaming session