| 1 | <PropertyList> |
| 2 | |
| 3 | <name>GoFlight GF EFIS</name> |
| 4 | <debug-events type="bool">false</debug-events> |
| 5 | |
| 6 | <nasal> |
| 7 | <open> |
| 8 | <![CDATA[ |
| 9 | |
| 10 | var basePath = "/instrumentation/efis[0]/"; |
| 11 | |
| 12 | # value is 0..8 for the konb on 738, GF only goes to 10 |
| 13 | var efisRangeKnobNode = props.globals.getNode(basePath ~ "inputs/range-knob"); |
| 14 | efisRangeKnobNode.setIntValue(0); |
| 15 | |
| 16 | # value is absolute integer for each click, hmmmm |
| 17 | var efisBaroKnobNode = props.globals.getNode(basePath ~ "inputs/baro-knob"); |
| 18 | |
| 19 | var setRangeBit = func(bit) { |
| 20 | var b = efisRangeKnobNode.getValue() - 1; |
| 21 | efisRangeKnobNode.setIntValue(bits.set(b, bit) + 1); |
| 22 | } |
| 23 | |
| 24 | var clearRangeBit = func(bit) { |
| 25 | var b = efisRangeKnobNode.getValue() - 1; |
| 26 | efisRangeKnobNode.setIntValue(bits.clear(b, bit) + 1); |
| 27 | } |
| 28 | |
| 29 | var efisNDModeNode = props.globals.getNode(basePath ~ "mfd/mode-num"); |
| 30 | var setModeBit = func(bit) { |
| 31 | var mode = efisNDModeNode.getValue(); |
| 32 | efisNDModeNode.setIntValue(bits.set(mode, bit)); |
| 33 | } |
| 34 | |
| 35 | var clearModeBit = func(bit) { |
| 36 | var mode = efisNDModeNode.getValue(); |
| 37 | efisNDModeNode.setIntValue(bits.clear(mode, bit)); |
| 38 | } |
| 39 | ]]> |
| 40 | </open> |
| 41 | </nasal> |
| 42 | |
| 43 | <hid-descriptor> |
| 44 | <report> |
| 45 | <type>input</type> |
| 46 | <id>1</id> |
| 47 | <unused-bits><size type="int">16</size></unused-bits> |
| 48 | <rel-dial-0> |
| 49 | <size type="int">8</size> |
| 50 | <count type="int">2</count> |
| 51 | <is-signed type="bool">true</is-signed> |
| 52 | </rel-dial-0> |
| 53 | <button-0> |
| 54 | <count type="int">24</count> |
| 55 | </button-0> |
| 56 | </report> |
| 57 | </hid-descriptor> |
| 58 | |
| 59 | <event> |
| 60 | <name>rel-dial-0</name> |
| 61 | <binding> |
| 62 | <command>property-adjust</command> |
| 63 | <property>/input/goflight/efis/height</property> |
| 64 | <min type="double">0.0</min> |
| 65 | </binding> |
| 66 | <interpolater> |
| 67 | <mirrored type="bool">true</mirrored> |
| 68 | <entry><ind>0</ind><dep>0</dep></entry> |
| 69 | <entry><ind>1</ind><dep>1</dep></entry> |
| 70 | <entry><ind>2</ind><dep>2</dep></entry> |
| 71 | <entry><ind>3</ind><dep>5</dep></entry> |
| 72 | <entry><ind>4</ind><dep>10</dep></entry> |
| 73 | </interpolater> |
| 74 | </event> |
| 75 | |
| 76 | <event> |
| 77 | <name>rel-dial-1</name> |
| 78 | <binding> |
| 79 | <command>property-adjust</command> |
| 80 | <property>/instrumentation/efis[0]/inputs/baro-knob</property> |
| 81 | </binding> |
| 82 | </event> |
| 83 | |
| 84 | <event> |
| 85 | <desc>TERR Button</desc> |
| 86 | <name>button-0</name> |
| 87 | <binding> |
| 88 | <command>property-toggle</command> |
| 89 | <property>/instrumentation/efis/inputs/terr</property> |
| 90 | </binding> |
| 91 | </event> |
| 92 | |
| 93 | <event> |
| 94 | <desc>POS Button</desc> |
| 95 | <name>button-1</name> |
| 96 | <binding> |
| 97 | <command>property-toggle</command> |
| 98 | <property>/instrumentation/efis/inputs/pos</property> |
| 99 | </binding> |
| 100 | </event> |
| 101 | |
| 102 | <event> |
| 103 | <desc>DATA Button</desc> |
| 104 | <name>button-2</name> |
| 105 | <binding> |
| 106 | <command>property-toggle</command> |
| 107 | <property>/instrumentation/efis/inputs/data</property> |
| 108 | </binding> |
| 109 | </event> |
| 110 | |
| 111 | <event> |
| 112 | <desc>ARPT Button</desc> |
| 113 | <name>button-3</name> |
| 114 | <binding> |
| 115 | <command>property-toggle</command> |
| 116 | <property>/instrumentation/efis/inputs/arpt</property> |
| 117 | </binding> |
| 118 | </event> |
| 119 | |
| 120 | <event> |
| 121 | <desc>WPT Button</desc> |
| 122 | <name>button-4</name> |
| 123 | <binding> |
| 124 | <command>property-toggle</command> |
| 125 | <property>/instrumentation/efis/inputs/wpt</property> |
| 126 | </binding> |
| 127 | </event> |
| 128 | |
| 129 | <event> |
| 130 | <desc>STA Button</desc> |
| 131 | <name>button-5</name> |
| 132 | <binding> |
| 133 | <command>property-toggle</command> |
| 134 | <property>/instrumentation/efis/inputs/sta</property> |
| 135 | </binding> |
| 136 | </event> |
| 137 | |
| 138 | <event> |
| 139 | <desc>WXR Button</desc> |
| 140 | <name>button-6</name> |
| 141 | <binding> |
| 142 | <command>property-toggle</command> |
| 143 | <property>/instrumentation/efis/inputs/wxr</property> |
| 144 | </binding> |
| 145 | </event> |
| 146 | |
| 147 | <event> |
| 148 | <desc></desc> |
| 149 | <name>button-7</name> |
| 150 | <binding> |
| 151 | <command>nasal</command> |
| 152 | <script>debug.dump("Button 7");</script> |
| 153 | </binding> |
| 154 | </event> |
| 155 | |
| 156 | <event> |
| 157 | <desc></desc> |
| 158 | <name>button-8</name> |
| 159 | <binding> |
| 160 | <command>nasal</command> |
| 161 | <script>setModeBit(0)</script> |
| 162 | </binding> |
| 163 | <mod-up> |
| 164 | <binding> |
| 165 | <command>nasal</command> |
| 166 | <script>clearModeBit(0)</script> |
| 167 | </binding> |
| 168 | </mod-up> |
| 169 | </event> |
| 170 | |
| 171 | <event> |
| 172 | <desc></desc> |
| 173 | <name>button-9</name> |
| 174 | <binding> |
| 175 | <command>nasal</command> |
| 176 | <script>setModeBit(1)</script> |
| 177 | </binding> |
| 178 | <mod-up> |
| 179 | <binding> |
| 180 | <command>nasal</command> |
| 181 | <script>clearModeBit(1)</script> |
| 182 | </binding> |
| 183 | </mod-up> |
| 184 | </event> |
| 185 | |
| 186 | <event> |
| 187 | <desc></desc> |
| 188 | <name>button-10</name> |
| 189 | <binding> |
| 190 | <command>nasal</command> |
| 191 | <script>debug.dump("Button 10");</script> |
| 192 | </binding> |
| 193 | </event> |
| 194 | |
| 195 | <event> |
| 196 | <desc>in/HPA toggle</desc> |
| 197 | <name>button-11</name> |
| 198 | <binding> |
| 199 | <command>property-toggle</command> |
| 200 | <property>/instrumentation/efis/inputs/kpa-mode</property> |
| 201 | </binding> |
| 202 | </event> |
| 203 | |
| 204 | <event> |
| 205 | <desc>DH/MCA knob push</desc> |
| 206 | <name>button-12</name> |
| 207 | <binding> |
| 208 | <command>nasal</command> |
| 209 | <script>debug.dump("DH/MCA toggle");</script> |
| 210 | </binding> |
| 211 | |
| 212 | <binding> |
| 213 | <command>property-toggle</command> |
| 214 | <property>/instrumentation/efis/inputs/minimums-mode</property> |
| 215 | </binding> |
| 216 | </event> |
| 217 | |
| 218 | <event> |
| 219 | <desc></desc> |
| 220 | <name>button-13</name> |
| 221 | <binding> |
| 222 | <command>nasal</command> |
| 223 | <script>setRangeBit(0)</script> |
| 224 | </binding> |
| 225 | <mod-up> |
| 226 | <binding> |
| 227 | <command>nasal</command> |
| 228 | <script>clearRangeBit(0)</script> |
| 229 | </binding> |
| 230 | </mod-up> |
| 231 | </event> |
| 232 | |
| 233 | <event> |
| 234 | <desc></desc> |
| 235 | <name>button-14</name> |
| 236 | <binding> |
| 237 | <command>nasal</command> |
| 238 | <script>setRangeBit(1)</script> |
| 239 | </binding> |
| 240 | <mod-up> |
| 241 | <binding> |
| 242 | <command>nasal</command> |
| 243 | <script>clearRangeBit(1)</script> |
| 244 | </binding> |
| 245 | </mod-up> |
| 246 | </event> |
| 247 | |
| 248 | <event> |
| 249 | <desc></desc> |
| 250 | <name>button-15</name> |
| 251 | <binding> |
| 252 | <command>nasal</command> |
| 253 | <script>setRangeBit(2)</script> |
| 254 | </binding> |
| 255 | <mod-up> |
| 256 | <binding> |
| 257 | <command>nasal</command> |
| 258 | <script>clearRangeBit(2)</script> |
| 259 | </binding> |
| 260 | </mod-up> |
| 261 | </event> |
| 262 | |
| 263 | <event> |
| 264 | <desc>ADF-L switch</desc> |
| 265 | <name>button-16</name> |
| 266 | <binding> |
| 267 | <command>property-assign</command> |
| 268 | <property>/instrumentation/efis/inputs/lh-vor-adf</property> |
| 269 | <value>-1</value> |
| 270 | </binding> |
| 271 | <mod-up> |
| 272 | <binding> |
| 273 | <command>property-assign</command> |
| 274 | <property>/instrumentation/efis/inputs/lh-vor-adf</property> |
| 275 | <value>0</value> |
| 276 | </binding> |
| 277 | </mod-up> |
| 278 | </event> |
| 279 | |
| 280 | |
| 281 | <event> |
| 282 | <desc>VOR-L switch</desc> |
| 283 | <name>button-17</name> |
| 284 | <binding> |
| 285 | <command>property-assign</command> |
| 286 | <property>/instrumentation/efis/inputs/lh-vor-adf</property> |
| 287 | <value>1</value> |
| 288 | </binding> |
| 289 | <mod-up> |
| 290 | <binding> |
| 291 | <command>property-assign</command> |
| 292 | <property>/instrumentation/efis/inputs/lh-vor-adf</property> |
| 293 | <value>0</value> |
| 294 | </binding> |
| 295 | </mod-up> |
| 296 | </event> |
| 297 | |
| 298 | <event> |
| 299 | <desc>ADF-R switch</desc> |
| 300 | <name>button-18</name> |
| 301 | <binding> |
| 302 | <command>property-assign</command> |
| 303 | <property>/instrumentation/efis/inputs/rh-vor-adf</property> |
| 304 | <value>-1</value> |
| 305 | </binding> |
| 306 | <mod-up> |
| 307 | <binding> |
| 308 | <command>property-assign</command> |
| 309 | <property>/instrumentation/efis/inputs/rh-vor-adf</property> |
| 310 | <value>0</value> |
| 311 | </binding> |
| 312 | </mod-up> |
| 313 | </event> |
| 314 | |
| 315 | <event> |
| 316 | <desc>VOR-R switch</desc> |
| 317 | <name>button-19</name> |
| 318 | <binding> |
| 319 | <command>property-assign</command> |
| 320 | <property>/instrumentation/efis/inputs/rh-vor-adf</property> |
| 321 | <value>1</value> |
| 322 | </binding> |
| 323 | <mod-up> |
| 324 | <binding> |
| 325 | <command>property-assign</command> |
| 326 | <property>/instrumentation/efis/inputs/rh-vor-adf</property> |
| 327 | <value>0</value> |
| 328 | </binding> |
| 329 | </mod-up> |
| 330 | </event> |
| 331 | |
| 332 | <event> |
| 333 | <desc>MTRS Button</desc> |
| 334 | <name>button-20</name> |
| 335 | <binding> |
| 336 | <command>nasal</command> |
| 337 | <script>debug.dump("Button MTRS");</script> |
| 338 | </binding> |
| 339 | |
| 340 | <binding> |
| 341 | <command>property-toggle</command> |
| 342 | <property>/instrumentation/efis/inputs/alt-meters</property> |
| 343 | </binding> |
| 344 | </event> |
| 345 | |
| 346 | <event> |
| 347 | <desc>FPV Button</desc> |
| 348 | <name>button-21</name> |
| 349 | <binding> |
| 350 | <command>nasal</command> |
| 351 | <script>debug.dump("Button FPV");</script> |
| 352 | </binding> |
| 353 | |
| 354 | <binding> |
| 355 | <command>property-toggle</command> |
| 356 | <property>/instrumentation/efis/inputs/fpv</property> |
| 357 | </binding> |
| 358 | </event> |
| 359 | |
| 360 | </PropertyList> |