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

Sensor reset now resets the corresponding sensor

... and not all devices. For this functionality, the EV3-method
resetAllDeviceValues has been added.
parent 9cf3b5b3
No related branches found
No related tags found
No related merge requests found
......@@ -256,6 +256,11 @@ classdef EV3 < MaskedHandle
% Sends a stop-command to all motor-ports.
ev3.commInterface.outputStopAll();
end
function resetAllDeviceValues(ev3)
% Resets values of all sensors on all ports (including tacho counter on motors)
ev3.handleCommand(@inputDeviceClrAll, false, 0);
end
%% Sound functions
function beep(ev3)
......
......@@ -235,13 +235,11 @@ classdef Sensor < MaskedHandle
function reset(sensor)
% Resets sensor value.
%
% Notes:
% * This clears ALL the sensors right now, no other Op-Code available... :(
% Notes:
% * Has not been thoroughly tested but seems to work as expected
%
% warning(['Current version of reset resets ALL devices, that is, ',...
% 'all motor tacho counts and all other sensor counters!']);
sensor.handleCommand(@inputDeviceClrAll, false, 0);
sensor.handleCommand(@inputDeviceClrChanges, false, 0, sensor.port);
end
%% Setter
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment