-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPilotCmdBlock.m
More file actions
35 lines (29 loc) · 910 Bytes
/
PilotCmdBlock.m
File metadata and controls
35 lines (29 loc) · 910 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
26
27
28
29
30
31
32
33
34
35
classdef Gyro < matlab.System
methods (Access = protected)
function validatePropertiesImpl(obj)
if ((numel(obj.inc)>1) || (obj.inc <= 0))
error('inc of delays must be positive non-zero scalar value.');
end
if (numel(obj.InitialOutput)>1)
error('Initial Output must be scalar value.');
end
end
function setupImpl(obj)
obj.count = obj.InitialOutput;
end
function resetImpl(obj)
obj.count = obj.InitialOutput;
end
function [x y z ] = outputImpl(obj)
%y = obj.count;
y = 0.0;
y = coder.ceval('GET_GYRO_X');
end
function updateImpl(obj)
obj.count = obj.count + obj.inc;
end
function flag = isInputDirectFeedthroughImpl(~,~)
flag = false;
end
end
end