Fixes for MATLAB and C Examples, Updated Mac Binary

This commit is contained in:
Chris Teubert
2015-08-25 10:50:15 -07:00
parent 1ec7649569
commit 9187c82e56
7 changed files with 119 additions and 17 deletions

View File

@@ -3,18 +3,17 @@
% Before running this script, ensure that the XPC plugin is installed and
% X-Plane is running.
%% Import XPC
clear all;
clear all
addpath('../')
import XPlaneConnect.*
Socket = openUDP();
while 1
posi = getPOSI(1, Socket);
ctrl = getCTRL(1, Socket);
for i=1:100
posi = getPOSI(0, Socket);
ctrl = getCTRL(0, Socket);
fprintf('Loc: (%4f, %4f, %4f) Aileron:%2f Elevator:%2f Rudder:%2f\n', ...
posi(1), posi(2), posi(3), ctrl(2), ctrl(1), ctrl(3));
posi(1), posi(2), posi(3), ctrl(2), ctrl(1), ctrl(3));
pause(0.1);
end
closeUDP(Socket);