Added multiplayer sendCTRL support to MATLAB client

- Also fixed a bug in the message format where gear was sent as a single rather than a byte.
This commit is contained in:
Jason Watkins
2015-04-07 10:37:23 -07:00
parent 1f81a4e54d
commit 15df14d334
2 changed files with 22 additions and 1 deletions

View File

@@ -52,7 +52,10 @@ import XPlaneConnect.*
for i=1:min(length(ctrl),length(control))
control(i) = ctrl(i);
end
dataStream = [dataStream, typecast(single(control),'uint8')];
dataStream = [dataStream, typecast(single(control(1:4)),'uint8')];
dataStream = [dataStream, uint8(control(5))];
dataStream = [dataStream, typecast(single(control(6)),'uint8')];
dataStream = [dataStream, uint8(acft)];
% Send DATA
status = sendUDP(dataStream, IP, port);