olindgre 2ece01e1d7 Make powertrain-build not overlap with pybuild in site-packages
Change-Id: I7b59f3f04f0f787d35db0b9389f295bf1ad24f56
2024-09-17 10:25:04 +02:00

29 lines
701 B
Matlab

% Copyright 2024 Volvo Car Corporation
% Licensed under Apache 2.0.
function TF = modelConfiguredForTL(rootFolder, modelFolder, modelName)
% Function that checks if model is configured for TargetLink
% rootFolder: The root folder of the project
% modelName: Name of model
% ssp: project name
curr_dir = pwd;
cd([rootFolder '/' modelFolder]);
run(['./' modelName '_par.m']);
load_system(modelName);
TLDefineBlock = find_system(modelName, 'SearchDepth', 1, ...
'Name', 'TargetLink Main Dialog');
if isempty(TLDefineBlock)
TF = false;
else
TF = true;
end
% Close system without saving
close_system(modelName, 0)
cd(curr_dir);
end