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
27788d41
Commit
27788d41
authored
5 years ago
by
Maximilian Schnabel
Browse files
Options
Downloads
Patches
Plain Diff
preemptively disconnect other existing EV3 objects
parent
6fca0231
No related branches found
No related tags found
2 merge requests
!7
Keep going if mountpoint exists (persistent)
,
!6
Docs NXT compatibility
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/EV3.m
+10
-1
10 additions, 1 deletion
source/EV3.m
with
10 additions
and
1 deletion
source/EV3.m
+
10
−
1
View file @
27788d41
...
...
@@ -171,7 +171,16 @@ classdef EV3 < MaskedHandle
% brick.connect('usb', 'beep', 'on', );
%
% See also ISCONNECTED / :attr:`isConnected`
% save variables of base directory in vars
vars
=
evalin
(
'base'
,
'whos'
);
for
k
=
1
:
length
(
vars
)
% if another EV3 object exists, preemptively disconnect it to prevent connection error
if
strcmp
(
vars
(
k
)
.
class
,
'EV3'
)
evalin
(
'base'
,
[
vars
(
k
)
.
name
'.disconnect()'
])
end
end
if
ev3
.
isConnected
if
isCommInterfaceValid
(
ev3
.
commInterface
)
% Warning lead to confusion of students. Since brick connection is still working
...
...
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