Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions tests/commonSetupTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,4 @@ function rebootTarget(testCase)
end
end

methods (TestMethodTeardown)
function clearBossdeviceObj(testCase)
if ~isempty(testCase.bd) && testCase.bd.isConnected
testCase.bd.stop;
end
end
end

end
6 changes: 6 additions & 0 deletions tests/exampleTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@ function runExampleScript(~, exName)
function closeFigures(~)
close all;
end

function clearBossdeviceObj(testCase)
if ~isempty(testCase.bd) && testCase.bd.isConnected
testCase.bd.stop;
end
end
end
end
2 changes: 1 addition & 1 deletion toolbox/dependencies/+bossapi
19 changes: 19 additions & 0 deletions toolbox/src/bossdevice.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
appName = 'bossdevice_main';
end

events
MarkerReceived
end

methods (Static)
function clearPersonalSettings()
s = settings;
Expand All @@ -74,6 +78,17 @@ function initOscillationProps(obj)
obj.alpha = bossdevice_oscillation(obj.targetObject, 'alpha', obj.logObj);
obj.beta = bossdevice_oscillation(obj.targetObject, 'beta', obj.logObj);
end

function addCustomInst(obj)
% Initialize instrument object
instObj = slrealtime.Instrument(obj.firmwareFilepath);

% Remote marker
instObj.connectCallback(@(src, event) bossapi.inst.notifyMarkerReceived(obj,src,event,{'biosignal','BusElement','MRK'}));

% Add instrument objects to target
obj.targetObject.addInstrument(instObj);
end
end

methods
Expand Down Expand Up @@ -266,6 +281,9 @@ function initialize(obj)

% Figure out some oscillation values
initOscillationProps(obj);

% Add custom instrumentation
obj.addCustomInst;
end

function start(obj)
Expand Down Expand Up @@ -579,6 +597,7 @@ function restoreInstrument(obj)
hInst = slrealtime.Instrument(obj.firmwareFilepath);
hInst.addInstrumentedSignals;
obj.addInstrument(hInst);
obj.addCustomInst;
end

function bufObj = createAsyncBuffer(obj, signalName, bufferLen, options)
Expand Down
Loading