New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

openbci

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openbci - npm Package Compare versions

Comparing version 1.4.2 to 1.4.4

examples/python/handoff.py

15

changelog.md

@@ -0,1 +1,16 @@

# 1.4.4
### New Features
* Set max number of channels for the board to use with `.setMaxChannels()` see readme.md
* Set the core info object that drives the module with `.setInfoForBoardType()` see readme.md
* Get info for the core obhect that drives the module with `.getInfo()` see readme.md
### Work In Progress
* Bug where daisy would sometimes not be recognized which destroyed all data.
# 1.4.3
### New examples
* Add example of node to python
# 1.4.2

@@ -2,0 +17,0 @@

@@ -32,2 +32,3 @@ /**

/** Unable to auto find OpenBCI board */
console.log('Unable to auto find OpenBCI board');
}

@@ -90,1 +91,39 @@ });

ourBoard.on('sample', sampleFunc);
function exitHandler (options, err) {
if (options.cleanup) {
if (verbose) console.log('clean');
/** Do additional clean up here */
}
if (err) console.log(err.stack);
if (options.exit) {
if (verbose) console.log('exit');
ourBoard.disconnect().catch(console.log);
}
}
if (process.platform === "win32") {
const rl = require("readline").createInterface({
input: process.stdin,
output: process.stdout
});
rl.on("SIGINT", function () {
process.emit("SIGINT");
});
}
// do something when app is closing
process.on('exit', exitHandler.bind(null, {
cleanup: true
}));
// catches ctrl+c event
process.on('SIGINT', exitHandler.bind(null, {
exit: true
}));
// catches uncaught exceptions
process.on('uncaughtException', exitHandler.bind(null, {
exit: true
}));

3

package.json
{
"name": "openbci",
"version": "1.4.2",
"version": "1.4.4",
"description": "The official Node.js SDK for the OpenBCI Biosensor Board.",

@@ -39,2 +39,3 @@ "main": "openBCIBoard",

"sinon": "^1.17.2",
"sinon-as-promised": "^4.0.2",
"sinon-chai": "^2.8.0",

@@ -41,0 +42,0 @@ "snazzy": "^5.0.0"

@@ -17,2 +17,4 @@ [![Stories in Ready](https://badge.waffle.io/OpenBCI/OpenBCI_NodeJS.png?label=ready&title=Ready)](https://waffle.io/OpenBCI/OpenBCI_NodeJS)

Python researcher or developer? Check out how easy it is to [get access to the entire API in the Python example](examples/python)!
### Table of Contents:

@@ -77,2 +79,4 @@ ---

Python researcher or developer? Check out how easy it is to [get access to the entire API in the Python example](examples/python)!
### <a name="general-overview"></a> General Overview:

@@ -515,2 +519,8 @@

### <a name="method-get-info"></a> .getInfo()
Get the core info object. It's the object that actually drives the parsing of data.
**_Returns_** Object - {{boardType: string, sampleRate: number, firmware: string, numberOfChannels: number, missedPackets: number}}
### <a name="method-get-settings-for-channel"></a> .getSettingsForChannel(channelNumber)

@@ -843,2 +853,30 @@

### <a name="method-set-info-for-board-type"></a> .setInfoForBoardType(boardType)
Set the info property for board type.
**Note: This has the potential to change the way data is parsed**
**_boardType_**
A String indicating the number of channels.
* `default` - Default board: Sample rate is `250Hz` and number of channels is `8`.
* `daisy` - Daisy board: Sample rate is `125Hz` and number of channels is `16`.
**_Returns_** a promise, fulfilled if the command was sent to the write queue. Rejects if input is not `8` or `16`.
### <a name="method-set-max-channels"></a> .setMaxChannels(numberOfChannels)
Sends a command to the board to set the max channels. If you have a daisy attached, calling this function will re-sniff for the daisy ADS and attempt to use it.
**_numberOfChannels_**
A Number indicating the number of channels.
* `8` - Default number of channels.
* `16` - Daisy number of channels.
**_Returns_** a promise, fulfilled if the command was sent to the write queue. Rejects if input is not `8` or `16`.
### <a name="method-simulator-enable"></a> .simulatorEnable()

@@ -845,0 +883,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc