-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFA-18C_hornet.lua
1247 lines (1093 loc) · 69.4 KB
/
FA-18C_hornet.lua
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-- F/A-18 Module created by AndrewW v1.2 for DCS Beta 2.5.5 modified by WarLord, DeadMeat
-- Many thanks to Capt Zeen for the pointers on analog outputs and UFC/IFEI export
-- And of course huge thanks to [FSF]Ian for writing DCS-BIOS in the first place
-- Added new functions by Capt Zeen to get radios frecuencies and channels
-- Amended from DCSFLIGHTS by Tek 15-04-20
BIOS.protocol.beginModule("FA-18C_hornet", 0x7400)
BIOS.protocol.setExportModuleAircrafts({"FA-18C_hornet"})
local inputProcessors = moduleBeingDefined.inputProcessors
local documentation = moduleBeingDefined.documentation
local document = BIOS.util.document
local parse_indication = BIOS.util.parse_indication
local defineIndicatorLight = BIOS.util.defineIndicatorLight
local definePushButton = BIOS.util.definePushButton
local definePotentiometer = BIOS.util.definePotentiometer
local defineRotary = BIOS.util.defineRotary
local defineSetCommandTumb = BIOS.util.defineSetCommandTumb
local defineTumb = BIOS.util.defineTumb
local define3PosTumb = BIOS.util.define3PosTumb
local defineToggleSwitch = BIOS.util.defineToggleSwitch
local defineToggleSwitchToggleOnly = BIOS.util.defineToggleSwitchToggleOnly
local defineFixedStepTumb = BIOS.util.defineFixedStepTumb
local defineVariableStepTumb = BIOS.util.defineVariableStepTumb
local defineString = BIOS.util.defineString
local defineRockerSwitch = BIOS.util.defineRockerSwitch
local defineMultipositionSwitch = BIOS.util.defineMultipositionSwitch
local defineElectricallyHeldSwitch = BIOS.util.defineElectricallyHeldSwitch
local defineFloat = BIOS.util.defineFloat
local define8BitFloat = BIOS.util.define8BitFloat
local defineIntegerFromGetter = BIOS.util.defineIntegerFromGetter
function ValueConvert(actual_value, input, output)
local range=1
local real_value=0
local slope = {}
for a=1,#output-1 do -- calculating the table of slopes
slope[a]= (input[a+1]-input[a]) / (output[a+1]-output[a])
end
for a=1,#output-1 do
if actual_value >= output[a] and actual_value <= output[a+1] then
range = a
break
end -- check the range of the value
end
final_value= ( slope[range] * (actual_value-output[range]) ) + input[range]
return final_value
end
function coerce_nil_to_string(value)
if value == nil then
return ""
else
return value
end
end
function parse_indication(indicator_id) -- Thanks to [FSF]Ian code
local ret = {}
local li = list_indication(indicator_id)
if li == "" then return nil end
local m = li:gmatch("-----------------------------------------\n([^\n]+)\n([^\n]*)\n")
while true do
local name, value = m()
if not name then break end
ret[name] = value
end
return ret
end
function defineEmergencyParkingBrake(msg, device_id, emergency_command, park_command, arg_number, category, description)
local alloc = moduleBeingDefined.memoryMap:allocateInt{ maxValue = 1 }
moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function(dev0)
if dev0:get_argument_value(arg_number) < 0.5 then
alloc:setValue(0)
else
alloc:setValue(1)
end
end
document {
identifier = msg,
category = category,
description = description,
control_type = "emergency_parking_brake",
inputs = {
{ interface = "set_state", max_value = 1, description = "set the switch position -- 0 = emergency, 1 = parking" }
},
outputs = {
{ ["type"] = "integer",
suffix = "",
address = alloc.address,
mask = alloc.mask,
shift_by = alloc.shiftBy,
max_value = 1,
description = "switch position -- 0 = emergency, 1 = parking"
}
}
}
moduleBeingDefined.inputProcessors[msg] = function(toState)
local dev = GetDevice(device_id)
local fromState = GetDevice(0):get_argument_value(arg_number)
if fromState > 0.5 then fromState = 1 end
if fromState == 0 and toState == "1" then
dev:performClickableAction(park_command, 0)
dev:performClickableAction(park_command, 1)
dev:performClickableAction(park_command, 0)
elseif fromState == 1 and toState == "0" then
dev:performClickableAction(emergency_command, 0)
dev:performClickableAction(emergency_command, 1)
dev:performClickableAction(emergency_command, 0)
end
end
end
function defineToggleSwitchToggleOnly2(msg, device_id, command, arg_number, category, description)
local alloc = moduleBeingDefined.memoryMap:allocateInt{ maxValue = 1 }
moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function(dev0)
if dev0:get_argument_value(arg_number) < 0.5 then
alloc:setValue(0)
else
alloc:setValue(1)
end
end
document {
identifier = msg,
category = category,
description = description,
control_type = "toggle_switch",
inputs = {
{ interface = "set_state", max_value = 1, description = "set the switch position -- 0 = off, 1 = on" }
},
outputs = {
{ ["type"] = "integer",
suffix = "",
address = alloc.address,
mask = alloc.mask,
shift_by = alloc.shiftBy,
max_value = 1,
description = "switch position -- 0 = off, 1 = on"
}
}
}
moduleBeingDefined.inputProcessors[msg] = function(toState)
local fromState = GetDevice(0):get_argument_value(arg_number)
if fromState == 0 and toState == "1" then
GetDevice(device_id):performClickableAction(command, 1)
end
if fromState == 1 and toState == "0" then
GetDevice(device_id):performClickableAction(command, 1)
end
end
end
function defineMissionComputerSwitch(msg, device_id, mc1_off_command, mc2_off_command, arg_number, category, description)
local alloc = moduleBeingDefined.memoryMap:allocateInt{ maxValue = 2 }
moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function(dev0)
local val = dev0:get_argument_value(arg_number)
if val == -1 then
alloc:setValue(0)
elseif val == 0 then
alloc:setValue(1)
elseif val == 1 then
alloc:setValue(2)
end
end
document {
identifier = msg,
category = category,
description = description,
control_type = "mission_computer_switch",
inputs = {
{ interface = "set_state", max_value = 2, description = "set the switch position -- 0 = emergency, 1 = parking" }
},
outputs = {
{ ["type"] = "integer",
suffix = "",
address = alloc.address,
mask = alloc.mask,
shift_by = alloc.shiftBy,
max_value = 2,
description = "switch position -- 0 = emergency, 1 = parking"
}
}
}
moduleBeingDefined.inputProcessors[msg] = function(toState)
local dev = GetDevice(device_id)
dev:performClickableAction(mc1_off_command, 0)
dev:performClickableAction(mc2_off_command, 0)
if toState == "0" then
dev:performClickableAction(mc2_off_command, -1)
elseif toState == "2" then
dev:performClickableAction(mc1_off_command, 1)
end
end
end
function defineEjectionHandleSwitch(msg, device_id, command, arg_number, category, description)
local alloc = moduleBeingDefined.memoryMap:allocateInt{ maxValue = 1 }
moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function(dev0)
if dev0:get_argument_value(arg_number) < 0.5 then
alloc:setValue(0)
else
alloc:setValue(1)
end
end
document {
identifier = msg,
category = category,
description = description,
control_type = "toggle_switch",
inputs = {
{ interface = "set_state", max_value = 1, description = "set the switch position -- 0 = off, 1 = on" }
},
outputs = {
{ ["type"] = "integer",
suffix = "",
address = alloc.address,
mask = alloc.mask,
shift_by = alloc.shiftBy,
max_value = 1,
description = "switch position -- 0 = off, 1 = on"
}
}
}
moduleBeingDefined.inputProcessors[msg] = function(toState)
local fromState = GetDevice(0):get_argument_value(arg_number)
if fromState == 0 and toState == "1" then
GetDevice(device_id):performClickableAction(command, 1)
GetDevice(device_id):performClickableAction(command, 1)
GetDevice(device_id):performClickableAction(command, 1)
end
end
end
function defineFloatWithValueConversion(msg, arg_number, limits, input_range, output_range, category, description)
local intervalLength = limits[2] - limits[1]
local alloc = moduleBeingDefined.memoryMap:allocateInt { maxValue = 65535 }
moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function(dev0)
local xyz = ValueConvert(dev0:get_argument_value(arg_number), input_range, output_range)
alloc:setValue(((xyz - limits[1]) / intervalLength) * 65535)
end
document {
identifier = msg,
category = category,
description = description,
control_type = "analog_gauge",
inputs = {},
outputs = {
{ ["type"] = "integer",
suffix = "",
address = alloc.address,
mask = alloc.mask,
shift_by = alloc.shiftBy,
max_value = 65535,
description = "gauge position"
}
}
}
end
-- functions by Capt Zeen
function defineFrequency(msg, id_device_number, category, description)
local alloc = moduleBeingDefined.memoryMap:allocateInt { maxValue = 65535 }
moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function(freq)
local dato=GetDevice(id_device_number)
alloc:setValue(dato:get_frequency()/10000)
end
document {
identifier = msg,
category = category,
description = description,
control_type = "frequency",
inputs = {},
outputs = {
{ ["type"] = "integer",
suffix = "",
address = alloc.address,
mask = alloc.mask,
shift_by = alloc.shiftBy,
max_value = 65535,
description = "frequency"
}
}
}
end
function defineFloatFromUFCChannel(msg, _channel, category, description)
local alloc = moduleBeingDefined.memoryMap:allocateInt { maxValue = 65535 }
moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function()
local ufc = parse_indication(6)
UFC_Comm1Display = " "
UFC_Comm2Display = " "
if not ufc then
return
end
UFC_Comm1Display = coerce_nil_to_string(ufc.UFC_Comm1Display)
UFC_Comm2Display = coerce_nil_to_string(ufc.UFC_Comm2Display)
local valor=1
local nuevo=""
if _channel==1 then
nuevo=UFC_Comm1Display
else
nuevo=UFC_Comm2Display
end
if nuevo==" 1" then valor=1
elseif nuevo==" 2" then valor=2
elseif nuevo==" 3" then valor=3
elseif nuevo==" 4" then valor=4
elseif nuevo==" 5" then valor=5
elseif nuevo==" 6" then valor=6
elseif nuevo==" 7" then valor=7
elseif nuevo==" 8" then valor=8
elseif nuevo==" 9" then valor=9
elseif nuevo=="`0" then valor=10
elseif nuevo=="`1" then valor=11
elseif nuevo=="`2" then valor=12
elseif nuevo=="`3" then valor=13
elseif nuevo=="`4" then valor=14
elseif nuevo=="`5" then valor=15
elseif nuevo=="`6" then valor=16
elseif nuevo=="`7" then valor=17
elseif nuevo=="`8" then valor=18
elseif nuevo=="`9" then valor=19
elseif nuevo=="~0" then valor=20
elseif nuevo=="G" then valor=21
elseif nuevo=="M" then valor=22
elseif nuevo=="C" then valor=23
elseif nuevo=="S" then valor=24
end
alloc:setValue(valor)
end
document {
identifier = msg,
category = category,
description = description,
control_type = "analog_gauge",
inputs = {},
outputs = {
{ ["type"] = "integer",
suffix = "",
address = alloc.address,
mask = alloc.mask,
shift_by = alloc.shiftBy,
max_value = 65535,
description = "gauge position"
}
}
}
end
-- end of functions adeed by Capt Zeen
-- radio freqs: by Capt Zeen
defineFrequency("COMM1_FREQ", 38, "Comms frequency", "COMM1 FREQ")
defineFrequency("COMM2_FREQ", 39, "Comms frequency", "COMM2 FREQ")
defineFloatFromUFCChannel("COMM1_CHANNEL_NUMERIC", 1, "Comms frequency", "Comm 1 Channel as number")
defineFloatFromUFCChannel("COMM2_CHANNEL_NUMERIC", 2, "Comms frequency", "Comm 2 Channel as number")
-- INSTRUMENT PANEL
-- 1. Lock/Shoot Lights
defineIndicatorLight("LS_LOCK", 1, "Lock Shoot Lights", "LOCK")
defineIndicatorLight("LS_SHOOT", 2, "Lock Shoot Lights", "SHOOT")
defineIndicatorLight("LS_SHOOT_STROBE", 3, "Lock Shoot Lights", "SHOOT STROBE")
-- 2. Head Up Display
-- 3. Angle of Attack Indexer Lights
defineIndicatorLight("AOA_INDEXER_HIGH", 4, "Angle of Attack Indexer Lights", "AOA Indexer High")
defineIndicatorLight("AOA_INDEXER_NORMAL", 5, "Angle of Attack Indexer Lights", "AOA Indexer Normal")
defineIndicatorLight("AOA_INDEXER_LOW", 6, "Angle of Attack Indexer Lights", "AOA Indexer Low")
-- 4. Left Engine Fire Warning / Extinguisher Light
defineIndicatorLight("FIRE_LEFT_LT", 10, "Left Engine Fire Warning Extinguisher Light", "FIRE LEFT")
definePushButton("LEFT_FIRE_BTN", 12, 3010, 11, "Left Engine Fire Warning Extinguisher Light", "Left Engine/AMAD Fire Warning/Extinguisher Light")
defineToggleSwitch("LEFT_FIRE_BTN_COVER", 12, 3012, 12, "Left Engine Fire Warning Extinguisher Light", "Left Engine/AMAD Fire Warning Cover")
-- 5. Master Caution Light
defineIndicatorLight("MASTER_CAUTION_LT", 13, "Master Caution Light", "MASTER CAUTION")
defineToggleSwitch("MASTER_CAUTION_RESET_SW", 9, 3008, 14, "Master Caution Light", "MASTER CAUTION Reset Button - Press to reset")
-- 6. LH Advisory and Threat Warning Indicator Panel
defineIndicatorLight("LH_ADV_L_BLEED", 17, "LH Advisory Panel", "L BLEED")
defineIndicatorLight("LH_ADV_R_BLEED", 18, "LH Advisory Panel", "R BLEED")
defineIndicatorLight("LH_ADV_SPD_BRK", 19, "LH Advisory Panel", "SPD BRK")
defineIndicatorLight("LH_ADV_STBY", 20, "LH Advisory Panel", "STBY")
defineIndicatorLight("LH_ADV_L_BAR_RED", 21, "LH Advisory Panel", "L BAR RED")
defineIndicatorLight("LH_ADV_REC", 22, "LH Advisory Panel", "REC")
defineIndicatorLight("LH_ADV_L_BAR_GREEN", 23, "LH Advisory Panel", "L BAR GREEN")
defineIndicatorLight("LH_ADV_XMIT", 24, "LH Advisory Panel", "XMIT")
defineIndicatorLight("LH_ADV_ASPJ_OH", 25, "LH Advisory Panel", "ASPJ OH")
defineIndicatorLight("LH_ADV_GO", 15, "LH Advisory Panel", "GO")
defineIndicatorLight("LH_ADV_NO_GO", 16, "LH Advisory Panel", "NO GO")
-- 7. HUD Video Bit Panel
definePushButton("HUD_VIDEO_BIT", 0, 3107, 7, "HUD Video Bit Panel", "HUD Video BIT Initiate Pushbutton - Push to initiate BIT")
-- 8. RH Advisory and Threat Warning Indicator Panel
defineIndicatorLight("RH_ADV_RCDR_ON", 31, "RH Advisory Panel", "RCDR ON")
defineIndicatorLight("RH_ADV_DISP", 32, "RH Advisory Panel", "DISP")
defineIndicatorLight("RH_ADV_SAM", 38, "RH Advisory Panel", "SAM")
defineIndicatorLight("RH_ADV_AI", 39, "RH Advisory Panel", "AI")
defineIndicatorLight("RH_ADV_AAA", 40, "RH Advisory Panel", "AAA")
defineIndicatorLight("RH_ADV_CW", 41, "RH Advisory Panel", "CW")
defineIndicatorLight("RH_ADV_SPARE_RH1", 33, "RH Advisory Panel", "SPARE RH1")
defineIndicatorLight("RH_ADV_SPARE_RH2", 34, "RH Advisory Panel", "SPARE RH2")
defineIndicatorLight("RH_ADV_SPARE_RH3", 35, "RH Advisory Panel", "SPARE RH3")
defineIndicatorLight("RH_ADV_SPARE_RH4", 36, "RH Advisory Panel", "SPARE RH4")
defineIndicatorLight("RH_ADV_SPARE_RH5", 37, "RH Advisory Panel", "SPARE RH5")
-- 9. APU Fire Warning / Extinguisher Light
defineIndicatorLight("FIRE_APU_LT", 29, "APU Fire Warning Extinguisher Light", "FIRE APU")
definePushButton("APU_FIRE_BTN", 12, 3009, 30, "APU Fire Warning Extinguisher Light", "APU Fire Warning/Extinguisher Light")
-- 10. Right Engine Fire Warning / Extinguisher Light
defineIndicatorLight("FIRE_RIGHT_LT", 26, " Right Engine Fire Warning Extinguisher Light", "FIRE RIGHT")
definePushButton("RIGHT_FIRE_BTN", 12, 3011, 27, " Right Engine Fire Warning Extinguisher Light", "Right Engine/AMAD Fire Warning/Extinguisher Light")
defineToggleSwitch("RIGHT_FIRE_BTN_COVER", 12, 3013, 28, " Right Engine Fire Warning Extinguisher Light", "Right Engine/AMAD Fire Warning Cover")
-- 11. Canopy Internal Jettison Handle
defineToggleSwitch("CANOPY_JETT_HANDLE_UNLOCK", 7, 3004, 43, "Canopy Internal Jettison Handle", "Canopy Jettison Handle Unlock Button - Press to unlock")
defineToggleSwitch("CANOPY_JETT_HANDLE_PULL", 7, 3003, 42, "Canopy Internal Jettison Handle", "Canopy Jettison Handle Unlock Button - Press to jettison")
-- 12. Master Arm Panel
defineIndicatorLight("MASTER_MODE_AA_LT", 47, "Master Arm Panel", "AA Light")
defineIndicatorLight("MASTER_MODE_AG_LT", 48, "Master Arm Panel", "AG Light")
definePushButton("MASTER_MODE_AA", 23, 3001, 458, "Master Arm Panel", "Master Mode Button, A/A")
definePushButton("MASTER_MODE_AG", 23, 3002, 459, "Master Arm Panel", "Master Mode Button, A/G")
defineToggleSwitch("MASTER_ARM_SW", 23, 3003, 49, "Master Arm Panel", "Master Arm Switch, ARM/SAFE")
defineIndicatorLight("MC_DISCH", 45, "Master Arm Panel", "DISCH Light")
defineIndicatorLight("MC_READY", 44, "Master Arm Panel", "READY Light")
definePushButton("FIRE_EXT_BTN", 12, 3008, 46, "Fire Systems", "Fire Extinguisher Pushbutton")
-- 13. Left DDI
defineTumb("LEFT_DDI_BRT_SELECT", 35, 3001, 51, 0.1, {0.0, 0.2}, nil, false, "Left DDI", "Brightness Selector Knob, OFF/NIGHT/DAY")
definePotentiometer("LEFT_DDI_BRT_CTL", 35, 3002, 52, {0, 1}, "Left DDI", "Brightness Control Knob")
definePotentiometer("LEFT_DDI_CONT_CTL", 35, 3003, 53, {0, 1}, "Left DDI", "Contrast Control Knob")
definePushButton("LEFT_DDI_PB_01", 35, 3011, 54, "Left DDI", "Pushbutton 1")
definePushButton("LEFT_DDI_PB_02", 35, 3012, 55, "Left DDI", "Pushbutton 2")
definePushButton("LEFT_DDI_PB_03", 35, 3013, 56, "Left DDI", "Pushbutton 3")
definePushButton("LEFT_DDI_PB_04", 35, 3014, 57, "Left DDI", "Pushbutton 4")
definePushButton("LEFT_DDI_PB_05", 35, 3015, 58, "Left DDI", "Pushbutton 5")
definePushButton("LEFT_DDI_PB_06", 35, 3016, 59, "Left DDI", "Pushbutton 6")
definePushButton("LEFT_DDI_PB_07", 35, 3017, 60, "Left DDI", "Pushbutton 7")
definePushButton("LEFT_DDI_PB_08", 35, 3018, 61, "Left DDI", "Pushbutton 8")
definePushButton("LEFT_DDI_PB_09", 35, 3019, 62, "Left DDI", "Pushbutton 9")
definePushButton("LEFT_DDI_PB_10", 35, 3020, 63, "Left DDI", "Pushbutton 10")
definePushButton("LEFT_DDI_PB_11", 35, 3021, 64, "Left DDI", "Pushbutton 11")
definePushButton("LEFT_DDI_PB_12", 35, 3022, 65, "Left DDI", "Pushbutton 12")
definePushButton("LEFT_DDI_PB_13", 35, 3023, 66, "Left DDI", "Pushbutton 13")
definePushButton("LEFT_DDI_PB_14", 35, 3024, 67, "Left DDI", "Pushbutton 14")
definePushButton("LEFT_DDI_PB_15", 35, 3025, 68, "Left DDI", "Pushbutton 15")
definePushButton("LEFT_DDI_PB_16", 35, 3026, 69, "Left DDI", "Pushbutton 16")
definePushButton("LEFT_DDI_PB_17", 35, 3027, 70, "Left DDI", "Pushbutton 17")
definePushButton("LEFT_DDI_PB_18", 35, 3028, 72, "Left DDI", "Pushbutton 18")
definePushButton("LEFT_DDI_PB_19", 35, 3029, 73, "Left DDI", "Pushbutton 19")
definePushButton("LEFT_DDI_PB_20", 35, 3030, 75, "Left DDI", "Pushbutton 20")
-- 14. Up Front Controller (UFC)
definePushButton("UFC_AP", 25, 3001, 128, "Up Front Controller (UFC)", "Function Selector Pushbutton, A/P")
definePushButton("UFC_IFF", 25, 3002, 129, "Up Front Controller (UFC)", "Function Selector Pushbutton, IFF")
definePushButton("UFC_TCN", 25, 3003, 130, "Up Front Controller (UFC)", "Function Selector Pushbutton, TCN")
definePushButton("UFC_ILS", 25, 3004, 131, "Up Front Controller (UFC)", "Function Selector Pushbutton, ILS")
definePushButton("UFC_DL", 25, 3005, 132, "Up Front Controller (UFC)", "Function Selector Pushbutton, D/L")
definePushButton("UFC_BCN", 25, 3006, 133, "Up Front Controller (UFC)", "Function Selector Pushbutton, BCN")
definePushButton("UFC_ONOFF", 25, 3007, 134, "Up Front Controller (UFC)", "Function Selector Pushbutton, ON/OFF")
definePushButton("UFC_COMM1_PULL", 25, 3008, 125, "Up Front Controller (UFC)", "COMM 1 Channel Selector Knob Pull")
definePushButton("UFC_COMM2_PULL", 25, 3009, 127, "Up Front Controller (UFC)", "COMM 2 Channel Selector Knob Pull")
definePushButton("UFC_OS1", 25, 3010, 100, "Up Front Controller (UFC)", "Option Select Pushbutton 1")
definePushButton("UFC_OS2", 25, 3011, 101, "Up Front Controller (UFC)", "Option Select Pushbutton 2")
definePushButton("UFC_OS3", 25, 3012, 102, "Up Front Controller (UFC)", "Option Select Pushbutton 3")
definePushButton("UFC_OS4", 25, 3013, 103, "Up Front Controller (UFC)", "Option Select Pushbutton 4")
definePushButton("UFC_OS5", 25, 3014, 106, "Up Front Controller (UFC)", "Option Select Pushbutton 5")
definePushButton("UFC_IP", 25, 3015, 99, "Up Front Controller (UFC)", "I/P Pushbutton")
define3PosTumb("UFC_ADF", 25, 3016, 107, "Up Front Controller (UFC)", "ADF Function Select Switch, 1/OFF/2")
definePushButton("UFC_EMCON", 25, 3017, 110, "Up Front Controller (UFC)", "Emission Control Pushbutton")
definePushButton("UFC_0", 25, 3018, 120, "Up Front Controller (UFC)", "UFC Keyboard Pushbutton, 0")
definePushButton("UFC_1", 25, 3019, 111, "Up Front Controller (UFC)", "UFC Keyboard Pushbutton, 1")
definePushButton("UFC_2", 25, 3020, 112, "Up Front Controller (UFC)", "UFC Keyboard Pushbutton, 2")
definePushButton("UFC_3", 25, 3021, 113, "Up Front Controller (UFC)", "UFC Keyboard Pushbutton, 3")
definePushButton("UFC_4", 25, 3022, 114, "Up Front Controller (UFC)", "UFC Keyboard Pushbutton, 4")
definePushButton("UFC_5", 25, 3023, 115, "Up Front Controller (UFC)", "UFC Keyboard Pushbutton, 5")
definePushButton("UFC_6", 25, 3024, 116, "Up Front Controller (UFC)", "UFC Keyboard Pushbutton, 6")
definePushButton("UFC_7", 25, 3025, 117, "Up Front Controller (UFC)", "UFC Keyboard Pushbutton, 7")
definePushButton("UFC_8", 25, 3026, 118, "Up Front Controller (UFC)", "UFC Keyboard Pushbutton, 8")
definePushButton("UFC_9", 25, 3027, 119, "Up Front Controller (UFC)", "UFC Keyboard Pushbutton, 9")
definePushButton("UFC_CLR", 25, 3028, 121, "Up Front Controller (UFC)", "Keyboard Pushbutton, CLR")
definePushButton("UFC_ENT", 25, 3029, 122, "Up Front Controller (UFC)", "Keyboard Pushbutton, ENT")
definePotentiometer("UFC_COMM1_VOL", 25, 3030, 108, {0, 1}, "Up Front Controller (UFC)", "COMM 1 Volume Control Knob")
definePotentiometer("UFC_COMM2_VOL", 25, 3031, 123, {0, 1}, "Up Front Controller (UFC)", "COMM 2 Volume Control Knob")
definePotentiometer("UFC_BRT", 25, 3032, 109, {0, 1}, "Up Front Controller (UFC)", "Brightness Control Knob")
defineRotary("UFC_COMM1_CHANNEL_SELECT", 25, 3033, 124, "Up Front Controller (UFC)", "COMM 1 Channel Select Knob")
defineRotary("UFC_COMM2_CHANNEL_SELECT", 25, 3034, 126, "Up Front Controller (UFC)", "COMM 2 Channel Select Knob")
BIOS.util.defineFixedStepInput("UFC_COMM1_CHANNEL_SELECT", 25, 3033, {-0.03, 0.03}, "Up Front Controller (UFC)", "COMM 1 Channel Select Knob")
BIOS.util.defineFixedStepInput("UFC_COMM2_CHANNEL_SELECT", 25, 3034, {-0.03, 0.03}, "Up Front Controller (UFC)", "COMM 2 Channel Select Knob")
local UFC_Comm1Display = ""
local UFC_Comm2Display = ""
local UFC_OptionCueing1 = ""
local UFC_OptionCueing2 = ""
local UFC_OptionCueing3 = ""
local UFC_OptionCueing4 = ""
local UFC_OptionCueing5 = ""
local UFC_OptionDisplay1 = ""
local UFC_OptionDisplay2 = ""
local UFC_OptionDisplay3 = ""
local UFC_OptionDisplay4 = ""
local UFC_OptionDisplay5 = ""
local UFC_ScratchPadNumberDisplay = ""
local UFC_ScratchPadString1Display = ""
local UFC_ScratchPadString2Display = ""
local function processUfcTwoDigitDisplay(s)
if s == "_" then
s = "--"
end
s = s:gsub("^`", "1")
s = s:gsub("^~", "2")
if s:len() == 1 then
s = " " .. s
end
return s
end
moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function()
local ufc = parse_indication(6)
UFC_Comm1Display = " "
UFC_Comm2Display = " "
UFC_OptionCueing1 = " "
UFC_OptionCueing2 = " "
UFC_OptionCueing3 = " "
UFC_OptionCueing4 = " "
UFC_OptionCueing5 = " "
UFC_OptionDisplay1 = " "
UFC_OptionDisplay2 = " "
UFC_OptionDisplay3 = " "
UFC_OptionDisplay4 = " "
UFC_OptionDisplay5 = " "
UFC_ScratchPadNumberDisplay = " "
UFC_ScratchPadString1Display = " "
UFC_ScratchPadString2Display = " "
if not ufc then
return
end
UFC_Comm1Display = coerce_nil_to_string(ufc.UFC_Comm1Display)
UFC_Comm1Display = processUfcTwoDigitDisplay(UFC_Comm1Display)
UFC_Comm2Display = coerce_nil_to_string(ufc.UFC_Comm2Display)
UFC_Comm2Display = processUfcTwoDigitDisplay(UFC_Comm2Display)
UFC_OptionCueing1 = coerce_nil_to_string(ufc.UFC_OptionCueing1)
UFC_OptionCueing2 = coerce_nil_to_string(ufc.UFC_OptionCueing2)
UFC_OptionCueing3 = coerce_nil_to_string(ufc.UFC_OptionCueing3)
UFC_OptionCueing4 = coerce_nil_to_string(ufc.UFC_OptionCueing4)
UFC_OptionCueing5 = coerce_nil_to_string(ufc.UFC_OptionCueing5)
UFC_OptionDisplay1 = coerce_nil_to_string(ufc.UFC_OptionDisplay1)
UFC_OptionDisplay2 = coerce_nil_to_string(ufc.UFC_OptionDisplay2)
UFC_OptionDisplay3 = coerce_nil_to_string(ufc.UFC_OptionDisplay3)
UFC_OptionDisplay4 = coerce_nil_to_string(ufc.UFC_OptionDisplay4)
UFC_OptionDisplay5 = coerce_nil_to_string(ufc.UFC_OptionDisplay5)
UFC_ScratchPadNumberDisplay = coerce_nil_to_string(ufc.UFC_ScratchPadNumberDisplay)
UFC_ScratchPadNumberDisplay = (" "):rep(8-UFC_ScratchPadNumberDisplay:len())..UFC_ScratchPadNumberDisplay
UFC_ScratchPadString1Display = coerce_nil_to_string(ufc.UFC_ScratchPadString1Display)
UFC_ScratchPadString1Display = processUfcTwoDigitDisplay(UFC_ScratchPadString1Display)
UFC_ScratchPadString2Display = coerce_nil_to_string(ufc.UFC_ScratchPadString2Display)
UFC_ScratchPadString2Display = processUfcTwoDigitDisplay(UFC_ScratchPadString2Display)
end
defineString("UFC_COMM1_DISPLAY", function() return UFC_Comm1Display end, 2, "Up Front Controller (UFC)", "Comm 1 Display")
defineString("UFC_COMM2_DISPLAY", function() return UFC_Comm2Display end, 2, "Up Front Controller (UFC)", "Comm 2 Display")
defineString("UFC_OPTION_CUEING_1", function() return UFC_OptionCueing1 end, 1, "Up Front Controller (UFC)", "Option Cueing 1")
defineString("UFC_OPTION_CUEING_2", function() return UFC_OptionCueing2 end, 1, "Up Front Controller (UFC)", "Option Cueing 2")
defineString("UFC_OPTION_CUEING_3", function() return UFC_OptionCueing3 end, 1, "Up Front Controller (UFC)", "Option Cueing 3")
defineString("UFC_OPTION_CUEING_4", function() return UFC_OptionCueing4 end, 1, "Up Front Controller (UFC)", "Option Cueing 4")
defineString("UFC_OPTION_CUEING_5", function() return UFC_OptionCueing5 end, 1, "Up Front Controller (UFC)", "Option Cueing 5")
defineString("UFC_OPTION_DISPLAY_1", function() return UFC_OptionDisplay1 end, 4, "Up Front Controller (UFC)", "Option Display 1")
defineString("UFC_OPTION_DISPLAY_2", function() return UFC_OptionDisplay2 end, 4, "Up Front Controller (UFC)", "Option Display 2")
defineString("UFC_OPTION_DISPLAY_3", function() return UFC_OptionDisplay3 end, 4, "Up Front Controller (UFC)", "Option Display 3")
defineString("UFC_OPTION_DISPLAY_4", function() return UFC_OptionDisplay4 end, 4, "Up Front Controller (UFC)", "Option Display 4")
defineString("UFC_OPTION_DISPLAY_5", function() return UFC_OptionDisplay5 end, 4, "Up Front Controller (UFC)", "Option Display 5")
defineString("UFC_SCRATCHPAD_NUMBER_DISPLAY", function() return UFC_ScratchPadNumberDisplay end, 8, "Up Front Controller (UFC)", "Scratchpad Number Display")
defineString("UFC_SCRATCHPAD_STRING_1_DISPLAY", function() return UFC_ScratchPadString1Display end, 2, "Up Front Controller (UFC)", "Scratchpad String 1 Display")
defineString("UFC_SCRATCHPAD_STRING_2_DISPLAY", function() return UFC_ScratchPadString2Display end, 2, "Up Front Controller (UFC)", "Scratchpad String 2 Display")
-- 15. Right DDI
defineTumb("RIGHT_DDI_BRT_SELECT", 36, 3001, 76, 0.1, {0.0, 0.2}, nil, false, "Right DDI", "Brightness Selector Knob, OFF/NIGHT/DAY")
definePotentiometer("RIGHT_DDI_BRT_CTL", 36, 3002, 77, {0, 1}, "Right DDI", "Brightness Control Knob")
definePotentiometer("RIGHT_DDI_CONT_CTL", 36, 3003, 78, {0, 1}, "Right DDI", "Contrast Control Knob")
definePushButton("RIGHT_DDI_PB_01", 36, 3011, 79, "Right DDI", "Pushbutton 1")
definePushButton("RIGHT_DDI_PB_02", 36, 3012, 80, "Right DDI", "Pushbutton 2")
definePushButton("RIGHT_DDI_PB_03", 36, 3013, 81, "Right DDI", "Pushbutton 3")
definePushButton("RIGHT_DDI_PB_04", 36, 3014, 82, "Right DDI", "Pushbutton 4")
definePushButton("RIGHT_DDI_PB_05", 36, 3015, 83, "Right DDI", "Pushbutton 5")
definePushButton("RIGHT_DDI_PB_06", 36, 3016, 84, "Right DDI", "Pushbutton 6")
definePushButton("RIGHT_DDI_PB_07", 36, 3017, 85, "Right DDI", "Pushbutton 7")
definePushButton("RIGHT_DDI_PB_08", 36, 3018, 86, "Right DDI", "Pushbutton 8")
definePushButton("RIGHT_DDI_PB_09", 36, 3019, 87, "Right DDI", "Pushbutton 9")
definePushButton("RIGHT_DDI_PB_10", 36, 3020, 88, "Right DDI", "Pushbutton 10")
definePushButton("RIGHT_DDI_PB_11", 36, 3021, 89, "Right DDI", "Pushbutton 11")
definePushButton("RIGHT_DDI_PB_12", 36, 3022, 90, "Right DDI", "Pushbutton 12")
definePushButton("RIGHT_DDI_PB_13", 36, 3023, 91, "Right DDI", "Pushbutton 13")
definePushButton("RIGHT_DDI_PB_14", 36, 3024, 92, "Right DDI", "Pushbutton 14")
definePushButton("RIGHT_DDI_PB_15", 36, 3025, 93, "Right DDI", "Pushbutton 15")
definePushButton("RIGHT_DDI_PB_16", 36, 3026, 94, "Right DDI", "Pushbutton 16")
definePushButton("RIGHT_DDI_PB_17", 36, 3027, 95, "Right DDI", "Pushbutton 17")
definePushButton("RIGHT_DDI_PB_18", 36, 3028, 96, "Right DDI", "Pushbutton 18")
definePushButton("RIGHT_DDI_PB_19", 36, 3029, 97, "Right DDI", "Pushbutton 19")
definePushButton("RIGHT_DDI_PB_20", 36, 3030, 98, "Right DDI", "Pushbutton 20")
-- 16. Map Gain/Spin Recovery Panel
defineIndicatorLight("SPIN_LT", 137, "Map Gain/Spin Recovery Panel", "Spin Light")
defineToggleSwitch("SPIN_RECOVERY_COVER", 2, 3008, 139, "Map Gain/Spin Recovery Panel", "Spin Recovery Switch Cover, OPEN/CLOSE")
defineToggleSwitch("SPIN_RECOVERY_SW", 2, 3009, 138, "Map Gain/Spin Recovery Panel", "Spin Recovery Switch, RCVY/NORM")
definePotentiometer("HMD_OFF_BRT", 58, 3001, 136, {0, 0.75}, "Map Gain/Spin Recovery Panel", "HMD OFF/BRT Knob") -- From TODO, will change
defineTumb("IR_COOL_SW", 23, 3013, 135, 0.1, {0.0, 0.2}, nil, false, "Map Gain/Spin Recovery Panel", "IR Cooling Switch, ORIDE/NORM/OFF")
-- 17. Emergency Jettison Button
definePushButton("EMER_JETT_BTN", 23, 3004, 50, "Emergency Jettison Button", "Emergency Jettison Button")
-- 18. HUD Control Panel
defineTumb("HUD_SYM_REJ_SW", 34, 3001, 140, 0.1, {0.0, 0.2}, nil, false, "HUD Control Panel", "HUD Symbology Reject Switch, NORM/REJ 1/REJ 2")
definePotentiometer("HUD_SYM_BRT", 34, 3002, 141, {0, 1}, "HUD Control Panel", "HUD Symbology Brightness Control Knob")
defineToggleSwitch("HUD_SYM_BRT_SELECT", 34, 3003, 142, "HUD Control Panel", "HUD Symbology Brightness Selector Knob, DAY/NIGHT")
definePotentiometer("HUD_BLACK_LVL", 34, 3004, 143, {0, 1}, "HUD Control Panel", "Black Level Control Knob")
defineTumb("HUD_VIDEO_CONTROL_SW", 34, 3005, 144, 0.1, {0.0, 0.2}, nil, false, "HUD Control Panel", "HUD Video Control Switch, W/B /VID/OFF")
definePotentiometer("HUD_BALANCE", 34, 3006, 145, {0, 1}, "HUD Control Panel", "Balance Control Knob")
definePotentiometer("HUD_AOA_INDEXER", 34, 3007, 146, {0, 1}, "HUD Control Panel", "AOA Indexer Control Knob")
defineToggleSwitch("HUD_ALT_SW", 34, 3008, 147, "HUD Control Panel", "Altitude Switch, BARO/RDR")
define3PosTumb("HUD_ATT_SW", 34, 3009, 148, "HUD Control Panel", "Attitude Selector Switch, INS/AUTO/STBY")
-- 19. Standby Magnetic Compass
-- 20. Station Jettison Select
defineToggleSwitch("SJ_CTR", 23, 3005, 153, "Station Jettison Select", "Station Jettison Select Button, CENTER")
defineToggleSwitch("SJ_LI", 23, 3006, 155, "Station Jettison Select", "Station Jettison Select Button, LEFT IN")
defineToggleSwitch("SJ_LO", 23, 3007, 157, "Station Jettison Select", "Station Jettison Select Button, LEFT OUT")
defineToggleSwitch("SJ_RI", 23, 3008, 159, "Station Jettison Select", "Station Jettison Select Button, RIGHT IN")
defineToggleSwitch("SJ_RO", 23, 3009, 161, "Station Jettison Select", "Station Jettison Select Button, RIGHT OUT")
defineIndicatorLight("SJ_CTR_LT", 152, "Station Jettison Select", "CTR Light")
defineIndicatorLight("SJ_LI_LT", 154, "Station Jettison Select", "LI Light")
defineIndicatorLight("SJ_LO_LT", 156, "Station Jettison Select", "LO Light")
defineIndicatorLight("SJ_RI_LT", 158, "Station Jettison Select", "RI Light")
defineIndicatorLight("SJ_RO_LT", 160, "Station Jettison Select", "RO Light")
-- 21. Flaps, Landing Gear and Stores Indicator Panel
defineIndicatorLight("FLP_LG_NOSE_GEAR_LT", 166, "Flaps, Landing Gear, Stores Indicator Panel", "NOSE GEAR")
defineIndicatorLight("FLP_LG_LEFT_GEAR_LT", 165, "Flaps, Landing Gear, Stores Indicator Panel", "LEFT GEAR")
defineIndicatorLight("FLP_LG_RIGHT_GEAR_LT", 167, "Flaps, Landing Gear, Stores Indicator Panel", "RIGHT GEAR")
defineIndicatorLight("FLP_LG_HALF_FLAPS_LT", 163, "Flaps, Landing Gear, Stores Indicator Panel", "HALF FLAPS")
defineIndicatorLight("FLP_LG_FULL_FLAPS_LT", 164, "Flaps, Landing Gear, Stores Indicator Panel", "FULL FLAPS")
defineIndicatorLight("FLP_LG_FLAPS_LT", 162, "Flaps, Landing Gear, Stores Indicator Panel", "FLAPS")
-- 22. Integrated Fuel/Engine Indicator (IFEI)
definePushButton("IFEI_MODE_BTN", 33, 3001, 168, "Integrated Fuel/Engine Indicator (IFEI)", "Mode Button")
definePushButton("IFEI_QTY_BTN", 33, 3002, 169, "Integrated Fuel/Engine Indicator (IFEI)", "QTY Button")
definePushButton("IFEI_UP_BTN", 33, 3003, 170, "Integrated Fuel/Engine Indicator (IFEI)", "Up Arrow Button")
definePushButton("IFEI_DWN_BTN", 33, 3004, 171, "Integrated Fuel/Engine Indicator (IFEI)", "Down Arrow Button")
definePushButton("IFEI_ZONE_BTN", 33, 3005, 172, "Integrated Fuel/Engine Indicator (IFEI)", "ZONE Button")
definePushButton("IFEI_ET_BTN", 33, 3006, 173, "Integrated Fuel/Engine Indicator (IFEI)", "ET Button")
local txt_BINGO = ""
local txt_CLOCK_H = ""
local txt_CLOCK_M = ""
local txt_CLOCK_S = ""
local txt_TIMER_H = ""
local txt_TIMER_M = ""
local txt_TIMER_S = ""
local txt_DD_1 = ""
local txt_DD_2 = ""
local txt_DD_3 = ""
local txt_DD_4 = ""
local txt_FF_L = ""
local txt_FF_R = ""
local txt_FUEL_DOWN = ""
local txt_FUEL_UP = ""
local txt_OilPress_L = ""
local txt_OilPress_R = ""
local txt_RPM_L = ""
local txt_RPM_R = ""
local txt_TEMP_L = ""
local txt_TEMP_R = ""
local txt_Codes = ""
local txt_SP = ""
local txt_TimeSetMode = ""
local RPMTexture = ""
local TempTexture = ""
local FFTexture = ""
local NOZTexture = ""
local OILTexture = ""
local BINGOTexture = ""
local LScaleTexture = ""
local RScaleTexture = ""
local L0Texture = ""
local R0Texture = ""
local L50Texture = ""
local R50Texture = ""
local L100Texture = ""
local R100Texture = ""
local LPointerTexture = ""
local RPointerTexture = ""
local ZTexture = ""
moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function()
local ifei = parse_indication(5)
txt_BINGO = " "
txt_CLOCK_H = " "
txt_CLOCK_M = " "
txt_CLOCK_S = " "
txt_TIMER_H = " "
txt_TIMER_M = " "
txt_TIMER_S = " "
txt_DD_1 = " "
txt_DD_2 = " "
txt_DD_3 = " "
txt_DD_4 = " "
txt_FF_L = " "
txt_FF_R = " "
txt_FUEL_DOWN = " "
txt_FUEL_UP = " "
txt_OilPress_L = " "
txt_OilPress_R = " "
txt_RPM_L = " "
txt_RPM_R = " "
txt_TEMP_L = " "
txt_TEMP_R = " "
txt_Codes = " "
txt_SP = " "
txt_TimeSetMode = " "
RPMTexture = "0"
TempTexture = "0"
FFTexture = "0"
NOZTexture = "0"
OILTexture = "0"
BINGOTexture = "0"
LScaleTexture = "0"
RScaleTexture = "0"
L0Texture = "0"
R0Texture = "0"
L50Texture = "0"
R50Texture = "0"
L100Texture = "0"
R100Texture = "0"
LPointerTexture = "0"
RPointerTexture = "0"
ZTexture = "0"
if not ifei then
return
end
txt_BINGO = coerce_nil_to_string(ifei.txt_BINGO)
txt_CLOCK_H = coerce_nil_to_string(ifei.txt_CLOCK_H)
txt_CLOCK_M = coerce_nil_to_string(ifei.txt_CLOCK_M)
txt_CLOCK_S = coerce_nil_to_string(ifei.txt_CLOCK_S)
txt_TIMER_H = coerce_nil_to_string(ifei.txt_TIMER_H)
txt_TIMER_M = coerce_nil_to_string(ifei.txt_TIMER_M)
txt_TIMER_S = coerce_nil_to_string(ifei.txt_TIMER_S)
txt_DD_1 = coerce_nil_to_string(ifei.txt_DD_1)
txt_DD_2 = coerce_nil_to_string(ifei.txt_DD_2)
txt_DD_3 = coerce_nil_to_string(ifei.txt_DD_3)
txt_DD_4 = coerce_nil_to_string(ifei.txt_DD_4)
txt_FF_L = coerce_nil_to_string(ifei.txt_FF_L)
txt_FF_R = coerce_nil_to_string(ifei.txt_FF_R)
txt_FUEL_DOWN = coerce_nil_to_string(ifei.txt_FUEL_DOWN)
txt_FUEL_UP = coerce_nil_to_string(ifei.txt_FUEL_UP)
txt_OilPress_L = coerce_nil_to_string(ifei.txt_OilPress_L)
txt_OilPress_R = coerce_nil_to_string(ifei.txt_OilPress_R)
txt_RPM_L = coerce_nil_to_string(ifei.txt_RPM_L)
txt_RPM_R = coerce_nil_to_string(ifei.txt_RPM_R)
txt_TEMP_L = coerce_nil_to_string(ifei.txt_TEMP_L)
txt_TEMP_R = coerce_nil_to_string(ifei.txt_TEMP_R)
txt_Codes = coerce_nil_to_string(ifei.txt_Codes)
txt_SP = coerce_nil_to_string(ifei.txt_SP)
txt_TimeSetMode = coerce_nil_to_string(ifei.txt_TimeSetMode)
if ifei.RPMTexture == nil then RPMTexture = "0" else RPMTexture = "1" end
if ifei.TempTexture == nil then TempTexture = "0" else TempTexture = "1" end
if ifei.FFTexture == nil then FFTexture = "0" else FFTexture = "1" end
if ifei.OILTexture == nil then OILTexture = "0" else OILTexture = "1" end
if ifei.BINGOTexture == nil then BINGOTexture = "0" else BINGOTexture = "1" end
if ifei.LScaleTexture == nil then LScaleTexture = "0" else LScaleTexture = "1" end
if ifei.RScaleTexture == nil then RScaleTexture = "0" else RScaleTexture = "1" end
if ifei.L0Texture == nil then L0Texture = "0" else L0Texture = "1" end
if ifei.R0Texture == nil then R0Texture = "0" else R0Texture = "1" end
if ifei.L50Texture == nil then L50Texture = "0" else L50Texture = "1" end
if ifei.R50Texture == nil then R50Texture = "0" else R50Texture = "1" end
if ifei.L100Texture == nil then L100Texture = "0" else L100Texture = "1" end
if ifei.R100Texture == nil then R100Texture = "0" else R100Texture = "1" end
if ifei.LPointerTexture == nil then LPointerTexture = "0" else LPointerTexture = "1" end
if ifei.RPointerTexture == nil then RPointerTexture = "0" else RPointerTexture = "1" end
if ifei.ZTexture == nil then ZTexture = "0" else ZTexture = "1" end
end
defineString("IFEI_BINGO", function() return txt_BINGO end, 5, "Integrated Fuel/Engine Indicator (IFEI)", "BINGO")
defineString("IFEI_CLOCK_H", function() return txt_CLOCK_H end, 2, "Integrated Fuel/Engine Indicator (IFEI)", "CLOCK_H")
defineString("IFEI_CLOCK_M", function() return txt_CLOCK_M end, 2, "Integrated Fuel/Engine Indicator (IFEI)", "CLOCK_M")
defineString("IFEI_CLOCK_S", function() return txt_CLOCK_S end, 2, "Integrated Fuel/Engine Indicator (IFEI)", "CLOCK_S")
defineString("IFEI_TIMER_H", function() return txt_TIMER_H end, 2, "Integrated Fuel/Engine Indicator (IFEI)", "TIMER_H")
defineString("IFEI_TIMER_M", function() return txt_TIMER_M end, 2, "Integrated Fuel/Engine Indicator (IFEI)", "TIMER_M")
defineString("IFEI_TIMER_S", function() return txt_TIMER_S end, 2, "Integrated Fuel/Engine Indicator (IFEI)", "TIMER_S")
defineString("IFEI_DD_1", function() return txt_DD_1 end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "DD_1")
defineString("IFEI_DD_2", function() return txt_DD_2 end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "DD_2")
defineString("IFEI_DD_3", function() return txt_DD_3 end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "DD_3")
defineString("IFEI_DD_4", function() return txt_DD_4 end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "DD_4")
defineString("IFEI_FF_L", function() return txt_FF_L end, 3, "Integrated Fuel/Engine Indicator (IFEI)", "FF_L")
defineString("IFEI_FF_R", function() return txt_FF_R end, 3, "Integrated Fuel/Engine Indicator (IFEI)", "FF_R")
defineString("IFEI_FUEL_DOWN", function() return txt_FUEL_DOWN end, 6, "Integrated Fuel/Engine Indicator (IFEI)", "FUEL_DOWN")
defineString("IFEI_FUEL_UP", function() return txt_FUEL_UP end, 6, "Integrated Fuel/Engine Indicator (IFEI)", "FUEL_UP")
defineString("IFEI_OIL_PRESS_L", function() return txt_OilPress_L end, 2, "Integrated Fuel/Engine Indicator (IFEI)", "OilPress_L")
defineString("IFEI_OIL_PRESS_R", function() return txt_OilPress_R end, 2, "Integrated Fuel/Engine Indicator (IFEI)", "OilPress_R")
defineString("IFEI_RPM_L", function() return txt_RPM_L end, 2, "Integrated Fuel/Engine Indicator (IFEI)", "RPM_L")
defineString("IFEI_RPM_R", function() return txt_RPM_R end, 2, "Integrated Fuel/Engine Indicator (IFEI)", "RPM_R")
defineString("IFEI_TEMP_L", function() return txt_TEMP_L end, 3, "Integrated Fuel/Engine Indicator (IFEI)", "TEMP_L")
defineString("IFEI_TEMP_R", function() return txt_TEMP_R end, 3, "Integrated Fuel/Engine Indicator (IFEI)", "TEMP_R")
defineString("IFEI_CODES", function() return txt_Codes end, 3, "Integrated Fuel/Engine Indicator (IFEI)", "Codes")
defineString("IFEI_SP", function() return txt_SP end, 3, "Integrated Fuel/Engine Indicator (IFEI)", "SP")
defineString("IFEI_TIME_SET_MODE", function() return txt_TimeSetMode end, 6, "Integrated Fuel/Engine Indicator (IFEI)", "Time Set Mode")
defineString("IFEI_RPM_TEXTURE", function() return RPMTexture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "RPM Texture Visible: 1 = yes, 0 = no")
defineString("IFEI_TEMP_TEXTURE", function() return TempTexture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "Temp Texture Visible: 1 = yes, 0 = no")
defineString("IFEI_FF_TEXTURE", function() return FFTexture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "FF Texture Visible: 1 = yes, 0 = no")
defineString("IFEI_OIL_TEXTURE", function() return OILTexture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "OIL Texture Visible: 1 = yes, 0 = no")
defineString("IFEI_BINGO_TEXTURE", function() return BINGOTexture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "BINGO Texture Visible: 1 = yes, 0 = no")
defineString("IFEI_LSCALE_TEXTURE", function() return LScaleTexture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "Left Scale Texture Visible: 1 = yes, 0 = no")
defineString("IFEI_RSCALE_TEXTURE", function() return RScaleTexture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "Right Scale Texture Visible: 1 = yes, 0 = no")
defineString("IFEI_L0_TEXTURE", function() return L0Texture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "Left 0 Texture Visible: 1 = yes, 0 = no")
defineString("IFEI_L0_TEXTURE", function() return R0Texture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "Right 0 Texture Visible: 1 = yes, 0 = no")
defineString("IFEI_L50_TEXTURE", function() return L50Texture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "Left 50 Texture Visible: 1 = yes, 0 = no")
defineString("IFEI_R50_TEXTURE", function() return R50Texture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "Right 50 Texture Visible: 1 = yes, 0 = no")
defineString("IFEI_L100_TEXTURE", function() return L100Texture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "Left 100 Texture Visible: 1 = yes, 0 = no")
defineString("IFEI_R100_TEXTURE", function() return R100Texture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "Right 100 Texture Visible: 1 = yes, 0 = no")
defineString("IFEI_LPOINTER_TEXTURE", function() return LPointerTexture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "Left Pointer Texture Visible: 1 = yes, 0 = no")
defineString("IFEI_RPOINTER_TEXTURE", function() return RPointerTexture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "Right Pointer Texture Visible: 1 = yes, 0 = no")
defineString("IFEI_Z_TEXTURE", function() return ZTexture end, 1, "Integrated Fuel/Engine Indicator (IFEI)", "Zulu Texture Visible: 1 = yes, 0 = no")
-- 23. HUD Video Record Panel
definePotentiometer("IFEI", 33, 3007, 174, {0, 1}, "HUD Video Record Panel", "Brightness Control Knob")
define3PosTumb("SELECT_HMD_LDDI_RDDI", 0, 3104, 175, "HUD Video Record Panel", "Selector Switch, HMD/LDDI/RDDI") -- From TODO, will change
define3PosTumb("SELECT_HUD_LDDI_RDDI", 0, 3105, 176, "HUD Video Record Panel", "Selector Switch, HUD/LDIR/RDDI") -- From TODO, will change
define3PosTumb("MODE_SELECTOR_SW", 0, 3106, 176, "HUD Video Record Panel", "Mode Selector Switch, MAN/OFF/AUTO") -- From TODO, will change
-- 24. AMPCD
definePotentiometer("AMPCD_BRT_CTL", 37, 3001, 203, {0, 1}, "AMPCD", "Brightness Control Knob")
define3PosTumb("AMPCD_NIGHT_DAY", 37, 3002, 177, "AMPCD", "Night/Day Brightness Selector")
define3PosTumb("AMPCD_SYM_SW", 37, 3004, 179, "AMPCD", "Symbology Control Switch")
define3PosTumb("AMPCD_CONT_SW", 37, 3006, 182, "AMPCD", "Contrast Control Switch")
define3PosTumb("AMPCD_GAIN_SW", 37, 3008, 180, "AMPCD", "Gain Control Switch")
definePushButton("AMPCD_PB_01", 37, 3011, 183, "AMPCD", "Pushbutton 1")
definePushButton("AMPCD_PB_02", 37, 3012, 184, "AMPCD", "Pushbutton 2")
definePushButton("AMPCD_PB_03", 37, 3013, 185, "AMPCD", "Pushbutton 3")
definePushButton("AMPCD_PB_04", 37, 3014, 186, "AMPCD", "Pushbutton 4")
definePushButton("AMPCD_PB_05", 37, 3015, 187, "AMPCD", "Pushbutton 5")
definePushButton("AMPCD_PB_06", 37, 3016, 188, "AMPCD", "Pushbutton 6")
definePushButton("AMPCD_PB_07", 37, 3017, 189, "AMPCD", "Pushbutton 7")
definePushButton("AMPCD_PB_08", 37, 3018, 190, "AMPCD", "Pushbutton 8")
definePushButton("AMPCD_PB_09", 37, 3019, 191, "AMPCD", "Pushbutton 9")
definePushButton("AMPCD_PB_10", 37, 3020, 192, "AMPCD", "Pushbutton 10")
definePushButton("AMPCD_PB_11", 37, 3021, 193, "AMPCD", "Pushbutton 11")
definePushButton("AMPCD_PB_12", 37, 3022, 194, "AMPCD", "Pushbutton 12")
definePushButton("AMPCD_PB_13", 37, 3023, 195, "AMPCD", "Pushbutton 13")
definePushButton("AMPCD_PB_14", 37, 3024, 196, "AMPCD", "Pushbutton 14")
definePushButton("AMPCD_PB_15", 37, 3025, 197, "AMPCD", "Pushbutton 15")
definePushButton("AMPCD_PB_16", 37, 3026, 198, "AMPCD", "Pushbutton 16")
definePushButton("AMPCD_PB_17", 37, 3027, 199, "AMPCD", "Pushbutton 17")
definePushButton("AMPCD_PB_18", 37, 3028, 200, "AMPCD", "Pushbutton 18")
definePushButton("AMPCD_PB_19", 37, 3029, 201, "AMPCD", "Pushbutton 19")
definePushButton("AMPCD_PB_20", 37, 3030, 202, "AMPCD", "Pushbutton 20")
-- 25. Standby Attitude Reference Indicator
definePushButton("SAI_TEST_BTN", 32, 3001, 215, "Standby Attitude Reference Indicator", "Test Button")
definePushButton("SAI_CAGE", 32, 3002, 213, "Standby Attitude Reference Indicator", "Pull to uncage")
defineRotary("SAI_SET", 32, 3003, 214, "Standby Attitude Reference Indicator", "Adjust Attitude")
defineFloat("SAI_PITCH", 205, {0, 1}, "Standby Attitude Reference Indicator", "Pitch")
defineFloat("SAI_BANK", 206, {0, 1}, "Standby Attitude Reference Indicator", "Bank")
defineFloat("SAI_ATT_WARNING_FLAG", 209, {0, 1}, "Standby Attitude Reference Indicator", "Attitude Warning Flag")
defineFloat("SAI_MAN_PITCH_ADJ", 210, {0, 1}, "Standby Attitude Reference Indicator", "Manual Pitch Adjustment")
defineFloat("SAI_SLIP_BALL", 207, {0, 1}, "Standby Attitude Reference Indicator", "Slip Ball")
defineFloat("SAI_RATE_OF_TURN", 208, {0, 1}, "Standby Attitude Reference Indicator", "Rate Of Turn")
-- 26. Azimuth Indicator
-- 27. Standby Airspeed Indicator
defineFloat("STBY_ASI_AIRSPEED", 217, {0, 1}, "Standby Airspeed Indicator", "Airspeed")
-- 28. Standby Altimeter
defineRotary("STBY_PRESS_ALT", 26, 3001, 224, "Standby Altimeter", "Pressure Setting Knob")
defineFloat("STBY_ALT_100_FT_PTR", 218, {0, 1}, "Standby Altimeter", "100 ft pointer")
defineFloat("STBY_ALT_10000_FT_CNT", 220, {0, 1}, "Standby Altimeter", "10000 ft count")
defineFloatWithValueConversion("STBY_ALT_1000_FT_CNT", 219, {0, 1}, {-1.0, 0.0, 0.0, 10.0}, {0.9, 1.0, 0.0, 1.0}, "Standby Altimeter", "1000 ft count")
defineFloat("STBY_PRESS_SET_0", 221, {0, 1}, "Standby Altimeter", "Pressure Setting 1")
defineFloat("STBY_PRESS_SET_1", 222, {0, 1}, "Standby Altimeter", "Pressure Setting 2")
defineFloatWithValueConversion("STBY_PRESS_SET_2", 223, {0, 1}, {26, 31}, {0.0, 1.0}, "Standby Altimeter", "Pressure Setting 3")
-- 29. Standby Rate of Climb Indicator
defineFloatWithValueConversion("VSI", 225, {0, 1}, {-6000.0, -4000.0, -3000.0, -2000.0, -1000.0, -500.0, 0.0, 500.0, 1000.0, 2000.0, 3000.0, 4000.0, 6000.0}, { -1.0, -0.83, -0.73, -0.605, -0.40, -0.22, 0.0, 0.22, 0.40, 0.605, 0.73, 0.83, 1.0}, "Standby Rate of Climb Indicator", "Vertical Speed")
-- 30. Environment Control Louver
definePotentiometer("LEFT_LOUVER", 11, 3010, 505, {0, 1}, "Environment Control Louver", "Left Louver")
definePotentiometer("RIGHT_LOUVER", 11, 3011, 506, {0, 1}, "Environment Control Louver", "Right Louver") -- this is the same as left in clickabledata, seems incorrect
-- 31. Landing Gear Handle and Warning Tone Silence
defineIndicatorLight("LANDING_GEAR_HANDLE_LT", 227, "Landing Gear Handle and Warning Tone Silence", "Landing Gear Handle Light")
defineToggleSwitch("GEAR_LEVER", 5, 3001, 226, "Landing Gear Handle and Warning Tone Silence", "Gear Lever")
defineToggleSwitch("EMERGENCY_GEAR_ROTATE", 5, 3002, 228, "Landing Gear Handle and Warning Tone Silence", "Emergency Gear Rotate")
definePushButton("GEAR_DOWNLOCK_OVERRIDE_BTN", 5, 3003, 229, "Landing Gear Handle and Warning Tone Silence", "Landing Gear Override")
definePushButton("GEAR_SILENCE_BTN", 40, 3018, 230, "Landing Gear Handle and Warning Tone Silence", "Warning Tone Silence Button - Push to silence")
-- 32. Select Jettison Button
definePushButton("SEL_JETT_BTN", 23, 3010, 235, "Select Jettison Button", "Selective Jettison Pushbutton")
defineTumb("SEL_JETT_KNOB", 23, 3011, 236, 0.1, {-0.1, 0.3}, nil, false, "Select Jettison Button", "Selective Jettison Knob, L FUS MSL/SAFE/R FUS MSL/ RACK/LCHR /STORES")
defineToggleSwitch("ANTI_SKID_SW", 5, 3004, 238, "Select Jettison Button", "Anti Skid")
defineToggleSwitchToggleOnly2("LAUNCH_BAR_SW", 5, 3008, 233, "Select Jettison Button", "Launch Bar")
defineToggleSwitchToggleOnly2("HOOK_BYPASS_SW", 9, 3009, 239, "Select Jettison Button", "HOOK BYPASS Switch, FIELD/CARRIER")
define3PosTumb("FLAP_SW", 2, 3007, 234, "Select Jettison Button", "FLAP Switch, AUTO/HALF/FULL")
defineToggleSwitch("LDG_TAXI_SW", 8, 3004, 237, "Select Jettison Button", "LDG/TAXI LIGHT Switch")
defineFloat("HYD_IND_BRAKE", 242, {0, 1}, "Select Jettison Button", "HYD Indicator Brake")
-- 33. Brake Accumulator Pressure Gage
-- 34. Emergency and Parking Brake Handle
defineToggleSwitch("EMERGENCY_PARKING_BRAKE_PULL", 5, 3005, 240, "Emergency and Parking Brake Handle", "Emergency/Parking Brake Pull")
defineEmergencyParkingBrake("EMERGENCY_PARKING_BRAKE_ROTATE", 5, 3007, 3006, 241, "Emergency and Parking Brake Handle", "Emergency/Parking Brake Rotate")
-- 35. Dispenser/EMC Panel
defineTumb("CMSD_DISPENSE_SW", 54, 3001, 517, 0.1, {0.0, 0.2}, nil, false, "Dispenser/EMC Panel", "DISPENSER Switch, BYPASS/ON/OFF")
definePushButton("CMSD_JET_SEL_BTN", 54, 3003, 515, "Dispenser/EMC Panel", "ECM JETT JETT SEL Button - Push to jettison")
defineTumb("ECM_MODE_SW", 66, 3001, 248, 0.1, {0.0, 0.4}, nil, false, "Dispenser/EMC Panel", "ECM Mode Switch, XMIT/REC/BIT/STBY/OFF")
defineToggleSwitch("AUX_REL_SW", 23, 3012, 258, "Dispenser/EMC Panel", "Auxiliary Release Switch, ENABLE/NORM")
-- 36. RWR Control Indicator
definePushButton("RWR_POWER_BTN", 53, 3001, 277, "RWR Control Indicator", "ALR-67 POWER Pushbutton")
definePushButton("RWR_DISPLAY_BTN", 53, 3002, 275, "RWR Control Indicator", "ALR-67 DISPLAY Pushbutton")
definePushButton("RWR_SPECIAL_BTN", 53, 3003, 272, "RWR Control Indicator", "ALR-67 SPECIAL Pushbutton")
definePushButton("RWR_OFFSET_BTN", 53, 3004, 269, "RWR Control Indicator", "ALR-67 OFFSET Pushbutton")
definePushButton("RWR_BIT_BTN", 53, 3005, 266, "RWR Control Indicator", "ALR-67 BIT Pushbutton")
definePotentiometer("RWR_DMR_CTRL", 53, 3006, 263, {0, 1}, "RWR Control Indicator", "ALR-67 DMR Control Knob")
defineTumb("RWR_DIS_TYPE_SW", 53, 3007, 261, 0.1, {0.0, 0.4}, nil, false, "RWR Control Indicator", "ALR-67 DIS TYPE Switch, N/I/A/U/F")
definePotentiometer("RWR_RWR_INTESITY", 53, 3008, 216, {0, 1}, "RWR Control Indicator", "RWR Intensity Knob")
defineIndicatorLight("RWR_LOWER_LT", 276, "RWR Control Indicator", "ALR-67 POWER Light ON (green)")
defineIndicatorLight("RWR_LIMIT_LT", 273, "RWR Control Indicator", "ALR-67 LIMIT Light (green)")
defineIndicatorLight("RWR_DISPLAY_LT", 274, "RWR Control Indicator", "ALR-67 DISPLAY Light (green)")
defineIndicatorLight("RWR_SPECIAL_EN_LT", 270, "RWR Control Indicator", "ALR-67 SPECIAL ENABLE Light (green)")
defineIndicatorLight("RWR_SPECIAL_LT", 271, "RWR Control Indicator", "ALR-67 SPECIAL Light (green)")
defineIndicatorLight("RWR_ENABLE_LT", 267, "RWR Control Indicator", "ALR-67 ENABLE Light (green)")
defineIndicatorLight("RWR_OFFSET_LT", 268, "RWR Control Indicator", "ALR-67 OFFSET Light (green)")
defineIndicatorLight("RWR_FAIL_LT", 264, "RWR Control Indicator", "ALR-67 FAIL Light (red)")
defineIndicatorLight("RWR_BIT_LT", 265, "RWR Control Indicator", "ALR-67 BIT Light (green)")
-- 37. Clock
defineFloat("CLOCK_HOURS", 278, {0, 1}, "Clock", "Hours")
defineFloat("CLOCK_MINUTES", 289, {0, 1}, "Clock", "Minutes")
defineFloat("CLOCK_ELAPSED_MINUTES", 281, {0, 1}, "Clock", "Elapsed Minutes")
defineFloat("CLOCK_ELAPSED_SECONDS", 280, {0, 1}, "Clock", "Elapsed Seconds")
-- 38. Rudder Pedal Adjust Level
defineToggleSwitch("RUDDER_PEDAL_ADJUST", 7, 3012, 260, "Rudder Pedal Adjust Level", "Rudder Pedal Adjust Lever")
-- 39. Cockpit Altimeter
defineFloat("PRESSURE_ALT", 285, {0, 1}, "Cockpit Altimeter", "Pressure Altitude")
-- 40. Static Source Select
-- 41. Radar Altimeter
definePushButton("RADALT_TEST_SW", 30, 3001, 292, "Radar Altimeter", "Push to Test Switch")
defineRotary("RADALT_HEIGHT", 30, 3002, 291, "Radar Altimeter", "Set low altitude pointer")
defineIndicatorLight("LOW_ALT_WARN_LT", 290, "Radar Altimeter", "Low Alt Warning")
defineFloat("RADALT_MIN_HEIGHT_PTR", 287, {0, 1}, "Radar Altimeter", "Min Height Pointer")
defineFloat("RADALT_ALT_PTR", 286, {0, 1}, "Radar Altimeter", "Altitude Pointer")
defineFloat("RADALT_OFF_FLAG", 288, {0, 1}, "Radar Altimeter", "OFF Flag")
defineIndicatorLight("RADALT_GREEN_LAMP", 289, "Radar Altimeter", "Green Lamp")
-- 42. Aircraft Bureau Number