Skip to content
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

Tracking: Ganglion support #80

Open
andrewjaykeller opened this issue Aug 28, 2016 · 6 comments
Open

Tracking: Ganglion support #80

andrewjaykeller opened this issue Aug 28, 2016 · 6 comments
Assignees

Comments

@andrewjaykeller
Copy link

andrewjaykeller commented Aug 28, 2016

Adds support for ganglion.

@andrewjaykeller
Copy link
Author

@baffo32 any thoughts on how to properly bring in ganglion code to the repo? See https://github.com/aj-ptw/simblee-js/blob/simulator/openBCIGanglion.js for the current node driver. There is going to have to be some major test writing to get coverage. I think there needs to be an index.js file to produce a work flow that looks like

const ganglion = require('openbci').ganglion;
const board32bit = require('openbci').board32bit

I think they [openbci] are working on a name for the 32 bit board, but still the 32bit board with import serialport while ganglion would only import noble.

@baffo32
Copy link
Contributor

baffo32 commented Oct 21, 2016

Ganglion looks very different at first glance. I'd definitely at least separate the implementations into distinct, separate files; separate folders if openbci might be making more board variants.

The two different drivers should provide the same function names as each other, taking the same function arguments, when they have functions that do similar things. They should dispatch the same set of events.

(Later somebody could write a single 'openbci' driver which calls out to the others to handle all boards, and the user wouldn't have to care what kind of board was connected at all.)

If any code would be duplicated, it should be pulled out into a common base class or utilities file, so it may be re-used.

I think it could be good to handle very different firmware versions as separate drivers, too.

@andrewjaykeller
Copy link
Author

I have started writing this code over at my own local branch. lots of fun! so many tests to write though.

@andrewjaykeller
Copy link
Author

Looking to do something like this to remove the factory from the module.

https://github.com/EmergingTechnologyAdvisors/node-serialport/blob/master/lib/serialport.js

@andrewjaykeller andrewjaykeller self-assigned this Nov 3, 2016
@andrewjaykeller
Copy link
Author

Here is what is looks like to use the ganglion code: https://github.com/OpenBCI/OpenBCI_Ganglion_Electron/blob/master/src/app.js

@andrewjaykeller
Copy link
Author

Update: This will not be merged with this repo until the Ganglion driver is stable. For the ganglion code please see here:

https://github.com/OpenBCI/OpenBCI_NodeJS_Ganglion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants