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

Make default BT-backend OS-dependent

On linux/mac: MATLAB's virtual serial port implementation
On windows: Instrument Control toolbox
parent 3afa8af4
Branches
Tags
No related merge requests found
......@@ -200,7 +200,11 @@ classdef CommunicationInterface < handle
defaultSerPort = '/dev/rfcomm0';
defaultBTDevice = 'EV3';
defaultBTChannel = 1;
if(ispc)
defaultBackend = 'instrumentControl';
else
defaultBackend = 'serial';
end
defaultDebug = false;
% Define anonymous functions that will return whether given value in varargin is valid
......
......@@ -48,7 +48,6 @@ classdef btBrickIO < BrickIO
end
methods
%function brickIO = btBrickIO(debug,serialPort,backend)
function brickIO = btBrickIO(brickIO, varargin)
%btBrickIO.btBrickIO Create a btBrickIO object
%
......@@ -64,7 +63,11 @@ classdef btBrickIO < BrickIO
p.addOptional('deviceName', 'EV3');
p.addOptional('channel', 1);
p.addOptional('timeOut', 10);
if(ispc == 1)
p.addOptional('backend', 'instrumentControl');
else
p.addOptional('backend', 'serial');
end
p.parse(varargin{:});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment