diff --git a/source/CommunicationInterface.m b/source/CommunicationInterface.m index 4972fe03401721930c88412d73b644b5f2fc7997..7c222a597212222473fcdaa81dd71dccbccfc9ac 100755 --- a/source/CommunicationInterface.m +++ b/source/CommunicationInterface.m @@ -200,7 +200,11 @@ classdef CommunicationInterface < handle defaultSerPort = '/dev/rfcomm0'; defaultBTDevice = 'EV3'; defaultBTChannel = 1; - defaultBackend = 'serial'; + if(ispc) + defaultBackend = 'instrumentControl'; + else + defaultBackend = 'serial'; + end defaultDebug = false; % Define anonymous functions that will return whether given value in varargin is valid diff --git a/source/btBrickIO.m b/source/btBrickIO.m index a11bfc891fce51e9494a8f8a72f0843f057f78af..5ed51f7a3615249ff424ad20707af4bea48ad16a 100755 --- a/source/btBrickIO.m +++ b/source/btBrickIO.m @@ -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); - p.addOptional('backend', 'serial'); + if(ispc == 1) + p.addOptional('backend', 'instrumentControl'); + else + p.addOptional('backend', 'serial'); + end p.parse(varargin{:});