ChrisVeigl / BrainBay

Open Source Biofeedback Software
http://brainbay.lo-res.org
Other
163 stars 52 forks source link

BioSemi support #28

Closed DennyYJHan closed 4 years ago

DennyYJHan commented 4 years ago

This fork is a work of adding BioSemi Active Two (Mk1 and Mk2) support to brainBay. One object (ob_biosemi.cpp and ob_biosemi.h) and the open-source driver (in .\lib\BioSemi) have been added to the git.

ChrisVeigl commented 4 years ago

Hi Denny and thanks for this great addition to Brainbay! (sorry it took so long to have a look at the pull request) it seems there are a lot of changes in some unrelated files (e.g. the neurobit.cpp / .h files) - looks like an autoformatter which not really changed actual code... can you revert those changes? i also noticed the version number changes back to 2.4 - would be nice to correct this before the merge ....

DennyYJHan commented 4 years ago

Hi Chris, No worries at all! Thanks for the heads up! I've now reverted those format changes in my commits. Hopefully I've addressed these issues. If not, please feel free to let me know. Thanks Chris!

ChrisVeigl commented 4 years ago

ok great - seems we can merge!

ChrisVeigl commented 4 years ago

just checked out your fork and gave it a try ... when inserting the element, there is an error regarding a missing labview dll (see screenshot) ScreenHunter_566 Nov  23 02 44

When pressing "Update channel info" brainbay crashes. The output combo boxes do not show any values. Is this because of the missing hardware ?

DennyYJHan commented 4 years ago

just checked out your fork and gave it a try ... when inserting the element, there is an error regarding a missing labview dll (see screenshot) ScreenHunter_566 Nov 23 02 44

When pressing "Update channel info" brainbay crashes. The output combo boxes do not show any values. Is this because of the missing hardware ?

Hi Chris,

The error indicates that the dll wasn't loaded properly (hence the crash afterwards). I guess it may be due to the path wasn't correctly assigned.

The path is assigned on line 21 in biosemi.cpp as the following -

define BIOSEMI_DLL "BioSemi\DLL\Win32\Labview_DLL.dll"

Does the path look right to you? This is where I guess the issue is. I wasn't able to test this as for some reasons I can't compile a release build. But the debug build works fine with the path assignment.

Please feel free to let me know if there's anything I may be able to help. Thanks.

Best, Denny

ChrisVeigl commented 4 years ago

i can confirm that the .dll-path is the problem. when i copy the lib/biosemi folder (and subfolders) to the bin folder (where the .exe is) the dll is found. what about moving the dlls to bin/biosemi and keeping .lib/.h in the lib folder ? not sure if we need the linux / mac versions ...

DennyYJHan commented 4 years ago

i can confirm that the .dll-path is the problem. when i copy the lib/biosemi folder (and subfolders) to the bin folder (where the .exe is) the dll is found. what about moving the dlls to bin/biosemi and keeping .lib/.h in the lib folder ? not sure if we need the linux / mac versions ...

Hi Chris, Thanks for confirming this. Yes, moving the dll to bin/biosemi sounds good to me. The rests of the files can be left in the lib folder or simply deleted as they are not referenced to the object, just for completeness. Please feel free to let me know how it goes and if I can do anything to help the merge. Thanks Chris.

Best, Denny