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
87f86bc0
Commit
87f86bc0
authored
7 years ago
by
Tim Stadtmann
Browse files
Options
Downloads
Patches
Plain Diff
Fix redundant value readings when displaying
parent
879220a1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/EV3.m
+4
-3
4 additions, 3 deletions
source/EV3.m
source/displayProperties.m
+3
-3
3 additions, 3 deletions
source/displayProperties.m
with
7 additions
and
6 deletions
source/EV3.m
+
4
−
3
View file @
87f86bc0
...
...
@@ -471,9 +471,10 @@ classdef EV3 < MaskedHandle
warning
(
'off'
,
'all'
);
% Turn off warnings while reading values
for
i
=
1
:
length
(
props
)
p
=
props
{
i
};
if
strcmp
(
class
(
ev3
.
(
p
)),
'Sensor'
)
||
strcmp
(
class
(
ev3
.
(
p
)),
'Motor'
)
fprintf
(
'\t%15s [Type: %s]\n'
,
p
,
char
(
ev3
.
(
p
)
.
type
));
member
=
ev3
.
(
p
);
if
strcmp
(
class
(
member
),
'Sensor'
)
||
strcmp
(
class
(
member
),
'Motor'
)
fprintf
(
'\t%15s [Type: %s]\n'
,
p
,
char
(
member
.
type
));
end
end
warning
(
'on'
,
'all'
);
...
...
This diff is collapsed.
Click to expand it.
source/displayProperties.m
+
3
−
3
View file @
87f86bc0
...
...
@@ -46,15 +46,15 @@ for i = 1:length(dependentProps)
value
=
device
.
(
p
);
if
~
isempty
(
enumeration
(
value
))
% Test if parameter is enumeration
fprintf
(
'\t%15s: %s\n'
,
p
,
char
(
value
));
elseif
isnumeric
(
device
.
(
p
)
)
||
islogical
(
value
)
elseif
isnumeric
(
value
)
||
islogical
(
value
)
if
isfloat
(
value
)
fprintf
(
'\t%15s: %1.1f\n'
,
p
,
value
);
else
fprintf
(
'\t%15s: %d\n'
,
p
,
value
);
end
elseif
ischar
(
device
.
(
p
)
)
elseif
ischar
(
value
)
fprintf
(
'\t%15s: %s\n'
,
p
,
value
);
elseif
islogical
(
device
.
(
p
)
)
elseif
islogical
(
value
)
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