-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow writing to SD card with sampling rate over 250 #96
base: master
Are you sure you want to change the base?
Conversation
Hi! have you tested the stability of this over longer sessions (30min+)? I am very interested in this fix |
@rivasd I have not, do you have a reason to think it might be a problem? |
Julfy, thanks for submitting this. Does your mod work also with the Daisy? It appears to be testing explicitly for 250 Hz sample rate? William |
@wjcroft I've tested it with daisy on 1000hz. It shouldn't matter whether daisy is attached or not I think, as |
@andrewjaykeller, how does this PR look to you? A number of users on the Forum have requested this over the years. Also mentioning @conorrussomanno @produceconsumerobot |
The most recent forum post. There are probably six other threads asking for a solution on this. |
@julfy Well I know that, for example, space on the SD card is pre-allocated using a hardcoded 250Hz sampling rate, which we could also fix in this PR. I've also had a lot of glitches in general with SD card saving (aka most not working) over bluetooth with 32Gb SanDisk class 10 cards and have still not figured out why, but that was over long repeated sessions over a half day with three headsets in the same room |
@rivasd I see. That indeed better be changed. Meanwhile, I've confirmed that the board has no problems with collecting the data for 35 minutes with Daisy attached on 1000hz. |
Another user just requested this. The PR needs a quick code review. |
I've been using this to successfully record data in combination with #102 with a sample rate of 1000Hz. I've tested it with the GUI as well and it behaves as normal, including when I manually specify the sample rate up to 250Hz (as expected with this PR). One thing I noticed is that the GUI doesn't seem to do a soft reset / manually set the requested sample rate, which leads to a blank stream if the board had been used to record at a higher rate. This isn't an issue with the PR though, more a note that the GUI should probably include that as part of the initial connect via serial dongle. A final note, and it might be something funky with my FW, but using BrainFlow before updating, I'd get responses from sent commands (unless streaming) and now it seems hit and miss. On this same note, I don't see a reason to prohibit responses via serial connection if "streaming" above 250Hz because there is no real stream data sent, which might mean it's nice to have a switch for starting stream + SD or SD only. Considering for me it's more important to know the status of the commands (including SD writing start, etc) I might look into adding this myself, just in the middle of exams at the moment so not sure of the timeframe. Thanks! |
Description
Now, if communication is performed over bluetooth, board will force sampling rate to be 250 regardless of the rate that was set before. It was done because RFduino system can't handle amount of data generated on higher sampling rates. This hack, however, prevents data from being collected to SD card on higher sampling rates as well, even though the board can easily handle it.
This pr removes the SPS forcing and sets condition around streaming channel data to serial port allowing writes only if SPS == 250.
There are some minor changes to doc and logging as well.
NB
Please don't forget to assign a proper version number, or let me know what it should be