Skip to content
Snippets Groups Projects
Commit d1ca0814 authored by Maximilian Schnabel's avatar Maximilian Schnabel
Browse files

setProperties() now throws a warning when using unknown parameters

parent d47c379f
No related branches found
No related tags found
2 merge requests!7Keep going if mountpoint exists (persistent),!6Docs NXT compatibility
......@@ -768,6 +768,16 @@ classdef Motor < MaskedHandle & dynamicprops
% Parse...
p.parse(varargin{:});
if ~isempty(fieldnames(p.Unmatched))
A = fieldnames(p.Unmatched);
warn = 'The following input parameters were invalid: ';
warn = [warn A{1}];
for i = 2:length(A)
warn = [warn ', ' A{i}];
end
warning(warn)
end
% Set properties
if motor.init
motor.port = p.Results.port;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment