@@ -56,6 +56,8 @@ function clearPersonalSettings()
5656 ipAddress {mustBeTextScalar } = ' ' ;
5757 end
5858
59+ toolboxPath = fileparts(which(mfilename ));
60+
5961 % Initialize toolbox settings
6062 s = settings ;
6163
@@ -81,6 +83,16 @@ function clearPersonalSettings()
8183 ipAddress = s .bossdeviceAPI .TargetSettings .TargetIPAddress .FactoryValue ;
8284 end
8385
86+ % Check and enable built-in Speedgoat dependencies
87+ if ~exist(' updateSGtools.p' ,' file' )
88+ addpath(fullfile(toolboxPath ,' dependencies' ,' sg' ,matlabRelease .Release ));
89+ elseif exist(' speedgoat' ,' file' )
90+ % Using own full installation of Speedgoat I/O Blockset
91+ % fprintf('Using own full installation of Speedgoat I/O Blockset v%s.\n',speedgoat.version);
92+ else
93+ error(' Speedgoat dependencies not found. Please search out to technical support.' );
94+ end
95+
8496 % Use default target if not passing any input argument
8597 tgs = slrealtime .Targets ;
8698 if ~contains(tgs .getTargetNames ,targetName ,' IgnoreCase' ,true )
@@ -98,7 +110,6 @@ function clearPersonalSettings()
98110 end
99111
100112 % Search firmware binary and prompt user if not found in MATLAB path
101- toolboxPath = fileparts(which(mfilename ));
102113 firmwareSharePath = fullfile(toolboxPath ,' dependencies' ,' firmware' ,matlabRelease .Release ,[obj .appName ,' .mldatx' ]);
103114
104115 if exist([obj .appName ,' .mldatx' ]," file" )
0 commit comments