Skip to content
Snippets Groups Projects
Commit 6b21a65a authored by Federico Felici's avatar Federico Felici
Browse files

Bugfix

parent 979af079
No related branches found
No related tags found
No related merge requests found
......@@ -194,7 +194,7 @@ classdef SCDclass_algo
% as an optional third argument of addtunparamstruct
% method
dict = Simulink.data.dictionary.open(obj.getdatadictionary);
DD = getSection(dict, 'Design Data');
designDataobj = getSection(dict, 'Design Data');
for ii=1:numel(obj.exportedtps)
if ~isempty(obj.exportedtpsdefaults{ii})
% get current value of parameters from the function
......@@ -211,8 +211,8 @@ classdef SCDclass_algo
P.CoderInfo.StorageClass='ExportedGlobal';
% updates default tunable parameters structure in data dictionary
tmplname = sprintf('%s_tmpl',obj.exportedtps{ii});
if DD.exist(tmplname)
oldEntry = DD.getEntry(tmplname);
if designDataobj.exist(tmplname)
oldEntry = designDataobj.getEntry(tmplname);
if isequal(oldEntry.getValue.Value,P.Value)
fprintf('%s: keep old template %s since not changed\n',obj.getname,tmplname);
continue;
......@@ -223,7 +223,7 @@ classdef SCDclass_algo
end
else
fprintf(' %s: added new %s\n',obj.getname, tmplname);
DD.addEntry(tmplname,P);
designDataobj.addEntry(tmplname,P);
end
end
end
......@@ -485,9 +485,9 @@ classdef SCDclass_algo
end
end
function changed = replaceorcreateddentry(obj,dd,entry,value)
if dd.exist(entry)
oldEntry = dd.getEntry(entry);
function changed = replaceorcreateddentry(obj,designDataObj,entry,value)
if designDataObj.exist(entry)
oldEntry = designDataObj.getEntry(entry);
if isequal(oldEntry.getValue,value)
fprintf('%s: keep old value of %s since not changed\n',obj.getname,entry);
changed = false;
......@@ -498,7 +498,7 @@ classdef SCDclass_algo
end
else
fprintf(' %s: added new %s\n',obj.getname, entry);
DD.addEntry(entry,value);
designDataObj.addEntry(entry,value);
changed = true;
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment