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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mindstorms
ev3-toolbox-matlab
Commits
89befd3c
Commit
89befd3c
authored
7 years ago
by
Tim Stadtmann
Browse files
Options
Downloads
Patches
Plain Diff
Remove commInterface-handle from Motor/Sensor
parent
7d5f6090
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/Motor.m
+1
-13
1 addition, 13 deletions
source/Motor.m
source/Sensor.m
+0
-12
0 additions, 12 deletions
source/Sensor.m
with
1 addition
and
25 deletions
source/Motor.m
+
1
−
13
View file @
89befd3c
...
...
@@ -116,10 +116,6 @@ classdef Motor < MaskedHandle & dynamicprops
end
properties
(
Hidden
,
Access
=
private
)
% Hidden properties for internal use only
% commInterface (CommunicationInterface): Commands are created and sent via the
% communication interface class.
commInterface
;
% ev3Handle (EV3): Handle to the EV3-object to which this motor instance belongs
ev3Handle
;
...
...
@@ -246,7 +242,7 @@ classdef Motor < MaskedHandle & dynamicprops
motor
.
internalReset
();
end
%
Call
appropriate
function in commInterface
depending on limitValue and limitMode
%
Send
appropriate
command
depending on limitValue and limitMode
if
motor
.
limitValue
==
0
if
motor
.
state
.
sendOnStart
>
0
% If stop-flag is set: call stop() and reset flag
...
...
@@ -695,14 +691,6 @@ classdef Motor < MaskedHandle & dynamicprops
end
end
function
set
.
commInterface
(
motor
,
comm
)
if
~
isCommInterfaceValid
(
comm
)
error
(
'Handle to commInterface not valid.'
);
end
motor
.
commInterface
=
comm
;
end
function
set
.
debug
(
motor
,
debug
)
if
~
isBool
(
debug
)
error
(
'Given parameter is not a bool.'
);
...
...
This diff is collapsed.
Click to expand it.
source/Sensor.m
+
0
−
12
View file @
89befd3c
...
...
@@ -198,10 +198,6 @@ classdef Sensor < MaskedHandle
end
properties
(
Hidden
,
Access
=
private
)
% Hidden properties for internal use only
% commInterface (CommunicationInterface): Commands are created and sent via the
% communication interface class.
commInterface
;
% ev3Handle (EV3): Handle to the EV3-object to which this sensor instance belongs
ev3Handle
;
...
...
@@ -288,14 +284,6 @@ classdef Sensor < MaskedHandle
end
end
function
set
.
commInterface
(
sensor
,
comm
)
if
~
isCommInterfaceValid
(
comm
)
error
(
'Handle to commInterface not valid.'
);
else
sensor
.
commInterface
=
comm
;
end
end
function
setProperties
(
sensor
,
varargin
)
% Sets multiple Sensor properties at once using MATLAB's inputParser.
%
...
...
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