-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMavlinkMsg.m
More file actions
25 lines (22 loc) · 835 Bytes
/
MavlinkMsg.m
File metadata and controls
25 lines (22 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
classdef MavlinkMsg < matlab.System
properties
Message='Type a message to send';
end
methods (Access = protected)
%function setupImpl(~)
% Implement tasks that need to be performed only once,
% such as pre-computed constants.
%end
function stepImpl(obj,u)
coder.extrinsic('properties')
coder.extrinsic('num2str')
if coder.target('Rtw')
coder.cinclude('MyCopter.h');
f = coder.opaque('MAV_SEVERITY', 'MAV_SEVERITY_INFO');
str = char(zeros(1,100));
coder.ceval('sprintf', coder.ref(str), [obj.Message ': %f' char(0)], u);
coder.ceval('copter.gcs_send_text',f, str);
end
end
end
end