мелкие парвки
- поддержка символа '\' вкладке Wrapper User Code - исправлены дефайны OFFSET_IN/OUT_ARRAY - убрана конфигурация портов во время подгрузки конфигурации периферии - исправлены подписи таблицы (Alias почему-то не записывался)
This commit is contained in:
parent
d983f2525a
commit
df30570d4a
@ -8,13 +8,13 @@ classdef customtable
|
||||
tableControl = mask.getDialogControl(table_name);
|
||||
tableParameter = mask.getParameter(table_name);
|
||||
nCols = tableControl.getNumberOfColumns;
|
||||
if nCols > 0
|
||||
for i = 1:nCols
|
||||
tableControl.removeColumn(1);
|
||||
end
|
||||
end
|
||||
column = tableControl.addColumn(Name='Title', Type='edit');
|
||||
tableControl.Sortable = 'on';
|
||||
% if nCols > 0
|
||||
% for i = 1:nCols
|
||||
% tableControl.removeColumn(1);
|
||||
% end
|
||||
% end
|
||||
% column = tableControl.addColumn(Name='Title', Type='edit');
|
||||
% tableControl.Sortable = 'on';
|
||||
column.Name = tableParameter.Alias;
|
||||
end
|
||||
|
||||
|
@ -74,6 +74,7 @@ classdef editCode
|
||||
end
|
||||
|
||||
% Формируем новую секцию с нужным текстом
|
||||
% newText = strrep(newText, '\', '\\'); % экранируем для корректной вставки
|
||||
replacement = sprintf('%s START\n%s\n%s END', sectionName, newText, sectionName);
|
||||
|
||||
% Заменяем всю найденную секцию на новую
|
||||
|
@ -48,7 +48,7 @@ classdef mcuMask
|
||||
table_names = {'srcTable', 'incTable'};
|
||||
for k = 1:numel(table_names)
|
||||
table_name = table_names{k};
|
||||
% customtable.format(table_name);
|
||||
customtable.format(table_name);
|
||||
end
|
||||
% запись описания блока
|
||||
textDesc = ['Блок для настройки параметров симуляции микроконтроллера. ' newline ...
|
||||
@ -178,6 +178,7 @@ classdef mcuMask
|
||||
newBody = get_param(block, 'wrapperCode');
|
||||
code = fileread(filename);
|
||||
code = regexprep(code, '\r\n?', '\n');
|
||||
newBody = strrep(newBody, '\', '\\');
|
||||
code = editCode.insertSection(code, section, newBody);
|
||||
% else
|
||||
% % Обновляем тело функции
|
||||
|
@ -190,10 +190,10 @@ classdef mcuPorts
|
||||
|
||||
for i = 1:n
|
||||
if i == 1
|
||||
lines{end+1} = '#define OFFSET_ARRAY_1 0';
|
||||
lines{end+1} = sprintf('#define OFFSET_%s_ARRAY_1 0', upperPrefix);
|
||||
else
|
||||
lines{end+1} = sprintf('#define OFFSET_ARRAY_%d (OFFSET_ARRAY_%d + %s_PORT_%d_WIDTH)', ...
|
||||
i, i - 1, upper(portPrefixes{i - 1}), i - 1);
|
||||
lines{end+1} = sprintf('#define OFFSET_%s_ARRAY_%d (OFFSET_%s_ARRAY_%d + %s_PORT_%d_WIDTH)', ...
|
||||
upperPrefix, i, upperPrefix, i - 1, upper(portPrefixes{i - 1}), i - 1);
|
||||
end
|
||||
end
|
||||
newAuto = strjoin(lines, newline);
|
||||
@ -251,7 +251,7 @@ classdef mcuPorts
|
||||
if i == n
|
||||
comma = '';
|
||||
end
|
||||
lines{end+1} = sprintf(' OFFSET_ARRAY_%d%s', i, comma);
|
||||
lines{end+1} = sprintf(' OFFSET_%s_ARRAY_%d%s', upperPrefix, i, comma);
|
||||
end
|
||||
lines{end+1} = '};';
|
||||
lines{end+1} = '';
|
||||
|
@ -68,9 +68,6 @@ function res = mexing(compile_mode)
|
||||
config = periphConfig.update_config(blockPath, config);
|
||||
periphConfig.write_config(config);
|
||||
periphConfig.update(blockPath, config);
|
||||
% Порты S-Function
|
||||
mcuPorts.write();
|
||||
% set_param(gcb, 'consoleOutput', 'Peripheral configuration file loaded. Re-open Block Parameters');
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -399,7 +399,6 @@ classdef periphConfig
|
||||
'Container', periphName ...
|
||||
);
|
||||
|
||||
param.Alias = def.Def;
|
||||
param.Evaluate = 'off';
|
||||
|
||||
if def.NewRow
|
||||
@ -407,6 +406,7 @@ classdef periphConfig
|
||||
else
|
||||
param.DialogControl.Row = 'current';
|
||||
end
|
||||
param.Alias = def.Def;
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user