From 2c2e4c267489a2ebd1902967c132716465930ab6 Mon Sep 17 00:00:00 2001 From: oberion Date: Wed, 27 Jan 2016 13:10:29 +0100 Subject: [PATCH] [xDATA]: fix non working Data gathering functions in MATLAB. Matlab does not know the istrue() function. Further the java readData() function was misspelled. --- MATLAB/+XPlaneConnect/readDATA.m | 4 ++-- MATLAB/+XPlaneConnect/selectDATA.m | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MATLAB/+XPlaneConnect/readDATA.m b/MATLAB/+XPlaneConnect/readDATA.m index 80f888e..1667c71 100644 --- a/MATLAB/+XPlaneConnect/readDATA.m +++ b/MATLAB/+XPlaneConnect/readDATA.m @@ -37,7 +37,7 @@ import XPlaneConnect.* %% Get client global clients; if ~exist('socket', 'var') - assert(istrue(length(clients) < 2), '[readDATA] ERROR: Multiple clients open. You must specify which client to use.'); + assert(isequal((length(clients) < 2),1), '[readDATA] ERROR: Multiple clients open. You must specify which client to use.'); if isempty(clients) socket = openUDP(); else @@ -46,7 +46,7 @@ if ~exist('socket', 'var') end %% Get data -result.raw = socket.readDATA(); +result.raw = socket.readData(); %% Format data rows = (length(result.raw) - 5) / 9; diff --git a/MATLAB/+XPlaneConnect/selectDATA.m b/MATLAB/+XPlaneConnect/selectDATA.m index dc54fdc..47293f2 100644 --- a/MATLAB/+XPlaneConnect/selectDATA.m +++ b/MATLAB/+XPlaneConnect/selectDATA.m @@ -19,7 +19,7 @@ import XPlaneConnect.* %% Get client global clients; if ~exist('socket', 'var') - assert(istrue(length(clients) < 2), '[selectDATA] ERROR: Multiple clients open. You must specify which client to use.'); + assert(isequal((length(clients) < 2),1), '[selectDATA] ERROR: Multiple clients open. You must specify which client to use.'); if isempty(clients) socket = openUDP(); else