Skip to content
Snippets Groups Projects
Commit ed34a9a6 authored by Tim Stadtmann's avatar Tim Stadtmann
Browse files

Unify debug output of command & communication layer

parent f5ad5e2b
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......
......@@ -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
......
......
......@@ -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
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment