@@ -230,15 +230,17 @@ const obciRadioCmdBaudRateSetFast = 0x06;
230
230
const obciRadioCmdSystemStatus = 0x07 ;
231
231
232
232
/** Possible number of channels */
233
+ const obciNumberOfChannelsCyton = 8 ;
233
234
const obciNumberOfChannelsDaisy = 16 ;
234
- const obciNumberOfChannelsDefault = 8 ;
235
+ const obciNumberOfChannelsDefault = obciNumberOfChannelsCyton ;
235
236
const obciNumberOfChannelsGanglion = 4 ;
236
237
237
238
/** Possible OpenBCI board types */
238
239
const obciBoardCyton = 'cyton' ;
239
240
const obciBoardDaisy = 'daisy' ;
240
241
const obciBoardDefault = 'default' ;
241
242
const obciBoardGanglion = 'ganglion' ;
243
+ const obciBoardNone = 'none' ;
242
244
243
245
/** Possible Simulator Line Noise injections */
244
246
const obciSimulatorLineNoiseHz60 = '60Hz' ;
@@ -455,14 +457,14 @@ const obciGanglionPacket19Bit = {
455
457
dataStart : 1 ,
456
458
dataStop : 20
457
459
} ;
458
- const obciGanglionMCP3912Gain = 1 .0; // assumed gain setting for MCP3912. NEEDS TO BE ADJUSTABLE JM
460
+ const obciGanglionMCP3912Gain = 51 .0; // assumed gain setting for MCP3912. NEEDS TO BE ADJUSTABLE JM
459
461
const obciGanglionMCP3912Vref = 1.2 ; // reference voltage for ADC in MCP3912 set in hardware
460
462
const obciGanglionPrefix = 'Ganglion' ;
461
463
const obciGanglionSyntheticDataEnable = 't' ;
462
464
const obciGanglionSyntheticDataDisable = 'T' ;
463
465
const obciGanglionImpedanceStart = 'z' ;
464
466
const obciGanglionImpedanceStop = 'Z' ;
465
- const obciGanglionScaleFactorPerCountVolts = obciGanglionMCP3912Vref / ( 8388607.0 * obciGanglionMCP3912Gain * 1.5 * 51.0 ) ;
467
+ const obciGanglionScaleFactorPerCountVolts = obciGanglionMCP3912Vref / ( 8388607.0 * obciGanglionMCP3912Gain * 1.5 ) ;
466
468
467
469
/** Simblee */
468
470
const simbleeUuidService = 'fe84' ;
@@ -483,6 +485,11 @@ const obciNobleEmitterScanStop = 'scanStop';
483
485
const obciNobleEmitterStateChange = 'stateChange' ;
484
486
const obciNobleStatePoweredOn = 'poweredOn' ;
485
487
488
+ /** Protocols */
489
+ const obciProtocolBLE = "ble" ;
490
+ const obciProtocolSerial = "serial" ;
491
+ const obciProtocolWifi = "wifi" ;
492
+
486
493
module . exports = {
487
494
/** Turning channels off */
488
495
OBCIChannelOff1 : obciChannelOff1 ,
@@ -877,6 +884,7 @@ module.exports = {
877
884
/** Triggers */
878
885
OBCITrigger : obciTrigger ,
879
886
/** Possible number of channels */
887
+ OBCINumberOfChannelsCyton : obciNumberOfChannelsCyton ,
880
888
OBCINumberOfChannelsDaisy : obciNumberOfChannelsDaisy ,
881
889
OBCINumberOfChannelsDefault : obciNumberOfChannelsDefault ,
882
890
OBCINumberOfChannelsGanglion : obciNumberOfChannelsGanglion ,
@@ -885,12 +893,16 @@ module.exports = {
885
893
OBCIBoardDaisy : obciBoardDaisy ,
886
894
OBCIBoardDefault : obciBoardDefault ,
887
895
OBCIBoardGanglion : obciBoardGanglion ,
896
+ OBCIBoardNone : obciBoardNone ,
888
897
numberOfChannelsForBoardType : boardType => {
889
898
switch ( boardType ) {
890
899
case obciBoardDaisy :
891
900
return obciNumberOfChannelsDaisy ;
892
901
case obciBoardGanglion :
893
902
return obciNumberOfChannelsGanglion ;
903
+ case obciBoardNone :
904
+ return 0 ;
905
+ case obciBoardCyton :
894
906
default :
895
907
return obciNumberOfChannelsDefault ;
896
908
}
@@ -1165,7 +1177,11 @@ module.exports = {
1165
1177
isPeripheralGanglion,
1166
1178
commandSampleRateForCmdCyton,
1167
1179
commandSampleRateForCmdGanglion,
1168
- commandBoardModeForMode
1180
+ commandBoardModeForMode,
1181
+ /** Protocols */
1182
+ OBCIProtocolBLE : obciProtocolBLE ,
1183
+ OBCIProtocolSerial : obciProtocolSerial ,
1184
+ OBCIProtocolWifi : obciProtocolWifi
1169
1185
} ;
1170
1186
1171
1187
/**
@@ -1319,7 +1335,7 @@ function sampleRateSetter (boardType, sampleRate) {
1319
1335
sampleRate = Math . floor ( sampleRate ) ;
1320
1336
1321
1337
let func ;
1322
- if ( boardType === obciBoardCyton ) {
1338
+ if ( boardType === obciBoardCyton || boardType === obciBoardDaisy ) {
1323
1339
func = commandSampleRateForCmdCyton ;
1324
1340
} else if ( boardType === obciBoardGanglion ) {
1325
1341
func = commandSampleRateForCmdGanglion ;
0 commit comments