Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ev3-toolbox-matlab
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mindstorms
ev3-toolbox-matlab
Commits
727177d2
Commit
727177d2
authored
5 years ago
by
Maximilian Schnabel
Browse files
Options
Downloads
Patches
Plain Diff
used consistent variable names
parent
3dbf4903
No related branches found
No related tags found
2 merge requests
!7
Keep going if mountpoint exists (persistent)
,
!6
Docs NXT compatibility
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/Motor.m
+18
-17
18 additions, 17 deletions
source/Motor.m
with
18 additions
and
17 deletions
source/Motor.m
+
18
−
17
View file @
727177d2
...
@@ -350,14 +350,14 @@ classdef Motor < MaskedHandle & dynamicprops
...
@@ -350,14 +350,14 @@ classdef Motor < MaskedHandle & dynamicprops
%::
%::
%
%
% Example:
% Example:
% b = EV3();
% b
rick
= EV3();
% b.connect('usb');
% b
rick
.connect('usb');
% m
= b
.motorA;
% m
otor = brick
.motorA;
% slave = b.motorB;
% slave = b
rick
.motorB;
% m.power = 50;
% m
otor
.power = 50;
% m.syncedStart(slave);
% m
otor
.syncedStart(slave);
% % Do stuff
% % Do stuff
% m.stop();
% m
otor
.stop();
%
%
% See also MOTOR.STOP, MOTOR.SYNCEDSTOP / :meth:`stop`, :meth:`syncedStop`
% See also MOTOR.STOP, MOTOR.SYNCEDSTOP / :meth:`stop`, :meth:`syncedStop`
...
@@ -718,13 +718,13 @@ classdef Motor < MaskedHandle & dynamicprops
...
@@ -718,13 +718,13 @@ classdef Motor < MaskedHandle & dynamicprops
% ::
% ::
%
%
% Example:
% Example:
% b = EV3();
% b
rick
= EV3();
% b.connect('bt', 'serPort', '/dev/rfcomm0');
% b
rick
.connect('bt', 'serPort', '/dev/rfcomm0');
% b.motorA.setProperties('debug', 'on', 'power', 50, 'limitValue', 720, 'speedRegulation', 'on');
% b
rick
.motorA.setProperties('debug', 'on', 'power', 50, 'limitValue', 720, 'speedRegulation', 'on');
% % Instead of: b.motorA.debug = 'on';
% % Instead of: b
rick
.motorA.debug = 'on';
% % b.motorA.power = 50;
% % b
rick
.motorA.power = 50;
% % b.motorA.limitValue = 720;
% % b
rick
.motorA.limitValue = 720;
% % b.motorA.speedRegulation = 'on';
% % b
rick
.motorA.speedRegulation = 'on';
%
%
p
=
inputParser
();
p
=
inputParser
();
...
@@ -1042,9 +1042,10 @@ classdef Motor < MaskedHandle & dynamicprops
...
@@ -1042,9 +1042,10 @@ classdef Motor < MaskedHandle & dynamicprops
end
end
% If motor is *busily* running, stop it. That avoids suicidal stuff like:
% If motor is *busily* running, stop it. That avoids suicidal stuff like:
% b = EV3(); b.connect('usb');
% brick = EV3();
% b.motorA.start();
% brick.connect('usb');
% b.disconnect(); -> Motor still running and cannot directly be stopped anymore
% brick.motorA.start();
% brick.disconnect(); -> Motor still running and cannot directly be stopped anymore
if
motor
.
isRunning
if
motor
.
isRunning
motor
.
stop
();
motor
.
stop
();
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment