Skip to content
Snippets Groups Projects
Commit 024e502e authored by Tim Stadtmann's avatar Tim Stadtmann
Browse files

Minor changes

Renamed tachoLimit back to limitValue, fixed comments and minor bugs, and
made commInterface private.
parent 1daf6771
No related branches found
No related tags found
No related merge requests found
......@@ -109,9 +109,6 @@ classdef EV3 < handle
%isConnected - Virtual brick connected to physical one?
isConnected = false;
%commInterface - Interface to communication layer
commInterface = 0;
%% Motors and Sensors
motorA;
......@@ -125,6 +122,11 @@ classdef EV3 < handle
sensor4;
end
properties (Access = 'private')
%commInterface - Interface to communication layer
commInterface = 0;
end
properties (Hidden, Access = 'private') % Hidden properties for internal use only
init = true; % Indicates 'init-phase' (Set to 1 as long as constructor is running)
end
......
This diff is collapsed.
......@@ -115,7 +115,7 @@ classdef Sensor < handle
type = sensor.type;
if ~isModeValid(mode, type)
error('Sensor::set.mode: Sensor mode is not valid for connected sensor type.');
error('Sensor::set.mode: Invalid sensor mode.');
else
sensor.mode = mode;
......@@ -245,9 +245,9 @@ classdef Sensor < handle
if ~sensor.connectedToBrick
error(['Sensor::getTachoCount: Sensor-Object not connected to comm handle.',...
'You have to call sensor.connect(commInterface) first!']);
% elseif ~sensor.physicalSensorConnected
% error('Sensor::getTachoCount: No physical sensor connected to Port %d',...
% sensor.port+1);
elseif ~sensor.physicalSensorConnected
error('Sensor::getTachoCount: No physical sensor connected to Port %d',...
sensor.port+1);
end
sensor.commInterface.inputReadSI(0, sensor.port, mode); % Reading a value implicitly
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment