Several variable name tweaks and error checking changes.

- Minimal functional changes. The primary purpose of these tweaks is to make the clients more consistent across languages.
This commit is contained in:
Jason Watkins
2015-04-23 11:10:37 -07:00
parent 02f4c92fce
commit 7da82f40dc
4 changed files with 73 additions and 64 deletions

View File

@@ -1,8 +1,8 @@
function sendCTRL( ctrl, ac, socket )
function sendCTRL( values, ac, socket )
% sendCTRL Sends command to X-Plane setting control surfaces on the specified aircraft.
%
% Inputs
% ctrl: control array where the elements are as follows:
% values: control array where the elements are as follows:
% 1. Latitudinal Stick [-1,1]
% 2. Longitudinal Stick [-1,1]
% 3. Pedal [-1, 1]
@@ -41,13 +41,13 @@ if ~exist('socket', 'var')
end
%% Validate input
ctrl = single(ctrl);
values = single(values);
if ~exist('ac', 'var')
ac = 0;
end
ac = logical(ac);
%% Send command
socket.sendCTRL(ctrl, ac);
socket.sendCTRL(values, ac);
end