Skip to content

Commit 231787c

Browse files
author
AJ Keller
committed
ADD: decompressedSamples and sendCounts
1 parent 41eed2e commit 231787c

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Diff for: src/constants.js

+10
Original file line numberDiff line numberDiff line change
@@ -1719,15 +1719,25 @@ function rawDataToSampleObjectDefault (numChannels) {
17191719
return {
17201720
accelArray: [0, 0, 0],
17211721
channelSettings: constantsModule.channelSettingsArrayInit(numChannels),
1722+
decompressedSamples: decompressedSamplesInit(numChannels),
17221723
lastSampleNumber: 0,
17231724
rawDataPacket: Buffer.alloc(33),
17241725
rawDataPackets: [],
17251726
scale: true,
1727+
sendCounts: false,
17261728
timeOffset: 0,
17271729
verbose: false
17281730
};
17291731
}
17301732

1733+
function decompressedSamplesInit (numChannels) {
1734+
let output = [];
1735+
for (let i = 0; i < 3; i++) {
1736+
output.push(new Array(numChannels));
1737+
}
1738+
return output;
1739+
}
1740+
17311741
/**
17321742
* Get's the command for sample rate Cyton
17331743
* @param sampleRate {Number} - The desired sample rate

Diff for: test/openBCIConstants-test.js

+1
Original file line numberDiff line numberDiff line change
@@ -1999,6 +1999,7 @@ describe('OpenBCIConstants', function () {
19991999
assert.equal('Z', k.OBCIGanglionImpedanceStop);
20002000
});
20012001
});
2002+
describe('')
20022003
describe('Byte Id', function () {
20032004
it('Uncompressed', function () {
20042005
assert.equal(0, k.OBCIGanglionByteIdUncompressed);

0 commit comments

Comments
 (0)