Skip to content

Commit

Permalink
Use modelName instead of gcs in grtfmi_make_rtw_hook.m (#414)
Browse files Browse the repository at this point in the history
fixes #409
  • Loading branch information
t-sommer authored Apr 28, 2023
1 parent cdc919a commit 7438622
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 7438622

Please sign in to comment.