Add NeuroPawn Knight IMU Board Support and Gain Configuration#795
Add NeuroPawn Knight IMU Board Support and Gain Configuration#795Andrey1994 merged 4 commits intobrainflow-dev:masterfrom
Conversation
Andrey1994
left a comment
There was a problem hiding this comment.
overall looks good, in addition to comments attached to code I think it would be better to have a common base class for both Knigh boards and implement different parsing logic since everything else looks the same. Good example how to do it - OpenBCISerial board and Cyton/CytonDaisy implementations
I've added a base class like you mentioned above. Images will be attached to this PR for both boards to be used in the SupportedBoards.rst |
|
looks good to me, update in BoardIds for other languages is missed(java, c#, julia, etc), other than that all fine |
|
just noticed that you have gain used only for converting raw values into uV, you dont change settings of the device itself afaict. It doesnt really matter from the brainflow integration point of view, but logically changing gain doesnt change the uV values from the body, it changes the precision of the amplifier. And BrainFlow is meant to return uV value from the body. So, gain set in brainflow in these equations should match gain set in the amplifier, and to achieve it you need to use config_board method. |
@Andrey1994 thanks for catching this. I will make the fix! |
Now, the gain configuration logic via BrainFlowInputParams has been removed. Gain is now purely configured via the config_board() function. |
|
I think I was not clear with the point here. Its ok to have configurable gain per channel, its also ok to have it as a part of prepare session method or/and as a part of config board. But gain configuration requires an update in two places - first a command should be sent to the ADS to change gain for a single channel or for all. Second - once its sent you need to update eqiations for this channel(or for all) to use new gain instead, then equations will match the ADS settings and correct value will be returned. I did smth similar for openbci here https://github.com/brainflow-dev/brainflow/blob/master/src%2Fboard_controller%2Fopenbci%2Fcyton_daisy.cpp#L16 I dont think its required to be in its own class like I did there, but it shows the idea |
|
But as is its fine for now, can merge it and you can add gain settings in another PR if you want to |
cf5520a to
2fe9d83
Compare
This PR introduces support for the NeuroPawn Knight IMU board and adds gain configuration capabilities for Knight boards.
Key Changes: