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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
strategy:
fail-fast: false # Run with every MATLAB version independently
matrix:
matlabVer: [R2024b, R2025b] # List of MATLAB releases to test
matlabVer: [R2024b, R2025b, R2026a] # List of MATLAB releases to test
runs-on: matlab

# Steps represent a sequence of tasks that will be executed as part of the job
Expand Down
3 changes: 2 additions & 1 deletion buildUtilities/setupAddon.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ function setupAddon(~)

if batchStartupOptionUsed && ~isMATLABReleaseOlderThan("R2024b","release",8) && isMATLABReleaseOlderThan("R2025a")
matlab.addons.install(fullfile(getenv('USERPROFILE'),'Downloads','Advanced.Logger.for.MATLAB.2.0.2.mltbx'));
matlab.addons.install(fullfile(getenv('USERPROFILE'),'Downloads','streaming-instrumentation-utils-SLRT-v1.0.0.mltbx'));
end

end
end
6 changes: 6 additions & 0 deletions buildUtilities/testTask.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,10 @@
testcases(ismember(testcases,{...
'demo_mu_rhythm_phase_triggering.m'})) = [];

if ~isMATLABReleaseOlderThan('R2026a')
% Example fails due to getBufferedData. To be replaced by new asyncBuffer object
testcases(ismember(testcases,{...
'demo_phase_prediction_error_simple.m'})) = [];
end

end
6 changes: 5 additions & 1 deletion buildUtilities/updateSGdeps.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

% Figure out list of Speedgoat tools to copy
sgTools = dir(fullfile(sgDefaultPath,'sg_resources'));
sgTools = sgTools(~[sgTools.isdir]);
if isMATLABReleaseOlderThan('R2026a')
sgTools = sgTools(~[sgTools.isdir]);
else
sgTools = sgTools(ismember({sgTools.name},{'antelope_rtos'}));
end

% Create dependencies folder in local toolbox
destFolder = fullfile(projObj.RootFolder,'toolbox/dependencies/sg');
Expand Down
17 changes: 12 additions & 5 deletions tests/commonSetupTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@ function setupBossdevice(testCase)
testCase.bd = bossdevice;

testCase.assertThat(@() bossapi.tg.pingTarget(testCase.bd.targetObject),...
Eventually(IsTrue,"WithTimeoutOf",60),'Should wait until bossdevice has rebooted.');
Eventually(IsTrue,"WithTimeoutOf",60),'Target is not reachable at test class setup.');

% Wait additional seconds since the target may respond ping but not be ready yet
pause(testCase.waitTimeReboot);
% Boot on QNX or Linux based on current release
bossapi.tg.setBootForCurrentRelease("TargetObject",testCase.bd.targetObject,"AutoReboot",true);
pause(10); % Must wait a bit because reboot command is not immediate
testCase.assertThat(@() bossapi.tg.pingTarget(testCase.bd.targetObject),...
Eventually(IsTrue,"WithTimeoutOf",60),'Target is not available after setting boot OS.');

% Update target and wait until it has rebooted
testCase.bd.targetObject.update;

testCase.assertThat(@() bossapi.tg.pingTarget(testCase.bd.targetObject),...
Eventually(IsTrue,"WithTimeoutOf",60),'Should wait until bossdevice has rebooted.');
Eventually(IsTrue,"WithTimeoutOf",60),'Target is not available after updating.');

% Wait additional seconds since the target may respond ping but not be ready yet
pause(testCase.waitTimeReboot);
Expand All @@ -56,9 +59,13 @@ function rebootTarget(testCase)
import matlab.unittest.constraints.Eventually
import matlab.unittest.constraints.IsTrue

if ~isempty(testCase.bd) && testCase.bd.isConnected
if ~isempty(testCase.bd) && testCase.bd.isInitialized
disp('Rebooting bossdevice to teardown test class.');
testCase.bd.reboot;

if ~isMATLABReleaseOlderThan("R2026a")
pause(testCase.waitTimeReboot);
end
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion toolbox/examples/demo_phase_prediction_error_simple.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
alpha_ip = sigData{1}.data;
disp('Done.');

% Compensante offset in instantaneous predicted phase
% Compensate offset in instantaneous predicted phase
numSamples = bd.alpha.offset_samples;
assert(numSamples >= 1);

Expand Down
10 changes: 7 additions & 3 deletions toolbox/src/bossdevice.m
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,11 @@ function initialize(obj)
% Load firmware on the bossdevice if not loaded yet
if ~obj.targetObject.isLoaded
% Set Ethernet IP in secondary interface
bossapi.tg.setEthernetInterface(obj.targetObject,'wm1','192.168.200.5/24');
if isMATLABReleaseOlderThan("R2026a")
bossapi.tg.setEthernetInterface(obj.targetObject,'wm1','192.168.200.5/24');
else
bossapi.tg.setEthernetInterface(obj.targetObject,'enp4s0','192.168.200.5/24');
end

obj.logObj.info('Loading application "%s" on "%s"...',obj.appName,obj.targetObject.TargetSettings.name);
obj.targetObject.load(obj.firmwareFilepath);
Expand Down Expand Up @@ -605,11 +609,11 @@ function restoreInstrument(obj)
obj bossdevice
signalName {mustBeTextScalar} % Signal to log in buffer
bufferLen (1,1) {mustBePositive} % Buffer length in seconds
options.ArrayIndex {mustBeVector,mustBeInteger} = 1; % If signal is multidimensional only buffers the indicated element(s)
options.ArrayIndex {mustBeVector(options.ArrayIndex,"allow-all-empties"),mustBeInteger} = [];
options.SignalProps {mustBeText} = {}; % Additional signal properties like bus element name or decimation
end

% Initializie streamingAsyncBuffer object
% Initialize streamingAsyncBuffer object
bufObj = slrtStreamingUtils.streamingAsyncBuffer(signalName,'',bufferLen,...
'AppName',obj.firmwareFilepath,'ArrayIndex',options.ArrayIndex,'SignalProps',options.SignalProps);
end
Expand Down
Loading