basic implementation of client/server for AERPAW, whole lot of mess included
This commit is contained in:
24
aerpaw/@scenario/sendTarget.m
Normal file
24
aerpaw/@scenario/sendTarget.m
Normal file
@@ -0,0 +1,24 @@
|
||||
function u = sendTarget(~, u, pos)
|
||||
arguments (Input)
|
||||
~
|
||||
u (1, 1) {mustBeA(u, 'uav')};
|
||||
pos (1, 3) double;
|
||||
end
|
||||
arguments (Output)
|
||||
u (1, 1) {mustBeA(u, 'uav')};
|
||||
end
|
||||
|
||||
% Branch here depending on environment
|
||||
if coder.target("MATLAB")
|
||||
% Simulation - update target position
|
||||
u.commandPos = pos;
|
||||
|
||||
elseif coder.target("C++")
|
||||
% Codegen - TX starting position to UAV
|
||||
coder.cinclude("udp_comm.h");
|
||||
coder.ceval("sendTarget", coder.rref(pos));
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user