| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
<PropertyList> |
| 21 |
|
| 22 |
<filter> |
| 23 |
<name>Control Lock Aileron</name> |
| 24 |
<type>noise-spike</type> |
| 25 |
<max-rate-of-change>1.0</max-rate-of-change> |
| 26 |
<enable> |
| 27 |
<property>/controls/flight/freeze-yoke</property> |
| 28 |
</enable> |
| 29 |
<input> |
| 30 |
<property>/controls/flight/aileron-cmd</property> |
| 31 |
</input> |
| 32 |
<output> |
| 33 |
<property>/controls/flight/aileron</property> |
| 34 |
</output> |
| 35 |
</filter> |
| 36 |
|
| 37 |
<filter> |
| 38 |
<name>Control Lock Elevator</name> |
| 39 |
<type>noise-spike</type> |
| 40 |
<max-rate-of-change>1.0</max-rate-of-change> |
| 41 |
<enable> |
| 42 |
<property>/controls/flight/freeze-yoke</property> |
| 43 |
</enable> |
| 44 |
<input> |
| 45 |
<property>/controls/flight/elevator-cmd</property> |
| 46 |
</input> |
| 47 |
<output> |
| 48 |
<property>/controls/flight/elevator</property> |
| 49 |
</output> |
| 50 |
</filter> |
| 51 |
|
| 52 |
<state-machine> |
| 53 |
<branch>/aircraft/fsm/control-lock</branch> |
| 54 |
|
| 55 |
|
| 56 |
<state> |
| 57 |
<name>unlocked</name> |
| 58 |
|
| 59 |
<enter> |
| 60 |
<command>property-assign</command> |
| 61 |
<property>/sim/model/c172p/cockpit/control-lock-visible</property> |
| 62 |
<value type="bool">false</value> |
| 63 |
</enter> |
| 64 |
<enter> |
| 65 |
<command>property-assign</command> |
| 66 |
<property>/controls/flight/freeze-yoke</property> |
| 67 |
<value type="bool">false</value> |
| 68 |
</enter> |
| 69 |
</state> |
| 70 |
|
| 71 |
<state> |
| 72 |
<name>prepare-reset-yoke</name> |
| 73 |
|
| 74 |
<enter> |
| 75 |
<command>property-assign</command> |
| 76 |
<property>/controls/flight/aileron-cmd</property> |
| 77 |
<property>/controls/flight/aileron</property> |
| 78 |
</enter> |
| 79 |
<enter> |
| 80 |
<command>property-assign</command> |
| 81 |
<property>/controls/flight/elevator-cmd</property> |
| 82 |
<property>/controls/flight/elevator</property> |
| 83 |
</enter> |
| 84 |
<enter> |
| 85 |
<command>property-assign</command> |
| 86 |
<property>/controls/flight/freeze-yoke</property> |
| 87 |
<value type="bool">true</value> |
| 88 |
</enter> |
| 89 |
</state> |
| 90 |
|
| 91 |
<state> |
| 92 |
<name>reset-yoke</name> |
| 93 |
|
| 94 |
<enter> |
| 95 |
<command>property-assign</command> |
| 96 |
<property>/controls/flight/aileron-cmd</property> |
| 97 |
<value type="double">0.0</value> |
| 98 |
</enter> |
| 99 |
<enter> |
| 100 |
<command>property-assign</command> |
| 101 |
<property>/controls/flight/elevator-cmd</property> |
| 102 |
<value type="double">0.0</value> |
| 103 |
</enter> |
| 104 |
</state> |
| 105 |
|
| 106 |
<state> |
| 107 |
<name>locked</name> |
| 108 |
|
| 109 |
<enter> |
| 110 |
<command>property-assign</command> |
| 111 |
<property>/sim/model/c172p/cockpit/control-lock-visible</property> |
| 112 |
<value type="bool">true</value> |
| 113 |
</enter> |
| 114 |
</state> |
| 115 |
|
| 116 |
|
| 117 |
<transition> |
| 118 |
<name>init</name> |
| 119 |
<source>unlocked</source> |
| 120 |
<target>prepare-reset-yoke</target> |
| 121 |
<condition> |
| 122 |
<property>sim/model/c172p/cockpit/control-lock-placed</property> |
| 123 |
</condition> |
| 124 |
</transition> |
| 125 |
|
| 126 |
<transition> |
| 127 |
<name>prepare-center</name> |
| 128 |
<source>prepare-reset-yoke</source> |
| 129 |
<target>reset-yoke</target> |
| 130 |
<condition> |
| 131 |
<true/> |
| 132 |
</condition> |
| 133 |
</transition> |
| 134 |
|
| 135 |
<transition> |
| 136 |
<name>move-yoke-to-center</name> |
| 137 |
<source>reset-yoke</source> |
| 138 |
<target>locked</target> |
| 139 |
<condition> |
| 140 |
<and> |
| 141 |
<equals> |
| 142 |
<property>sim/model/c172p/cockpit/yoke-aileron</property> |
| 143 |
<value>0.0</value> |
| 144 |
</equals> |
| 145 |
<equals> |
| 146 |
<property>sim/model/c172p/cockpit/yoke-elevator</property> |
| 147 |
<value>0.0</value> |
| 148 |
</equals> |
| 149 |
</and> |
| 150 |
</condition> |
| 151 |
</transition> |
| 152 |
|
| 153 |
<transition> |
| 154 |
<name>unlock-controls</name> |
| 155 |
<source>locked</source> |
| 156 |
<source>prepare-reset-yoke</source> |
| 157 |
<source>reset-yoke</source> |
| 158 |
<target>unlocked</target> |
| 159 |
<condition> |
| 160 |
<not> |
| 161 |
<property>sim/model/c172p/cockpit/control-lock-placed</property> |
| 162 |
</not> |
| 163 |
</condition> |
| 164 |
</transition> |
| 165 |
</state-machine> |
| 166 |
|
| 167 |
</PropertyList> |