OpenBCI_Cyton_Library icon indicating copy to clipboard operation
OpenBCI_Cyton_Library copied to clipboard

SD Data-logging Fix- V3.1.4

Open IoaSman1 opened this issue 3 years ago • 3 comments

  • 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

IoaSman1 avatar Mar 22 '22 18:03 IoaSman1

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.

zeyus avatar Apr 12 '22 10:04 zeyus

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

zeyus avatar Apr 25 '22 08:04 zeyus

One more fixed is included

  • Fixed - ADS1299 Data Acquisition and Data Streaming on Hardware Side was staying ON even after stop streaming session

IoaSman1 avatar Apr 28 '22 18:04 IoaSman1