--- /dev/null
+% RPP_GET_BLOCKS Returns a 'list' of blocks supported by currecntly configured target.
+
+% Copyright (C) 2013-2015 Czech Technical University in Prague
+%
+% Authors:
+% - Michal Sojka <sojkam1@fel.cvut.cz>
+%
+% This document contains proprietary information belonging to Czech
+% Technical University in Prague. Passing on and copying of this
+% document, and communication of its contents is not permitted
+% without prior written authorization.
+%
+
+function blocks = rpp_get_blocks()
+ target = rpp_get_target();
+ if strcmp(target, 'rm48_hdk') || strcmp(target, 'tms570_hdk'),
+ blocks = {
+ 'rpp_can_rx',
+ 'rpp_can_setup',
+ 'rpp_can_tx',
+ 'rpp_gio_in',
+ 'rpp_gio_out',
+ 'rpp_hdk_ain',
+ 'rpp_overrun',
+ 'rpp_sci_cfg',
+ 'rpp_sci_printf',
+ 'rpp_sci_rx',
+ 'rpp_sci_tx'
+ };
+ end
+end
else
op = 'update';
end
-open('rpp_lib');
-set_param('rpp_lib', 'Lock', 'off');
-blocks = find_system('rpp_lib', 'Type', 'block');
+block_libs = rpp_get_blocks();
updated = 0;
-for i=1:length(blocks),
- block = blocks{i};
- params = get_param(block, 'ObjectParameters');
- fields = fieldnames(params);
+for i=1:length(block_libs),
+ block_lib = block_libs{i};
+ open_system(block_lib);
+ set_param(block_lib, 'Lock', 'off');
+ blocks = find_system(block_lib, 'Type', 'block');
+ for j=1:length(blocks),
+ block = blocks{j};
+ params = get_param(block, 'ObjectParameters');
+ fields = fieldnames(params);
- disp(['Processing ' blocks{i}]);
-
- updated = updated + process_param(op, block, 'MaskType', '--masktype');
- updated = updated + process_param(op, block, 'MaskDescription', '--html --printdesc');
- updated = updated + process_param(op, block, 'MaskPromptString', '--maskpromptstring');
- updated = updated + process_param(op, block, 'MaskHelp', '--html --printhelp');
- updated = updated + process_param(op, block, 'Name', '--name'); % Name must be changed last!!!
+ disp(['Processing ' blocks{j}]);
+ updated = updated + process_param(op, block, 'MaskType', '--masktype');
+ updated = updated + process_param(op, block, 'MaskDescription', '--html --printdesc');
+ updated = updated + process_param(op, block, 'MaskPromptString', '--maskpromptstring');
+ updated = updated + process_param(op, block, 'MaskHelp', '--html --printhelp');
+ updated = updated + process_param(op, block, 'Name', '--name'); % Name must be changed last!!!
+ end
+ set_param(block_lib, 'Lock', 'on');
+ close_system(block_lib);
end
-set_param('rpp_lib', 'Lock', 'on');
function output = run_doc_parse(fn, opts)
% We have to unset Matlab's library path in order to run pandoc - it
fprintf(f, '%s', new);
fclose(f);
- [rc, diff] = system(['git diff --no-index --word-diff=plain ' fnold ' ' fnnew]);
+ [rc, diff] = system(['git --no-pager diff --no-index --word-diff=plain ' fnold ' ' fnnew]);
disp(diff);
delete(fnold);
delete(fnnew);