Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use modelName instead of gcs in grtfmi_make_rtw_hook.m #414

Merged
merged 1 commit into from
Apr 28, 2023
Merged
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
6 changes: 3 additions & 3 deletions grtfmi/grtfmi_make_rtw_hook.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function grtfmi_make_rtw_hook(hookMethod, modelName, rtwRoot, templateMakefile,
% create the archive directory (uncompressed FMU)
mkdir('FMUArchive');

template_dir = get_param(gcs, 'FMUTemplateDir');
template_dir = get_param(modelName, 'FMUTemplateDir');

% copy template files
if ~isempty(template_dir)
Expand All @@ -27,15 +27,15 @@ function grtfmi_make_rtw_hook(hookMethod, modelName, rtwRoot, templateMakefile,
return
end

if strcmp(get_param(gcs, 'GenCodeOnly'), 'on')
if strcmp(get_param(modelName, 'GenCodeOnly'), 'on')
return
end

pathstr = which('grtfmi.tlc');
[grtfmi_dir, ~, ~] = fileparts(pathstr);

% add model.png
if strcmp(get_param(gcs, 'AddModelImage'), 'on')
if strcmp(get_param(modelName, 'AddModelImage'), 'on')
% create an image of the model
print(['-s' modelName], '-dpng', fullfile('FMUArchive', 'model.png'));
else
Expand Down