File tree Expand file tree Collapse file tree 11 files changed +42
-33
lines changed Expand file tree Collapse file tree 11 files changed +42
-33
lines changed Original file line number Diff line number Diff line change @@ -52,3 +52,5 @@ jspm_packages
52
52
.idea
53
53
.idea /* .xml
54
54
.DS_Store
55
+
56
+ dist
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 7
7
< title > OpenBCI Utilities</ title >
8
8
</ head >
9
9
< body >
10
- < button id ="connect ">
11
- Print something
12
- </ button >
13
10
< pre > See data in the console</ pre >
14
- < script src ="../../dist/openbciutilities .var.js "> </ script >
11
+ < script src ="../../dist/openbci-utilities .var.js "> </ script >
15
12
< script src ="./index.js "> </ script >
16
13
</ body >
17
14
</ html >
Original file line number Diff line number Diff line change
1
+
2
+ console . log ( OpenBCIUtilities ) ;
Original file line number Diff line number Diff line change
1
+
2
+ const OpenBCIUtilities = require ( '../..' ) ;
3
+ const { Constansts, Debug, Utilities } = require ( '../..' ) ;
4
+
5
+ console . log ( 'OpenBCIUtilities' , OpenBCIUtilities ) ;
6
+ console . log ( 'Constansts' , Constansts ) ;
7
+ console . log ( 'Debug' , Debug ) ;
8
+ console . log ( 'Utilities' , Utilities ) ;
Original file line number Diff line number Diff line change 2
2
"name" : " openbci-utilities" ,
3
3
"version" : " 0.3.0" ,
4
4
"description" : " The official utility package of Node.js SDK for the OpenBCI Biosensor Boards." ,
5
- "main" : " dist/openbciutilities .umd.js" ,
5
+ "main" : " dist/openbci-utilities .umd.js" ,
6
6
"module" : " src/index.js" ,
7
7
"scripts" : {
8
8
"build" : " webpack" ,
12
12
"test-lint" : " semistandard | snazzy" ,
13
13
"test-cov" : " istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec && codecov"
14
14
},
15
- "files" : [" dist" ],
15
+ "files" : [
16
+ " dist"
17
+ ],
16
18
"keywords" : [
17
19
" openbci" ,
18
20
" openbci-node" ,
Original file line number Diff line number Diff line change 1
- module . exports . Constants = require ( './openBCIConstants' ) ;
2
- module . exports . Debug = require ( './openBCIDebug' ) ;
3
- module . exports . Utilities = require ( './openBCIUtilities' ) ;
1
+ import Constants from './openBCIConstants' ;
2
+ import * as Debug from './openBCIDebug' ;
3
+ import Utilities from './openBCIUtilities' ;
4
+
5
+ export default {
6
+ Constants,
7
+ Debug,
8
+ Utilities
9
+ } ;
Original file line number Diff line number Diff line change 4
4
* OpenBCI Board
5
5
*/
6
6
'use strict' ;
7
- const _ = require ( 'lodash' ) ;
8
- const Buffer = require ( 'buffer/' ) . Buffer ;
7
+ import _ from 'lodash' ;
8
+ import { Buffer } from 'buffer/' ;
9
9
10
10
/** Turning channels off */
11
11
const obciChannelOff1 = '1' ;
@@ -1276,7 +1276,6 @@ const constantsModule = {
1276
1276
OBCIRegisterQuerySizeCytonFirmwareV3 : obciRegisterQuerySizeCytonFirmwareV3 ,
1277
1277
OBCIRegisterQuerySizeCytonDaisyFirmwareV3 : obciRegisterQuerySizeCytonDaisyFirmwareV3
1278
1278
} ;
1279
- module . exports = constantsModule ;
1280
1279
1281
1280
/**
1282
1281
* @description To add a usability abstraction layer above channel setting commands. Due to the
@@ -1894,3 +1893,5 @@ function isPeripheralGanglion (peripheral) {
1894
1893
}
1895
1894
return false ;
1896
1895
}
1896
+
1897
+ export default constantsModule ;
Original file line number Diff line number Diff line change 1
- const Buffer = require ( 'buffer/' ) . Buffer ;
2
1
3
- module . exports = {
4
- debugBytes
5
- } ;
2
+ import { Buffer } from 'buffer/' ;
6
3
7
4
/**
8
5
* @description Output passed bytes on the console as a hexdump, if enabled
9
6
* @param prefix - label to show to the left of bytes
10
7
* @param data - bytes to output, a buffer or string
11
8
* @private
12
9
*/
13
- function debugBytes ( prefix , data ) {
10
+ export function debugBytes ( prefix , data ) {
14
11
if ( typeof data === 'string' ) data = new Buffer ( data ) ;
15
12
16
13
console . log ( 'Debug bytes:' ) ;
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
- const gaussian = require ( 'gaussian' ) ;
3
- const k = require ( './openBCIConstants' ) ;
4
- const StreamSearch = require ( 'streamsearch' ) ;
5
- const Buffer = require ( 'buffer/' ) . Buffer ;
6
- const _ = require ( 'lodash' ) ;
2
+
3
+ import gaussian from 'gaussian' ;
4
+ import k from './openBCIConstants' ;
5
+ import StreamSearch from 'streamsearch' ;
6
+ import { Buffer } from 'buffer/' ;
7
+ import _ from 'lodash' ;
7
8
8
9
/** Constants for interpreting the EEG data */
9
10
// Reference voltage for ADC in ADS1299.
@@ -946,8 +947,6 @@ function decompressDeltas19Bit (buffer) {
946
947
return receivedDeltas ;
947
948
}
948
949
949
- module . exports = utilitiesModule ;
950
-
951
950
function newImpedanceObject ( channelNumber ) {
952
951
return {
953
952
channel : channelNumber ,
@@ -2146,3 +2145,5 @@ function makeTailByteFromPacketType (type) {
2146
2145
function isStopByte ( byte ) {
2147
2146
return ( byte & 0xF0 ) === k . OBCIByteStop ;
2148
2147
}
2148
+
2149
+ export default utilitiesModule ;
You can’t perform that action at this time.
0 commit comments