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
ed34a9a6
Commit
ed34a9a6
authored
Jun 20, 2017
by
Tim Stadtmann
Browse files
Options
Downloads
Patches
Plain Diff
Unify debug output of command & communication layer
parent
f5ad5e2b
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
source/CommunicationInterface.m
+2
-2
2 additions, 2 deletions
source/CommunicationInterface.m
source/btBrickIO.m
+6
-6
6 additions, 6 deletions
source/btBrickIO.m
source/usbBrickIO.m
+6
-6
6 additions, 6 deletions
source/usbBrickIO.m
with
14 additions
and
14 deletions
source/CommunicationInterface.m
+
2
−
2
View file @
ed34a9a6
...
...
@@ -1947,7 +1947,7 @@ classdef CommunicationInterface < handle
% Verbose output
if
brick
.
debug
>
0
fprintf
(
'sent: [ '
);
fprintf
(
'
\t(DEBUG)
sent: [ '
);
for
ii
=
1
:
length
(
cmd
.
msg
)
fprintf
(
'%s '
,
dec2hex
(
cmd
.
msg
(
ii
)))
end
...
...
@@ -2024,7 +2024,7 @@ classdef CommunicationInterface < handle
% Verbose output
if
brick
.
debug
>
0
fprintf
(
'received: [ '
);
fprintf
(
'
\t(DEBUG)
received: [ '
);
for
ii
=
1
:
length
(
rmsg
)
fprintf
(
'%s '
,
dec2hex
(
rmsg
(
ii
)))
end
...
...
...
...
This diff is collapsed.
Click to expand it.
source/btBrickIO.m
+
6
−
6
View file @
ed34a9a6
...
...
@@ -85,7 +85,7 @@ classdef btBrickIO < BrickIO
brickIO
.
setProperties
(
varargin
{:});
if
brickIO
.
debug
>
0
fprintf
(
'(DEBUG)
btBrickIO
init\n'
);
fprintf
(
'
\t
(DEBUG)
(BT
init
)
\n'
);
end
% Set the connection handle
...
...
@@ -119,7 +119,7 @@ classdef btBrickIO < BrickIO
% Delete the btBrickIO object and closes the connection
if
brickIO
.
debug
>
0
fprintf
(
'(DEBUG) (BT delete\n'
);
fprintf
(
'
\t
(DEBUG) (BT delete
)
\n'
);
end
% Disconnect
...
...
@@ -134,7 +134,7 @@ classdef btBrickIO < BrickIO
% Opens the bluetooth connection to the brick using fopen.
if
brickIO
.
debug
>
0
fprintf
(
'(DEBUG) (BT open)\n'
);
fprintf
(
'
\t
(DEBUG) (BT open)\n'
);
end
% Open the bt handle
...
...
@@ -162,7 +162,7 @@ classdef btBrickIO < BrickIO
% Closes the bluetooth connection the brick using fclose.
if
brickIO
.
debug
>
0
fprintf
(
'(DEBUG) (BT close) \n'
);
fprintf
(
'
\t
(DEBUG) (BT close) \n'
);
end
try
...
...
@@ -183,7 +183,7 @@ classdef btBrickIO < BrickIO
% Reads data from the brick through bluetooth via fread and returns the data in uint8 format.
if
brickIO
.
debug
>
0
fprintf
(
'(DEBUG) (BT read) \n'
);
fprintf
(
'
\t
(DEBUG) (BT read) \n'
);
end
try
...
...
@@ -219,7 +219,7 @@ classdef btBrickIO < BrickIO
% wmsg (uint8 array): Data to be written to the brick via bluetooth
if
brickIO
.
debug
>
0
fprintf
(
'(DEBUG)
btBrickIO
write\n'
);
fprintf
(
'
\t
(DEBUG)
(BT
write
)
\n'
);
end
try
...
...
...
...
This diff is collapsed.
Click to expand it.
source/usbBrickIO.m
+
6
−
6
View file @
ed34a9a6
...
...
@@ -66,7 +66,7 @@ classdef usbBrickIO < BrickIO
brickIO
.
setProperties
(
varargin
{:});
if
brickIO
.
debug
>
0
fprintf
(
'(DEBUG) (USB init)\n'
);
fprintf
(
'
\t
(DEBUG) (USB init)\n'
);
end
% Set the connection handle
...
...
@@ -104,7 +104,7 @@ classdef usbBrickIO < BrickIO
% Delete the usbBrickIO object and closes the connection
if
brickIO
.
debug
>
0
fprintf
(
'(DEBUG) (USB delete)\n'
);
fprintf
(
'
\t
(DEBUG) (USB delete)\n'
);
end
% Disconnect
...
...
@@ -119,7 +119,7 @@ classdef usbBrickIO < BrickIO
% Opens the usb connection to the brick through the hidapi interface.
if
brickIO
.
debug
>
0
fprintf
(
'(DEBUG) (USB open)\n'
);
fprintf
(
'
\t
(DEBUG) (USB open)\n'
);
end
% Open the usb handle
...
...
@@ -146,7 +146,7 @@ classdef usbBrickIO < BrickIO
% Closes the usb connection the brick through the hidapi interface.
if
brickIO
.
debug
>
0
fprintf
(
'(DEBUG) (USB close) \n'
);
fprintf
(
'
\t
(DEBUG) (USB close) \n'
);
end
try
...
...
@@ -166,7 +166,7 @@ classdef usbBrickIO < BrickIO
% Reads data from the brick through usb using the hidapi interface and returns the data in uint8 format.
if
brickIO
.
debug
>
0
fprintf
(
'(DEBUG) (USB read) '
);
fprintf
(
'
\t
(DEBUG) (USB read) '
);
end
% Read from the usb handle
...
...
@@ -213,7 +213,7 @@ classdef usbBrickIO < BrickIO
% wmsg (uint8 array): Data to be written to the brick via usb
if
brickIO
.
debug
>
0
fprintf
(
'(DEBUG) (USB write) '
);
fprintf
(
'
\t
(DEBUG) (USB write) '
);
end
% Write to the usb handle using report ID 0
...
...
...
...
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
sign in
to comment