diff --git a/source/EV3.m b/source/EV3.m index 535101a6a6b34c695fbd3abf788135c29a45f55d..f263011d5f4a8e5a7b366cb124b88fe91f0d18c7 100644 --- a/source/EV3.m +++ b/source/EV3.m @@ -10,7 +10,7 @@ classdef EV3 < handle % motorA[,B,C,D] - % sensor1[,2,3,4] - % debug - - % batteryMode - Format in which batteryValue should be returned + % batteryMode - Mode for reading battery charge % Dependent % batteryValue - Current battery charge level % get-only @@ -23,7 +23,7 @@ classdef EV3 < handle % connect - Connects EV3-object and its Motors and Sensors to physical brick via bt or usb. % disconnect - Disconnects EV3-object and its Motors and Sensors from physical brick. % update - Updates all Motors and Sensors - % coupleMotors - Updates all Motors and Sensors to current status of their corresponding ports. + % coupleMotors - Creates and connects a SyncMotor-object using two chosen Motor-objects % beep - Plays a 'beep' tone on brick. % playTone - Plays tone on brick. % stopTone - Stops tone currently played. @@ -64,9 +64,14 @@ classdef EV3 < handle properties % Standard properties %% Modi + + %batteryMode - Mode for reading battery charge + % -> 'Percentage' / 'Voltage' + % See also EV3.BATTERYVALUE batteryMode = 'Percentage'; %% Debug + debug; end @@ -79,7 +84,8 @@ classdef EV3 < handle brick = 0; % Brick object from sub-layer class Brick -> used as interface to the % physical brick. - %% Motors & Sensors + %% Motors and Sensors + motorA; motorB; motorC; @@ -268,8 +274,7 @@ classdef EV3 < handle %% System functions function syncMotor = coupleMotors(ev3, varargin) - %coupleMotors Creates a SyncMotor-object for synced use of motor1 and motor2, using parameters - % of motor1. + %coupleMotors Creates and connects a SyncMotor-object using two chosen Motor-objects. % % Notes % * Right now only possible if connection to Brick has been established. @@ -282,11 +287,12 @@ classdef EV3 < handle % % Example % b = EV3(); b.connect('ioType', 'bt', 'serPort', '/dev/rfcomm0'); - % sync = b.coupleMotors('AB'); % Couple motors A and B with parameters of + % sync = b.coupleMotors('AB'); % Couple motors A and B using parameters of % % Motor-object motorA. - % sync = b.coupleMotors('CD', 'useMotorParams', 0, 'power', 50, 'debug', 'on'); - % % Couple motors C and D with default resp. given - % % parameters. + % sync2 = b.coupleMotors('CD', 'useMotorParams', 0, 'power', 50, 'debug', 'on'); + % % Couple motors C and D with new object being + % % initialized with default resp. given parameters. + % if ~ev3.isConnected error('EV3::update: No brick connected.'); @@ -554,6 +560,7 @@ classdef EV3 < handle bat = ev3.getBattery(); end + %% Display %% Display function display(ev3) % WIP diff --git a/source/Motor.m b/source/Motor.m index 1caa1a193e046409adf504f3441b55f8d4739934..f0866b121227fe600173e860d879742d5bdade67 100644 --- a/source/Motor.m +++ b/source/Motor.m @@ -115,8 +115,8 @@ classdef Motor < handle limitMode; %mode - Device mode at port, used as tacho mode (i.e. what tachoCount should return) - % There is also DeviceMode.Motor.Speed, but this is only used internally. - % -> DeviceMode.Motor.Degrees / DeviceMode.Motor.Rotations + % -> DeviceMode.Motor.Degrees / DeviceMode.Motor.Rotations + % (DeviceMode.Motor.Speed is also defined, but this is only used internally.) mode; %debug - Debug turned on or off