diff --git a/source/EV3.m b/source/EV3.m index 0832ca49d3049d5c7148befe7fb378dff12e2e55..0ec3e5bc5c7553f806788781691541531640bc8d 100644 --- a/source/EV3.m +++ b/source/EV3.m @@ -452,7 +452,7 @@ classdef EV3 < MaskedHandle end methods (Access = private) % Private brick functions that are wrapped by dependent params - function varargout = handleCommand(ev3, commandHandle, varargin) + function varargout = handleCommand(ev3, command, varargin) % Execute a CommunicationInterface-method given as a handle % % As those methods have different, fixed numbers of output arguments, this quantity @@ -467,16 +467,16 @@ classdef EV3 < MaskedHandle end if ev3.debug - fprintf('(DEBUG) Sending %s\n', func2str(commandHandle)); + fprintf('(DEBUG) Sending %s\n', func2str(command)); end % Note: Arrg. MATLAB does not support nargout for class methods directly, so I have to % do this ugly workaround using strings. See % https://de.mathworks.com/matlabcentral/answers/96617-how-can-i-use-nargin-nargout-to-determine-the-number-of-input-output-arguments-of-an-object-method - nOut = nargout(strcat('CommunicationInterface>CommunicationInterface.', func2str(commandHandle))); + nOut = nargout(strcat('CommunicationInterface>CommunicationInterface.', func2str(command))); try - [varargout{1:nOut}] = commandHandle(ev3.commInterface, varargin{:}); + [varargout{1:nOut}] = command(ev3.commInterface, varargin{:}); catch ME %ev3.detectedCommError(ME.identifier, ME.message); if ~isempty(strfind(exceptionID, 'CommError')) diff --git a/source/Motor.m b/source/Motor.m index c70b203160309ab6312880dbd798925231f36d5c..2953b392a0e110734da6f95279ed963388890d5b 100644 --- a/source/Motor.m +++ b/source/Motor.m @@ -885,7 +885,7 @@ classdef Motor < MaskedHandle & dynamicprops end methods (Access = private) % Private functions that directly interact with commLayer - function varargout = handleCommand(motor, commandHandle, checkDevice, varargin) + function varargout = handleCommand(motor, command, checkDevice, varargin) % Execute a CommunicationInterface-method given as a handle % % As those methods have different, fixed numbers of output arguments, this quantity @@ -905,15 +905,15 @@ classdef Motor < MaskedHandle & dynamicprops end if motor.debug - fprintf('(DEBUG) Sending %s\n', func2str(commandHandle)); + fprintf('(DEBUG) Sending %s\n', func2str(command)); end % Note: Arrg. MATLAB does not support nargout for class methods directly, so I have to % do this ugly workaround using strings. See % https://de.mathworks.com/matlabcentral/answers/96617-how-can-i-use-nargin-nargout-to-determine-the-number-of-input-output-arguments-of-an-object-method - nOut = nargout(strcat('CommunicationInterface>CommunicationInterface.', func2str(commandHandle))); + nOut = nargout(strcat('CommunicationInterface>CommunicationInterface.', func2str(command))); try - [varargout{1:nOut}] = commandHandle(motor.commInterface, varargin{:}); + [varargout{1:nOut}] = command(motor.commInterface, varargin{:}); catch ME if ~isempty(strfind(ME.identifier, 'CommError')) warning('Lost connection to the Brick!'); diff --git a/source/Sensor.m b/source/Sensor.m index 89507751c6da37752df7c6d2607dbc8b9c75c53b..ce63f107018a448545a1a34b6231efb00a109e74 100644 --- a/source/Sensor.m +++ b/source/Sensor.m @@ -444,7 +444,7 @@ classdef Sensor < MaskedHandle end end - function varargout = handleCommand(sensor, commandHandle, checkDevice, varargin) + function varargout = handleCommand(sensor, command, checkDevice, varargin) % Execute a CommunicationInterface-method given as a handle % % As those methods have different, fixed numbers of output arguments, this quantity @@ -464,15 +464,15 @@ classdef Sensor < MaskedHandle end if sensor.debug - fprintf('(DEBUG) Sending %s\n', func2str(commandHandle)); + fprintf('(DEBUG) Sending %s\n', func2str(command)); end % Note: Arrg. MATLAB does not support nargout for class methods directly, so I have to % do this ugly workaround using strings. See % https://de.mathworks.com/matlabcentral/answers/96617-how-can-i-use-nargin-nargout-to-determine-the-number-of-input-output-arguments-of-an-object-method - nOut = nargout(strcat('CommunicationInterface>CommunicationInterface.', func2str(commandHandle))); + nOut = nargout(strcat('CommunicationInterface>CommunicationInterface.', func2str(command))); try - [varargout{1:nOut}] = commandHandle(sensor.commInterface, varargin{:}); + [varargout{1:nOut}] = command(sensor.commInterface, varargin{:}); catch ME %sensor.ev3Handle.detectedCommError(ME.identifier, ME.message); if ~isempty(strfind(ME.identifier, 'CommError'))