-
Notifications
You must be signed in to change notification settings - Fork 2
/
F-14B.lua
1718 lines (1594 loc) · 121 KB
/
F-14B.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
BIOS.protocol.beginModule("F-14B", 0x1200)
BIOS.protocol.setExportModuleAircrafts({"F-14B", "F-14A-135-GR"})
--v4.3f by WarLord (aka BlackLibrary), ArturDCS, Matchstick and Bullitt
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 defineTumb = BIOS.util.defineTumb
local defineToggleSwitch = BIOS.util.defineToggleSwitch
local defineFixedStepTumb = BIOS.util.defineFixedStepTumb
local define3PosTumb = BIOS.util.define3PosTumb
local defineMultipositionSwitch = BIOS.util.defineMultipositionSwitch
local defineFloat = BIOS.util.defineFloat
local defineIntegerFromGetter = BIOS.util.defineIntegerFromGetter
local defineString = BIOS.util.defineString
-- remove Arg# Stick 33
----------------------------------------- Extra Functions
local function defineIndicatorLightMulti1(msg, arg_number, category, description) --red
local value = moduleBeingDefined.memoryMap:allocateInt {
maxValue = 1
}
assert(value.shiftBy ~= nil)
moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function(dev0)
if dev0:get_argument_value(arg_number) >= 0.4 and dev0:get_argument_value(arg_number) < 0.6 then
value:setValue(1)
else
value:setValue(0)
end
end
document {
identifier = msg,
category = category,
description = description,
control_type = "led",
inputs = {},
outputs = {
{ ["type"] = "integer",
suffix = "",
address = value.address,
mask = value.mask,
shift_by = value.shiftBy,
max_value = 1,
description = "Multi Led Color 1; Light is on between 0.4 and 0.59"
}
}
}
end
local function defineIndicatorLightMulti2(msg, arg_number, category, description) --green
local value = moduleBeingDefined.memoryMap:allocateInt {
maxValue = 1
}
assert(value.shiftBy ~= nil)
moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function(dev0)
if dev0:get_argument_value(arg_number) >= 0.8 and dev0:get_argument_value(arg_number) < 0.99 then
value:setValue(1)
else
value:setValue(0)
end
end
document {
identifier = msg,
category = category,
description = description,
control_type = "led",
inputs = {},
outputs = {
{ ["type"] = "integer",
suffix = "",
address = value.address,
mask = value.mask,
shift_by = value.shiftBy,
max_value = 1,
description = "Multi Led Color 2; Light is on between 0.8 and 0.98"
}
}
}
end
local function defineIndicatorLightLANTTop(msg, arg_number, category, description)
local value = moduleBeingDefined.memoryMap:allocateInt {
maxValue = 1
}
assert(value.shiftBy ~= nil)
moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function(dev0)
if dev0:get_argument_value(arg_number) >= 0.24 and dev0:get_argument_value(arg_number) < 0.49 then
value:setValue(1)
else
value:setValue(0)
end
end
document {
identifier = msg,
category = category,
description = description,
control_type = "led",
inputs = {},
outputs = {
{ ["type"] = "integer",
suffix = "",
address = value.address,
mask = value.mask,
shift_by = value.shiftBy,
max_value = 1,
description = "LANTRIN Led Top; Light is on between 0.24 and 0.48"
}
}
}
end
local function defineIndicatorLightLANT(msg, arg_number, category, description)
local value = moduleBeingDefined.memoryMap:allocateInt {
maxValue = 1
}
assert(value.shiftBy ~= nil)
moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function(dev0)
if dev0:get_argument_value(arg_number) >= 0.49 and dev0:get_argument_value(arg_number) < 0.55 then
value:setValue(1)
else
value:setValue(0)
end
end
document {
identifier = msg,
category = category,
description = description,
control_type = "led",
inputs = {},
outputs = {
{ ["type"] = "integer",
suffix = "",
address = value.address,
mask = value.mask,
shift_by = value.shiftBy,
max_value = 1,
description = "LANTRIN Led Booth; Light is on between 0.49 and 0.54"
}
}
}
end
local function defineIndicatorLightLANTBottom(msg, arg_number, category, description)
local value = moduleBeingDefined.memoryMap:allocateInt {
maxValue = 1
}
assert(value.shiftBy ~= nil)
moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function(dev0)
if dev0:get_argument_value(arg_number) >= 0.55 and dev0:get_argument_value(arg_number) < 0.99 then
value:setValue(1)
else
value:setValue(0)
end
end
document {
identifier = msg,
category = category,
description = description,
control_type = "led",
inputs = {},
outputs = {
{ ["type"] = "integer",
suffix = "",
address = value.address,
mask = value.mask,
shift_by = value.shiftBy,
max_value = 1,
description = "LANTRIN Led Bottom; Light is on between 0.55 and 0.98"
}
}
}
end
local function getHUD_Mode()
local hud_m = "1"
if GetDevice(0) == nil then
hud_m = "1"
elseif GetDevice(0):get_argument_value(1015) == 1 then --Take Off
hud_m = "1"
elseif GetDevice(0):get_argument_value(1014) == 1 then --Cruise
hud_m = "2"
elseif GetDevice(0):get_argument_value(1013) == 1 then --A2A
hud_m = "3"
elseif GetDevice(0):get_argument_value(1012) == 1 then --A2G
hud_m = "4"
elseif GetDevice(0):get_argument_value(1011) == 1 then --Landing
hud_m = "5"
else
hud_m = "1"
end
return hud_m
end
local function getSTEER_Mode()
local steer_m = "2"
if GetDevice(0) == nil then
steer_m = "2"
elseif GetDevice(0):get_argument_value(1002) == 1 then --TACAN
steer_m = "1"
elseif GetDevice(0):get_argument_value(1003) == 1 then --DEST
steer_m = "2"
elseif GetDevice(0):get_argument_value(1004) == 1 then --AWL/PCD
steer_m = "3"
elseif GetDevice(0):get_argument_value(1005) == 1 then --Vector
steer_m = "4"
elseif GetDevice(0):get_argument_value(1006) == 1 then --Manual
steer_m = "5"
else
steer_m = "2"
end
return steer_m
end
local function getAIRSOURCE_Mode()
local airsource_m = "5"
if GetDevice(0) == nil then
airsource_m = "5"
elseif GetDevice(0):get_argument_value(929) == 1 then --RAM
airsource_m = "1"
elseif GetDevice(0):get_argument_value(930) == 1 then --LEFT
airsource_m = "2"
elseif GetDevice(0):get_argument_value(931) == 1 then --RIGHT
airsource_m = "3"
elseif GetDevice(0):get_argument_value(932) == 1 then --BOTH
airsource_m = "4"
elseif GetDevice(0):get_argument_value(933) == 1 then --OFF
airsource_m = "5"
else
airsource_m = "5"
end
return airsource_m
end
--------------------------------- Matchstick
local function parse_indication_number_index(indicator_id)
-- Custom version of parse_indication function that uses numbers for the index of the output table
-- for use in situations where the names of values in the indication are unusable (eg random GUID)
-- also adds the number of rows to the table at index 0
local t = {}
local li = list_indication(indicator_id)
local m = li:gmatch("-----------------------------------------\n([^\n]+)\n([^\n]*)\n")
local counter = 0
while true do
local name, value = m()
counter = counter + 1
if not name then break end
t[counter]=value
end
t[0] = counter
if t == nil then return end
return t
end
local function get_radio_remote_display(indicatorId,testButtonId)-- Data from specified device (9=Pilot UHF, 10=RIO UHF, 13=Pilot VHF/UHF)
local data = parse_indication_number_index(indicatorId);-- status of relevant test button (ID 15004 = Pilot UHF, 405 = RIO UHF, 15003 = Pilot VHF/UHF)
local testPressed = GetDevice(0):get_argument_value(testButtonId)
local retVal
if data and data[0] then
-- data[0] holds the length of the data table. 7 Indicates it is in manual frequency mode otherwise it is in preset mode.
-- testPressed indicates the current value of the specified radio display test button - if pressed we need to return the test value not the current manual or preset frequency.
-- depending on the type of data and the test button status assemble the result including separator if necessary.
-- 2021/11/23 - Heatblur have changed the order of items in the List Indication for the Pilot Remove Displays but not for the RIO.
-- So we now need two different versions of the code depending which display we are requesting.
if indicatorId == 10 then
if data[0]==7 and testPressed == 0 then
retVal = data[5]:sub(1,3) .. data[6] .. data[5]:sub(4)
elseif data[0]==7 then
retVal = data[3]:sub(1,3) .. data[4] .. data[3]:sub(4)
elseif testPressed == 0 then
retVal = data[5]
else
retVal = data[3]:sub(1,3) .. data[4] .. data[3]:sub(4)
end
else
if data[0]==7 and testPressed == 0 then
retVal = data[3]:sub(1,3) .. data[4] .. data[3]:sub(4)
elseif data[0]==7 then
retVal = data[5]:sub(1,3) .. data[6] .. data[5]:sub(4)
elseif testPressed == 0 then
retVal = data[3]
else
retVal = data[4]:sub(1,3) .. data[5] .. data[4]:sub(4)
end
end
end
if retVal == nil then return end
return retVal
end
local HSD_TACAN_RANGE = ""
local HSD_TACAN_CRS = ""
local HSD_MAN_CRS = ""
moduleBeingDefined.exportHooks[#moduleBeingDefined.exportHooks+1] = function()
HSDInd = parse_indication_number_index(1);
if getSTEER_Mode()=="1" then
HSD_TACAN_RANGE = HSDInd[19]
HSD_TACAN_CRS = HSDInd[20]
HSD_TACAN_CRSint = tonumber(HSD_TACAN_CRS)
elseif getSTEER_Mode()=="5" then
HSD_MAN_CRS = HSDInd[16]
HSD_MAN_CRSint = tonumber(HSD_MAN_CRS)
end
end
--------------------------------- Matchstick End
----------------------------------------- BIOS-Profile
-- Hydraulics
defineToggleSwitch("PLT_HYD_TRANS_PUMPLT_SW", 13, 3001, 629, "Hydraulics", "PILOT Hydraulic Transfer Pump Switch")
defineToggleSwitch("PLT_HYD_TRANS_PUMPLT_COVER", 13, 3002, 630, "Hydraulics", "PILOT Hydraulic Transfer Pump Switch Cover")
defineToggleSwitch("PLT_HYD_ISOL_SW", 13, 3005, 631, "Hydraulics", "PILOT Hydraulic Isolation Switch")
define3PosTumb("PLT_HYD_EMERG_FCONTR_SW", 13, 3003, 928, "Hydraulics", "PILOT Hydraulic Emergency Flight Control Switch")
defineToggleSwitch("PLT_HYD_EMERG_FCONTR_COVER", 13, 3004, 615, "Hydraulics", "PILOT Hydraulic Emergency Flight Control Switch Cover")
defineToggleSwitch("PLT_HYD_HAND_PUMP", 13, 3006, 13133, "Hydraulics", "PILOT Hydraulic Hand Pump") --632
-- Master Reset
definePushButton("PLT_MASTER_RESET", 23, 3058, 1071, "Master Reset", "PILOT MASTER RESET")
-- AICS
defineToggleSwitch("PLT_INLET_RAMPS_L", 14, 3007, 2100, "AICS", "PILOT Stow Inlet Ramps Left Switch")
defineToggleSwitch("PLT_INLET_RAMPS_R", 14, 3008, 2101, "AICS", "PILOT Stow Inlet Ramps Right Switch")
-- Wing Sweep
defineToggleSwitch("PLT_EMERG_WING_SWEEPLT_COVER", 17, 3029, 317, "Wing Sweep", "PILOT Emergency Wing Sweep Handle Cover")
definePotentiometer("PLT_EMERG_WING_SWEEPLT_LEVER", 17, 3031, 384, {0, 1}, "Wing Sweep", "PILOT Emergency Wing Sweep Handle")
defineToggleSwitch("PLT_EMERG_WING_SWEEPLT_POP", 17, 3030, 15096, "Wing Sweep", "PILOT Emergency Wing Sweep Handle Pop out")
--Radar Altimeter
definePushButton("PLT_RADAR_ALT_BIT", 30, 3485, 16020, "Radar Altimeter", "PILOT Radar Altimeter BIT Test Button")
defineRotary("PLT_RADAR_ALT_KNOB", 30, 3484, 308, "Radar Altimeter", "PILOT Radar Altimeter Control Knob")
-- Airspeed Indicator
definePushButton("PLT_AIRSPD_KNOB_PUSH", 28, 3492, 2127, "Airspeed Indicator", "PILOT Airspeed Indicator Bug Push Knob")
defineRotary("PLT_AIRSPD_KNOB", 28, 3491, 310, "Airspeed Indicator", "PILOT Airspeed Indicator Bug Knob")
definePushButton("RIO_AIRSPD_KNOB_PUSH", 28, 3651, 255, "Airspeed Indicator", "RIO Airspeed Indicator Bug Push Knob")
defineRotary("RIO_AIRSPD_KNOB", 28, 3652, 254, "Airspeed Indicator", "RIO Airspeed Indicator Bug Knob")
-- Altimeter
define3PosTumb("PLT_ALTIMETER_MODE", 29, 3487, 307, "Altimeter", "PILOT Altimeter Mode Switch")
defineRotary("PLT_ALTIMETER_KNOB", 29, 3486, 306, "Altimeter", "PILOT Altimeter Pressure Setting")
-- RIO Altimeter
define3PosTumb("RIO_ALTIMETER_MODE", 29, 3490, 20307, "Altimeter", "RIO Altimeter Mode Switch")
defineRotary("RIO_ALTIMETER_KNOB", 29, 3489, 20306, "Altimeter", "RIO Altimeter Pressure Setting")
-- Gear
defineToggleSwitch("PLT_GEAR_LEVER", 18, 3016, 326, "Gear", "PILOT Landing Gear Lever")
defineToggleSwitch("PLT_GEAR_LEVER_EMERG", 18, 3646, 16015, "Gear", "PILOT Landing Gear Lever RB emergency extend")
definePushButton("PLT_LAUNCHBAR_ABORT", 18, 3672, 497, "Gear", "PILOT Launch Bar Abort")
defineToggleSwitch("PLT_LAUNCHBAR_ABORT_COVER", 18, 3673, 496, "Gear", "PILOT Launch Bar Abort Switch Cover")
define3PosTumb("PLT_NOSE_STRUT_SW", 18, 3019, 1075, "Gear", "PILOT Nose Strut Compression Switch")
-- Hook
defineToggleSwitch("PLT_HOOK_LEVER", 18, 3021, 238, "Gear", "PILOT Hook Extension Handle")
defineToggleSwitch("PLT_HOOK_LEVER_EMERG", 18, 3022, 15078, "Gear", "PILOT Hook Extension Handle RB cycle emergency mode")
-- Brakes
define3PosTumb("PLT_ANTI_SKID_SW", 18, 3014, 1072, "Brakes", "Anti-Skid Spoiler BK Switch")
defineToggleSwitch("PLT_PARK_BRAKE", 18, 3013, 237, "Brakes", "PILOT Parking Brake Handle")
-- SAS
defineToggleSwitch("PLT_AFCS_PITCH", 22, 3034, 2106, "SAS", "PILOT AFCS Stability Augmentation - Pitch")
defineToggleSwitch("PLT_AFCS_ROLL", 22, 3035, 2107, "SAS", "PILOT AFCS Stability Augmentation - Roll")
defineToggleSwitch("PLT_AFCS_YAW", 22, 3036, 2108, "SAS", "PILOT AFCS Stability Augmentation - Yaw")
-- Autopilot
define3PosTumb("PLT_AUTOPLT_VECTOR_CARRIER", 22, 3037, 2109, "Autopilot", "PILOT Autopilot - Vector / Automatic Carrier Landing")
defineToggleSwitch("PLT_AUTOPLT_ALT", 22, 3038, 2110, "Autopilot", "PILOT Autopilot - Altitude Hold")
define3PosTumb("PLT_AUTOPLT_HDG", 22, 3039, 2111, "Autopilot", "PILOT Autopilot - Heading / Ground Track")
defineFixedStepTumb("PLT_AUTOPLT_ENGAGE", 22, 3040, 2112, 2, {-1, 1}, {-1, 1}, nil, "Autopilot", "PILOT Autopilot - Engage")
-- Flaps
definePotentiometer("PLT_FLAPS_LEVER", 19, 3044, 225, {0, 1}, "Flaps", "PILOT Flaps Lever")
-- Engine
defineToggleSwitch("PLT_ENGINE_FUEL_CUT_L", 20, 3128, 12300, "Engine", "PILOT Left Engine Fuel Cutoff")
defineToggleSwitch("PLT_ENGINE_FUEL_CUT_R", 20, 3129, 12301, "Engine", "PILOT Right Engine Fuel Cutoff")
define3PosTumb("PLT_THROTTLE_MODE", 20, 3045, 2104, "Engine", "PILOT Throttle Mode")
define3PosTumb("PLT_THROTTLE_TEMP", 20, 3047, 2103, "Engine", "PILOT Throttle Temp")
define3PosTumb("PLT_ANTI_ICE", 20, 3049, 941, "Engine", "PILOT Engine/Probe Anti-Ice")
defineToggleSwitch("PLT_ENGINE_AIRSTART", 20, 3050, 2105, "Engine", "PILOT Engine Airstart")
define3PosTumb("PLT_ENGINE_CRANK", 20, 3051, 2102, "Engine", "PILOT Engine Crank")
defineToggleSwitch("PLT_ENGINE_MODE_L", 20, 3052, 16007, "Engine", "PILOT Left Engine Mode")
defineToggleSwitch("PLT_ENGINE_MODE_R", 20, 3053, 16008, "Engine", "PILOT Right Engine Mode")
defineToggleSwitch("PLT_ASY_THRUST_LIMIT_COVER", 20, 3055, 16005, "Engine", "PILOT Asymmetric Thrust Limiter Cover")
defineToggleSwitch("PLT_ASY_THRUST_LIMIT", 20, 3054, 16006, "Engine", "PILOT Asymmetric Thrust Limiter")
-- Fuel System
defineToggleSwitch("PLT_FUEL_SHUTOFF_R", 21, 3061, 1044, "Fuel System", "PILOT Fuel Shutoff - Right")
defineToggleSwitch("PLT_FUEL_SHUTOFF_L", 21, 3062, 15081, "Fuel System", "PILOT Fuel Shutoff - Left")
defineToggleSwitch("PLT_FUEL_FEED_COVER", 21, 3064, 1094, "Fuel System", "PILOT Fuel Feed Cover")
define3PosTumb("PLT_FUEL_FEED", 21, 3065, 1095, "Fuel System", "PILOT Fuel Feed")
define3PosTumb("PLT_FUEL_WING_EXT_TRANS", 21, 3066, 1001, "Fuel System", "PILOT Fuel Wing/Ext Trans")
defineToggleSwitch("PLT_FUEL_DUMP", 21, 3067, 1074, "Fuel System", "PILOT Fuel Dump")
define3PosTumb("PLT_REFUEL_PROBE", 21, 3068, 1073, "Fuel System", "PILOT Refuel Probe")
define3PosTumb("PLT_FUEL_QUANT_SEL", 21, 3063, 1076, "Fuel System", "PILOT Fuel Quantity Selector")
definePotentiometer("PLT_BINGO_FUEL_KNOB", 21, 3069, 1050, {0, 1}, "Flaps", "PILOT BINGO Fuel Level Knob")
-- Electrics
define3PosTumb("PLT_L_GEN_SW", 15, 3009, 937, "Electrics", "PILOT Left Generator Switch")
define3PosTumb("PLT_R_GEN_SW", 15, 3010, 936, "Electrics", "PILOT Right Generator Switch")
defineToggleSwitch("PLT_EMERG_GEN_COVER", 15, 3011, 927, "Electrics", "PILOT Emergency Generator Switch Cover")
defineToggleSwitch("PLT_EMERG_GEN_SW", 15, 3012, 926, "Electrics", "PILOT Emergency Generator Switch")
-- Cockpit Mechanics
defineToggleSwitch("PLT_CANOPY_JETT", 12, 3184, 224, "Cockpit Mechanics", "PILOT Canopy Jettison")
defineToggleSwitch("RIO_CANOPY_JETT", 12, 3760, 2051, "Cockpit Mechanics", "RIO Canopy Jettison")
defineToggleSwitch("RIO_EJECT_CMD", 12, 3185, 2049, "Cockpit Mechanics", "RIO Ejection CMD Lever")
defineToggleSwitch("PLT_EJECT_SEAT_SAFE", 12, 3186, 404, "Cockpit Mechanics", "PILOT Ejection Seat Safety")
defineToggleSwitch("RIO_EJECT_SEAT_SAFE", 12, 3187, 498, "Cockpit Mechanics", "RIO Ejection Seat Safety")
defineToggleSwitch("RIO_STORAGE_BOX", 12, 3612, 122, "Cockpit Mechanics", "RIO Storage Box")
-- Enivornment Control
defineToggleSwitch("PLT_OXY_ON", 12, 3190, 8114, "Enivornment Control", "PILOT Oxygen On")
defineToggleSwitch("RIO_OXY_ON", 12, 3191, 119, "Enivornment Control", "RIO Oxygen On")
defineToggleSwitch("PLT_CABIN_PRESS_DUMP", 12, 3192, 939, "Enivornment Control", "PILOT Cabin Pressure Dump")
definePushButton("PLT_AIR_SOURCE_RAM", 12, 3193, 929, "Enivornment Control", "PILOT Air Source Ram")
definePushButton("PLT_AIR_SOURCE_OFF", 12, 3194, 933, "Enivornment Control", "PILOT Air Source Off")
definePushButton("PLT_AIR_SOURCE_L", 12, 3195, 930, "Enivornment Control", "PILOT Air Left Engine")
definePushButton("PLT_AIR_SOURCE_R", 12, 3196, 931, "Enivornment Control", "PILOT Air Right Engine")
definePushButton("PLT_AIR_SOURCE_BOTH", 12, 3197, 932, "Enivornment Control", "PILOT Air Both Engines")
define3PosTumb("PLT_WINDSHIELD_AIR", 12, 3647, 942, "Enivornment Control", "PILOT Wind Shield Air")
defineMultipositionSwitch("PLT_TEMP", 12, 3648, 950, 9, 0.125,"Enivornment Control" ,"PILOT Cabin Temperature Switch")
defineToggleSwitch("PLT_TEMP_AUTO_MAN", 12, 3649, 940, "Enivornment Control", "PILOT Temperature Auto/Man")
defineToggleSwitch("PLT_RAM_AIR", 12, 3650, 938, "Enivornment Control", "PILOT Ram Air")
-- BIT Panel
defineTumb("PLT_BIT_SWITCH", 11, 3076, 934, 1/11, {0, 1}, nil, false, "BIT Panel", "PILOT Master Test Selector (LB to rotate)")
defineToggleSwitch("PLT_BIT_SWITCH_PUSH", 11, 3077, 15098, "BIT Panel", "PILOT Master Test Selector (RB to pull/push)")
-- Light Panel
defineToggleSwitch("PLT_HOOK_BYPASS", 26, 3211, 915, "Light Panel", "PILOT Hook Bypass")
defineToggleSwitch("PLT_TAXI_LIGHT", 12, 3171, 918, "Light Panel", "PILOT Taxi Light")
define3PosTumb("PLT_FLOOD_LIGHT_RED", 12, 3172, 924, "Light Panel", "PILOT Red Flood Light")
define3PosTumb("PLT_FLOOD_LIGHT_WH", 12, 3173, 921, "Light Panel", "PILOT White Flood Light")
define3PosTumb("PLT_POS_LIGHT_WING", 12, 3174, 913, "Light Panel", "PILOT Position Lights Wings")
define3PosTumb("PLT_POS_LIGHT_TAIL", 12, 3175, 916, "Light Panel", "PILOT Position Lights Tail")
defineToggleSwitch("PLT_POS_LIGHT_FLASH", 12, 3176, 919, "Light Panel", "PILOT Position Lights Flash")
defineToggleSwitch("PLT_ANTICOL_LIGHT", 12, 3177, 923, "Light Panel", "PILOT Anti-Collision Lights")
defineMultipositionSwitch("PLT_LIGHT_INTENT_ACM", 12, 3178, 15005, 9, 0.125,"Light Panel" ,"PILOT ACM Panel Light Intensity")
defineMultipositionSwitch("PLT_LIGHT_INTENT_INDEXER", 26, 3212, 15006, 9, 0.125,"Light Panel" ,"PILOT AoA Indexer Light Intensity")
defineMultipositionSwitch("PLT_LIGHT_INTENT_INSTRUMENT", 12, 3179, 15007, 9, 0.125,"Light Panel" ,"PILOT Instrument Light Intensity")
defineMultipositionSwitch("PLT_LIGHT_INTENT_CONSOLE", 12, 3180, 15008, 9, 0.125,"Light Panel" ,"PILOT Console Light Intensity")
defineMultipositionSwitch("PLT_LIGHT_INTENT_FORMATION", 12, 3181, 15009, 9, 0.125,"Light Panel" ,"PILOT Formation Light Intensity")
-- Light panel RIO
define3PosTumb("RIO_FLOOD_LIGHT_RED", 12, 3706, 194, "Light Panel", "RIO Red Flood Light")
define3PosTumb("RIO_FLOOD_LIGHT_WH", 12, 3707, 159, "Light Panel", "RIO White Flood Light")
defineMultipositionSwitch("RIO_LIGHT_INTENT_INSTRUMENT", 12, 3708, 193, 9, 0.125,"Light Panel" ,"RIO Instrument Light Intensity")
defineMultipositionSwitch("RIO_LIGHT_INTENT_CONSOLE", 12, 3709, 192, 9, 0.125,"Light Panel" ,"RIO Console Light Intensity")
-- DISPLAY Panel: Power
defineToggleSwitch("PLT_VDI_PW_SW", 42, 3214, 1010, "Display", "PILOT VDI Power On/Off")
defineToggleSwitch("PLT_HUD_PW_SW", 40, 3213, 1009, "Display", "PILOT HUD Power On/Off")
defineToggleSwitch("PLT_HSD_PW_SW", 41, 3215, 1008, "Display", "PILOT HSD/ECMD Power On/Off")
-- DISPLAY Panel: Steer CMD
definePushButton("PLT_NAV_STEER_TACAN", 46, 3314, 1002, "Display", "PILOT Navigation Steer Commands: TACAN")
definePushButton("PLT_NAV_STEER_DEST", 46, 3315, 1003, "Display", "PILOT Navigation Steer Commands: Destination")
definePushButton("PLT_NAV_STEER_AWL", 46, 3318, 1004, "Display", "PILOT Navigation Steer Commands: AWL PCD")
definePushButton("PLT_NAV_STEER_VECTOR", 46, 3316, 1005, "Display", "PILOT Navigation Steer Commands: Vector")
definePushButton("PLT_NAV_STEER_MAN", 46, 3317, 1006, "Display", "PILOT Navigation Steer Commands: Manual")
-- DISPLAY Panel: HSD
define3PosTumb("PLT_HSD_DIS_MODE", 41, 3235, 1016, "Display", "PILOT HSD Display Mode")
defineToggleSwitch("PLT_HSD_ECM_OVER", 41, 3239, 1017, "Display", "PILOT HSD ECM Override")
-- HSD
defineRotary("PLT_HSD_KNOB_HDG", 41, 3241, 1039, "HSD", "PILOT HSD Selected Heading")
defineRotary("PLT_HSD_KNOB_CRS", 41, 3242, 1040, "HSD", "PILOT HSD Selected Course")
definePotentiometer("PLT_HSD_BRIGHT", 41, 3240, 1043, {0, 1}, "HSD", "PILOT HSD Brightness")
definePushButton("PLT_HSD_TEST", 41, 3243, 1041, "HSD", "PILOT HSD Test")
-- ECMD
definePotentiometer("RIO_ECMD_BRIGHT", 45, 3245, 2023, {0, 1}, "ECMD", "RIO ECMD Brightness")
definePushButton("RIO_ECMD_TEST", 45, 3246, 2024, "ECMD", "RIO ECMD Test")
defineToggleSwitch("RIO_ECM_MODE", 45, 3247, 189, "ECMD", "RIO ECM Display Mode")
define3PosTumb("RIO_ECM_OVERRIDE", 45, 3248, 156, "ECMD", "RIO ECM Display Override")
define3PosTumb("RIO_ECM_CORR", 45, 3249, 168, "ECMD", "RIO ECM Display Corr")
define3PosTumb("RIO_ECM_ADF", 45, 3250, 190, "ECMD", "RIO ECM Display Data/ADF")
-- TACAN Pilot Panel
defineToggleSwitch("PLT_TACAN_CMD_BUTTON", 47, 3324, 292, "TACAN PILOT", "PILOT TACAN CMD Button")
defineToggleSwitch("RIO_TACAN_CMD_BUTTON", 47, 3325, 135, "TACAN RIO", "RIO TACAN CMD Button")
defineTumb("PLT_TACAN_MODE", 47, 3326, 2041, 0.25, {0, 1}, nil, false, "TACAN PILOT", "PILOT TACAN Mode")
definePotentiometer("PLT_TACAN_VOLUME", 47, 3328, 2036, {0, 1}, "TACAN PILOT", "PILOT TACAN Volume")
defineFixedStepTumb("PLT_TACAN_MODE_NORMAL_INV", 47, 3335, 2042, 2, {-1, 1}, {-1, 1}, nil, "TACAN PILOT", "PILOT TACAN Mode Normal/Inverse")
defineFixedStepTumb("PLT_TACAN_CHANNEL", 47, 3336, 2043, 2, {-1, 1}, {-1, 1}, nil, "TACAN PILOT", "PILOT TACAN Channel XY")
definePushButton("PLT_TACAN_BIT", 47, 3334, 2115, "TACAN PILOT", "PILOT TACAN Bit")
defineTumb("PLT_TACAN_DIAL_TENS", 47, 3330, 8888, 1/12, {0, 1}, nil, false, "TACAN PILOT", "PILOT TACAN Channel Wheel (Tens)")
defineTumb("PLT_TACAN_DIAL_ONES", 47, 3332, 8889, 1/9, {0, 1}, nil, false, "TACAN PILOT", "PILOT TACAN Channel Lever (Ones)")
-- TACAN RIO Panel
defineTumb("RIO_TACAN_MODE", 47, 3338, 374, 0.25, {0, 1}, nil, false, "TACAN RIO", "RIO TACAN Mode")
definePotentiometer("RIO_TACAN_VOLUME", 47, 3340, 375, {0, 1}, "TACAN RIO", "RIO TACAN Volume")
defineToggleSwitch("RIO_TACAN_MODE_NORMAL_INV", 47, 3347, 373, "TACAN RIO", "RIO TACAN Mode Normal/Inverse")
defineToggleSwitch("RIO_TACAN_CHANNEL", 47, 3348, 372, "TACAN RIO", "RIO TACAN Channel XY")
definePushButton("RIO_TACAN_BIT", 47, 3346, 371, "TACAN RIO", "RIO TACAN Bit")
defineTumb("RIO_TACAN_DIAL_TENS", 47, 3342, 8891, 1/12, {0, 1}, nil, false, "TACAN RIO", "RIO TACAN Channel Wheel (Tens)")
defineTumb("RIO_TACAN_DIAL_ONES", 47, 3344, 8890, 1/9, {0, 1}, nil, false, "TACAN RIO", "RIO TACAN Channel Lever (Ones)")
-- AN/ARA-63 Panel
defineToggleSwitch("PLT_ARA63_PW", 48, 3319, 910, "ANARA63 Panel", "PILOT AN/ARA-63 Power")
definePushButton("PLT_ARA63_BIT", 48, 3321, 911, "ANARA63 Panel", "PILOT AN/ARA-63 BIT Button")
defineTumb("PLT_ARA63_CHAN", 48, 3322, 912, 1/19, {0 ,1}, nil, true, "ANARA63 Panel" ,"PILOT AN/ARA-63 Channel Knob")
-- Pilot TONE VOLUME Panel
definePotentiometer("PLT_ALR67_VOL", 2, 3395, 2040, {0, 1}, "Volume Panel", "PILOT ALR-67 Volume")
definePotentiometer("PLT_AIM9_VOL", 2, 3397, 2039, {0, 1}, "Volume Panel", "PILOT Sidewinder Volume")
-- ICS Pilot
definePotentiometer("PLT_ICS_VOL", 2, 3380, 2048, {0, 1}, "ICS", "PILOT ICS Volume")
defineMultipositionSwitch("PLT_ICS_AMP_SEL", 2, 3382, 2045, 3, 0.5, "ICS" ,"PILOT ICS Amplifier Selector")
define3PosTumb("PLT_ICS_FUNC_SEL", 2, 3383, 2044, "ICS", "PILOT ICS Function Selector")
-- ICS RIO
definePotentiometer("RIO_ICS_VOL", 2, 3387, 400, {0, 1}, "ICS", "RIO ICS Volume")
defineMultipositionSwitch("RIO_ICS_AMP_SEL", 2, 3389, 401, 3, 0.5, "ICS" ,"RIO ICS Amplifier Selector")
define3PosTumb("RIO_ICS_FUNC_SEL", 2, 3390, 402, "ICS", "RIO ICS Function Selector")
define3PosTumb("RIO_ICS_XMTR_SEL", 2, 3399, 381, "ICS", "RIO XMTR SEL Switch")
define3PosTumb("RIO_ICS_UHF_LWR", 2, 3598, 380, "ICS", "RIO V/UHF 2 ANT Switch")
define3PosTumb("RIO_ICS_KY_MODE", 2, 3597, 382, "ICS", "RIO KY MODE Switch")
-- UHF ARC-159
defineTumb("PLT_UHF1_FREQ_MODE", 3, 3375, 2033, 0.5, {0, 1}, nil, false, "UHF 1", "PILOT UHF ARC-159 Freq Mode GUARD/MANUAL/PRESET")
defineMultipositionSwitch("PLT_UHF1_FUNCTION", 3, 3371, 2034, 4, 0.333333, "UHF 1", "PILOT UHF ARC-159 Function ADF/BOTH/MAIN/OFF")
defineTumb("PLT_UHF1_PRESETS", 3, 3373, 2032, 0.0833333333, {0, 1}, nil, true, "UHF 1", "PILOT UHF ARC-159 Preset Channel Selector")
defineToggleSwitch("PLT_UHF1_SQUELCH", 3, 3365, 2035, "UHF 1", "PILOT UHF ARC-159 Squelch Switch")
define3PosTumb("PLT_UHF1_110_DIAL", 3, 3367, 2030, "UHF 1", "PILOT UHF ARC-159 100MHz & 10MHz Dial")
define3PosTumb("PLT_UHF1_1_DIAL", 3, 3368, 2029, "UHF 1", "PILOT UHF ARC-159 1MHz Dial")
define3PosTumb("PLT_UHF1_01_DIAL", 3, 3369, 2028, "UHF 1", "PILOT UHF ARC-159 0.1MHz Dial")
define3PosTumb("PLT_UHF1_025_DIAL", 3, 3370, 2026, "UHF 1", "PILOT UHF ARC-159 0.025MHz Dial")
defineToggleSwitch("PLT_UHF1_SHOW_PRESET_FREQ", 3, 3377, 8115, "UHF 1", "PILOT UHF ARC-159 Show Preset Frequency")
definePotentiometer("PLT_UHF1_VOL", 3, 3359, 2031, {0, 1}, "UHF 1", "PILOT UHF ARC-159 Volume")
definePotentiometer("RIO_UHF1_VOL", 3, 3361, 383, {0, 1}, "UHF 1", "RIO UHF ARC-159 Volume")
definePotentiometer("PLT_UHF1_BRIGHTNESS", 3, 3363, 2027, {0, 1}, "UHF 1", "PILOT UHF ARC-159 Display Brightness")
definePushButton("PLT_UHF1_LOAD", 3, 3378, 16009, "UHF 1", "PILOT UHF ARC-159 Load")
definePushButton("PLT_UHF1_TONE", 3, 3379, 16010, "UHF 1", "PILOT UHF ARC-159 Tone")
local function getARC159_High_Frequency()
--Export : 225000192.000000
local arc_159 = GetDevice(3)
local freq = tostring(arc_159:get_frequency())
if freq == "nan" then freq = "000000" end
freq = string.sub(freq, 1, 3)
return tonumber(freq)
end
local function getARC159_Decimal_DIAL3_Frequency()
--Export : 225975
local arc_159 = GetDevice(3)
local freq = tostring(arc_159:get_frequency())
if freq == "nan" then freq = "000000" end
--Get the 9
freq = string.sub(freq, 4, 4)
return tonumber(freq)
end
local function getARC159_Decimal_DIAL4_Frequency()
--Export : 225975192.000000
--00 25 50 75
local arc_159 = GetDevice(3)
local freq = tostring(arc_159:get_frequency())
if freq == "nan" then freq = "000000" end
--Get the 75
freq = string.sub(freq, 5, 6)
return tonumber(freq)
end
defineIntegerFromGetter("PLT_UHF_DIAL4_FREQ", getARC159_Decimal_DIAL4_Frequency, 100, "UHF 1", "PILOT Dial 4 ARC-159 Frequency")
defineIntegerFromGetter("PLT_UHF_DIAL3_FREQ", getARC159_Decimal_DIAL3_Frequency, 10, "UHF 1", "PILOT Dial 3 ARC-159 Frequency")
defineIntegerFromGetter("PLT_UHF_HIGH_FREQ", getARC159_High_Frequency, 400, "UHF 1", "PILOT High ARC-159 Frequency")
moduleBeingDefined.inputProcessors["SET_UHF_FREQ"] = function(freq)
freq = freq:gsub("%.", "")
freq = tonumber(freq)
if type(freq) == "nil" then return end
GetDevice(3):set_frequency(freq*1000)
end
-- VHF/UHF ARC-182 ("V/UHF 2")
defineMultipositionSwitch("RIO_VUHF_FREQ_MODE", 4, 3417, 353, 6, 0.2, "VUHF", "RIO VHF/UHF ARC-182 Frequency Mode 243 MAN G PRESET READ LOAD")
defineMultipositionSwitch("RIO_VUHF_MODE", 4, 3413, 358, 5, 0.25, "VUHF", "RIO VHF/UHF ARC-182 MODE OFF T/R T/R&G DF TEST")
defineTumb("RIO_VUHF_PRESETS", 4, 3415, 352, 0.0833333333, {0, 1}, nil, true, "VUHF", "RIO VHF/UHF ARC-182 Preset Channel Selector")
defineToggleSwitch("RIO_VUHF_FM_AM", 4, 3419, 359, "VUHF", "RIO VHF/UHF ARC-182 FM/AM Switch")
defineToggleSwitch("RIO_VUHF_SQUELCH", 4, 3407, 351, "VUHF", "RIO VHF/UHF ARC-182 Squelch Switch")
define3PosTumb("RIO_VUHF_110_DIAL", 4, 3409, 354, "VUHF", "RIO VUHF ARC-182 100MHz & 10MHz Dial")
define3PosTumb("RIO_VUHF_1_DIAL", 4, 3410, 355, "VUHF", "RIO VUHF ARC-182 1MHz Dial")
define3PosTumb("RIO_VUHF_01_DIAL", 4, 3411, 356, "VUHF", "RIO VUHF ARC-182 0.1MHz Dial")
define3PosTumb("RIO_VUHF_025_DIAL", 4, 3412, 357, "VUHF", "RIO VUHF ARC-182 0.025MHz Dial")
definePotentiometer("RIO_VUHF_VOL", 4, 3401, 350, {0, 1}, "VUHF", "RIO VUHF ARC-182 Volume")
definePotentiometer("PLT_VUHF_VOL", 4, 3403, 2038, {0, 1}, "VUHF", "PILOT VUHF ARC-182 Volume")
definePotentiometer("RIO_VUHF_BRIGHTNESS", 4, 3405, 360, {0, 1}, "VUHF", "RIO VUHF ARC-182 Display Brightness")
local function getARC182_High_Frequency()
--225000288
-- 65000056
local arc_182 = GetDevice(4)
local freq = tostring(arc_182:get_frequency())
if freq == "nan" then freq = "000000" end
if(string.len(freq) == 8) then
freq = string.sub(freq, 1, 2)
else
freq = string.sub(freq, 1, 3)
end
return tonumber(freq)
end
local function getARC182_Decimal_DIAL3_Frequency()
--225975288
-- 65975056
local arc_182 = GetDevice(4)
local freq = tostring(arc_182:get_frequency())
if freq == "nan" then freq = "000000" end
--Get the 9
if(string.len(freq) == 8) then
freq = string.sub(freq, 3, 3)
else
freq = string.sub(freq, 4, 4)
end
return tonumber(freq)
end
local function getARC182_Decimal_DIAL4_Frequency()
--225975288
-- 65975056
--00 25 50 75
local arc_182 = GetDevice(4)
local freq = tostring(arc_182:get_frequency())
if freq == "nan" then freq = "000000" end
--Get the 75
if(string.len(freq) == 8) then
freq = string.sub(freq, 4, 5)
else
freq = string.sub(freq, 5, 6)
end
return tonumber(freq)
end
defineIntegerFromGetter("RIO_VUHF_DIAL4_FREQ", getARC182_Decimal_DIAL4_Frequency, 100, "VUHF", "RIO Dial 4 ARC-182 Frequency")
defineIntegerFromGetter("RIO_VUHF_DIAL3_FREQ", getARC182_Decimal_DIAL3_Frequency, 10, "VUHF", "RIO Dial 3 ARC-182 Frequency")
defineIntegerFromGetter("RIO_VUHF_HIGH_FREQ", getARC182_High_Frequency, 400, "VUHF", "RIO High ARC-182 Frequency")
moduleBeingDefined.inputProcessors["SET_VUHF_FREQ"] = function(freq)
freq = freq:gsub("%.", "")
freq = tonumber(freq)
if type(freq) == "nil" then return end
GetDevice(4):set_frequency(freq*1000)
end
-- KY-28
defineTumb("RIO_KY28_POWER", 2, 3423, 116, 0.5, {0, 1}, nil, false, "KY-28", "RIO KY-28 Power Mode")
defineTumb("RIO_KY28_RADIO_SELECTOR", 2, 3425, 115, 0.5, {0, 1}, nil, false, "KY-28", "RIO KY-28 Radio Selector")
defineToggleSwitch("RIO_KY28_FLIPCOVER", 2, 3608, 150, "KY-28", "RIO KY-28 ZEROIZE Cover")
defineToggleSwitch("RIO_KY28_ZEROIZE", 2, 3427, 361, "KY-28", "RIO KY-28 ZEROIZE")
-- UHF/VHF/UHF Pilot/RIO Remote Display
definePotentiometer("PLT_UHF_REMOTE_BRIGHTNESS", 3, 3350, 1031, {0, 1}, "UHF 1", "PILOT UHF ARC-159 Remote Display Brightness")
definePotentiometer("RIO_UHF_REMOTE_BRIGHTNESS", 3, 3353, 406, {0, 1}, "UHF 1", "RIO UHF ARC-159 Remote Display Brightness")
definePotentiometer("PLT_VUHF_REMOTE_BRIGHTNESS", 4, 3356, 1030, {0, 1}, "VUHF", "PILOT VHF/UHF Radio Remote Display Brightness")
defineToggleSwitch("PLT_UHF_DISPLAY_TEST", 2, 3352, 15004, "UHF 1", "PILOT UHF ARC-159 Radio Remote Display Test")
defineToggleSwitch("RIO_UHF_DISPLAY_TEST", 3, 3355, 405, "UHF 1", "RIO UHF ARC-159 Radio Remote Display Test")
defineToggleSwitch("PLT_VUHF_DISPLAY_TEST", 3, 3355, 15003, "VUHF", "PILOT VHF/UHF ARC-182 Radio Remote Display Test")
-- DECM Panel
defineMultipositionSwitch("RIO_DECM_PW_MODE", 53, 3252, 151, 6, 0.2, "DECM Panel" ,"RIO DECM ALQ-100 Power/Mode")
definePotentiometer("RIO_DECM_VOL", 53, 3253, 9950, {0, 1}, "DECM Panel", "RIO DECM ALQ-100 Volume")
-- RWR Control Panel ALR-67
definePotentiometer("PLT_RWR_BRIGHT", 54, 3261, 16011, {0, 1}, "RWR Control Panel", "PILOT AN/ALR-67 Display Brightness")
definePotentiometer("RIO_RWR_BRIGHT", 54, 3263, 376, {0, 1}, "RWR Control Panel", "RIO AN/ALR-67 Display Brightness")
defineMultipositionSwitch("RIO_RWR_DIS_TYP", 54, 3257, 2136, 5, 0.25, "DECM Panel" ,"RIO AN/ALR-67 Display Type")
define3PosTumb("RIO_RWR_MODE", 54, 3256, 2137, "DECM Panel", "RIO AN/ALR-67 Mode")
define3PosTumb("RIO_RWR_TEST", 54, 3261, 2140, "DECM Panel", "RIO AN/ALR-67 Mode")
defineToggleSwitch("RIO_RWR_PW", 54, 3259, 2139, "DECM Panel", "RIO AN/ALR-67 Power")
definePotentiometer("RIO_RWR_VOL", 54, 3254, 2138, {0, 1}, "DECM Panel", "RIO AN/ALR-67 Volume")
-- AN/ALE-39 Mode Panel
define3PosTumb("RIO_CMDS_PW", 5, 3267, 390, "CMDS", "RIO AN/ALE-37 Power/Mode")
define3PosTumb("RIO_CMDS_DISP_CHAFF", 5, 3269, 389, "CMDS", "RIO AN/ALE-37 Chaff Dispense")
define3PosTumb("RIO_CMDS_DISP_FLAR", 5, 3270, 388, "CMDS", "RIO AN/ALE-37 Flare Dispense")
define3PosTumb("RIO_CMDS_DISP_JAMMER", 5, 3271, 387, "CMDS", "RIO AN/ALE-37 Jammer Dispense")
define3PosTumb("RIO_CMDS_FLAREMODE", 5, 3272, 398, "CMDS", "RIO AN/ALE-37 Flare Mode")
definePushButton("RIO_CMDS_FLARE_SALVO", 5, 3272, 391, "CMDS", "RIO AN/ALE-37 Flare Salvo")
definePotentiometer("RIO_CMDS_COUNT_CHAFF", 5, 3275, 386, {0, 1}, "CMDS", "AN/ALE-37 Chaff Counter")
definePotentiometer("RIO_CMDS_COUNT_FLARE", 5, 3277, 385, {0, 1}, "CMDS", "AN/ALE-37 Flare Counter")
definePotentiometer("RIO_CMDS_COUNT_JAMMER", 5, 3279, 399, {0, 1}, "CMDS", "AN/ALE-37 Jammer Counter")
-- AN/ALE-39 Program Panel
defineTumb("RIO_CMDS_LOAD_TYP_L10", 5, 3281, 206, 0.5, {0, 1}, nil, false, "CMDS Program", "RIO AN/ALE-37 L10 Load Type")
defineTumb("RIO_CMDS_LOAD_TYP_L20", 5, 3283, 207, 0.5, {0, 1}, nil, false, "CMDS Program", "RIO AN/ALE-37 L20 Load Type")
defineTumb("RIO_CMDS_LOAD_TYP_R10", 5, 3285, 209, 0.5, {0, 1}, nil, false, "CMDS Program", "RIO AN/ALE-37 R10 Load Type")
defineTumb("RIO_CMDS_LOAD_TYP_R20", 5, 3287, 208, 0.5, {0, 1}, nil, false, "CMDS Program", "RIO AN/ALE-37 R20 Load Type")
defineTumb("RIO_CMDS_CHAFF_BURST_QUAN", 5, 3298, 214, 0.2, {0, 1}, nil, false, "CMDS Program", "RIO Chaff Burst Quantity")
defineTumb("RIO_CMDS_CHAFF_BURST_INTER", 5, 3300, 215, 0.2, {0, 1}, nil, false, "CMDS Program", "RIO Chaff Burst Interval")
defineTumb("RIO_CMDS_CHAFF_SALVO_QUAN", 5, 3302, 203, 0.2, {0, 1}, nil, false, "CMDS Program", "RIO Chaff Salvo Quantity")
defineTumb("RIO_CMDS_CHAFF_SALVO_INTER", 5, 3304, 202, 0.2, {0, 1}, nil, false, "CMDS Program", "RIO Chaff Salvo Interval")
defineTumb("RIO_CMDS_FLARE_QUAN", 5, 3306, 205, 0.2, {0, 1}, nil, false, "CMDS Program", "RIO Flare Quantity")
defineTumb("RIO_CMDS_FLARE_INTER", 5, 3308, 210, 0.2, {0, 1}, nil, false, "CMDS Program", "RIO Flare Interval")
defineTumb("RIO_CMDS_JAMM_QUAN", 5, 3295, 204, 0.333, {0, 1}, nil, false, "CMDS Program", "RIO AN/ALE-37 Jammer Quantity")
defineTumb("RIO_CMDS_JAMM_INTER_UNIT", 5, 3289, 211, 0.111, {0, 1}, nil, false, "CMDS Program", "RIO Jammer Interval Units")
defineTumb("RIO_CMDS_JAMM_INTER_10", 5, 3291, 212, 0.111, {0, 1}, nil, false, "CMDS Program", "RIO Jammer Interval Tens")
defineTumb("RIO_CMDS_JAMM_INTER_100", 5, 3293, 213, 0.111, {0, 1}, nil, false, "CMDS Program", "RIO Jammer Interval Hundreds")
definePushButton("RIO_CMDS_PROG_RESET", 5, 3297, 216, "CMDS", "RIO AN/ALE-37 Programmer Reset")
-- INS
defineMultipositionSwitch("RIO_TID_MODE_NAV", 50, 3106, 50, 7, 0.1666667, "INS" ,"RIO TID Navigation Mode")
defineMultipositionSwitch("RIO_TID_MODE_DEST", 46, 3109, 51, 8, 0.142857, "INS" ,"RIO TID Destination Mode")
-- AHRS / Compass (COMP Panel)
definePotentiometer("PLT_AHRS_HDG_KNOB", 51, 3433, 904, {-1, 1}, "AHRS", "PILOT Compass HDG Slave Knob")
definePushButton("PLT_AHRS_HDG_PUSH", 51, 3432, 16014, "AHRS", "PILOT Compass HDG Slave Push")
defineTumb("PLT_AHRS_MODE", 51, 3434, 905, 1, {-1, 1}, nil, false, "AHRS", "PILOT Compass Mode")
defineFixedStepTumb("PLT_AHRS_HEMISPHERE", 51, 3436, 906, 2, {-1, 1}, {-1, 1}, nil, "AHRS", "PILOT Compass N-S Hemisphere")
definePotentiometer("PLT_AHRS_LAT", 51, 3438, 909, {0, 1}, "AHRS", "PILOT Compass LAT Correction")
-- Spoiler Overrides
defineToggleSwitch("PLT_SPOIL_OVER_COVER_INBOARD", 15, 3428, 902, "Spoiler", "PILOT Inboard Spoiler Override Cover")
defineToggleSwitch("PLT_SPOIL_OVER_COVER_OUTBOARD", 15, 3429, 903, "Spoiler", "PILOT Outboard Spoiler Override Cover")
defineToggleSwitch("PLT_SPOIL_OVER_INBOARD", 15, 3430, 908, "Spoiler", "PILOT Inboard Spoiler Override")
defineToggleSwitch("PLT_SPOIL_OVER_OUTBOARD", 15, 3431, 907, "Spoiler", "PILOT Outboard Spoiler Override")
-- Gun Elevation
defineRotary("PLT_GUN_ELEV_ADJUST", 55, 3131, 1000, "Gun", "PILOT Gun Elevation Lead Adjustment")
defineRotary("PLT_GUN_AMMU_COUNT_ADJUST", 55, 3132, 1022, "Gun", "PILOT Gun Ammunition Counter Adjustment")
-- DISPLAY Panel
definePotentiometer("PLT_HUD_PITCH_BRIGHT", 40, 3223, 1007, {0, 1}, "Display", "PILOT HUD Pitch Ladder Brightness")
defineToggleSwitch("PLT_VDI_MODE_DISP", 42, 3224, 1019, "Display", "PILOT VDI Display Mode")
defineToggleSwitch("PLT_VDI_MODE_LAND", 42, 3225, 1018, "Display", "PILOT VDI Landing Mode")
defineToggleSwitch("PLT_HUD_DECLUTTER", 40, 3226, 1021, "Display", "PILOT HUD De-clutter On/Off")
defineToggleSwitch("PLT_HUD_MODE_AWL", 40, 3227, 1020, "Display", "PILOT HUD AWL Mode")
definePushButton("PLT_HUD_MODE_TAKEOFF", 40, 3216, 1015, "Display", "PILOT HUD Take-Off Mode")
definePushButton("PLT_HUD_MODE_CRUISE", 40, 3217, 1014, "Display", "PILOT HUD Cruise Mode")
definePushButton("PLT_HUD_MODE_A2A", 40, 3218, 1013, "Display", "PILOT HUD Air-to-Air Mode")
definePushButton("PLT_HUD_MODE_A2G", 40, 3219, 1012, "Display", "PILOT HUD Air-to-Ground Mode")
definePushButton("PLT_HUD_MODE_LAND", 40, 3220, 1011, "Display", "PILOT HUD Landing Mode")
-- Standby ADI
definePushButton("PLT_STDBYAI_UNCAGE", 31, 3545, 1032, "Standby ADI", "PILOT Standby ADI Push to uncage")
defineRotary("PLT_STDBYAI_TRIM", 31, 3546, 1042, "Standby ADI", "PILOT Standby ADI Knob")
definePushButton("RIO_STDBYAI_UNCAGE", 31, 3547, 6155, "Standby ADI", "RIO Standby ADI Push to uncage")
defineRotary("RIO_STDBYAI_TRIM", 31, 3548, 6156, "Standby ADI", "RIO Standby ADI Knob")
definePushButton("PLT_ACCEL_RESET", 25, 3488, 228, "Display", "PILOT Accelerometer Reset")
-- VDI & HUD Indicator Controls
defineToggleSwitch("PLT_HUD_FILTER", 40, 3228, 1033, "HUD", "PILOT HUD Filter")
definePotentiometer("PLT_HUD_TRIM", 40, 3229, 1034, {0, 1}, "HUD", "PILOT HUD TRIM")
definePotentiometer("PLT_VSDI_TRIM", 42, 3230, 1035, {0, 1}, "HUD", "PILOT VSDI Screen Trim")
definePotentiometer("PLT_VDI_CONTRAST", 42, 3231, 1038, {0, 1}, "HUD", "PILOT VDI Screen Contrast")
definePotentiometer("PLT_VSDI_BRIGHT", 42, 3232, 1036, {0, 1}, "HUD", "PILOT VSDI Screen Brightness")
definePotentiometer("PLT_HUD_BRIGHT", 40, 3233, 1037, {0, 1}, "HUD", "PILOT HUD Brightness")
-- Under HUD / Master Arm / Gun/Weapons Panel
defineToggleSwitch("PLT_MASTER_ARM_COVER", 55, 3135, 1046, "Weapons Panel", "PILOT Master Arm Cover")
define3PosTumb("PLT_MASTER_ARM_SW", 55, 3136, 1047, "Weapons Panel", "PILOT Master Arm Switch")
defineToggleSwitch("PLT_ACM_COVER", 55, 3133, 1049, "Weapons Panel", "PILOT ACM Cover")
definePushButton("PLT_ACM_JETT", 55, 3138, 1048, "Weapons Panel", "PILOT ACM Jettison")
definePushButton("PLT_MASTER_CAUTION_RESET", 35, 3056, 9199, "Weapons Panel", "PILOT Master Caution Reset")
definePushButton("PLT_GUN_RATE", 55, 3130, 16000, "Weapons Panel", "PILOT Gun Rate")
definePushButton("PLT_SIDEWINDER_COOL", 55, 3139, 16001, "Weapons Panel", "PILOT Sidewinder Cool")
definePushButton("PLT_MISSLE_PREP", 55, 3140, 16002, "Weapons Panel", "PILOT Missile Prepare")
definePushButton("PLT_MISSLE_MODE", 55, 3141, 16003, "Weapons Panel", "PILOT Missile Mode")
definePushButton("PLT_EMERG_STORE_JETT", 55, 3142, 239, "Weapons Panel", "PILOT Emergency Stores Jettison")
defineRotary("PLT_CLOCK_WIND", 27, 3042, 1051, "Weapons Panel", "PILOT Clock Wind")
definePushButton("PLT_CLOCK_TIMER", 27, 3043, 1000, "Weapons Panel", "PILOT Clock Timer Start/Stop/Reset")
defineRotary("RIO_CLOCK_WIND", 27, 3710, 1052, "Weapons Panel", "RIO Clock Wind")
definePushButton("RIO_CLOCK_TIMER", 27, 3711, 1053, "Weapons Panel", "RIO Clock Timer Start/Stop/Reset")
-- RIO TID
defineMultipositionSwitch("RIO_TID_MODE", 43, 3112, 2005, 4, 0.33333, "TID" ,"RIO TID Mode")
defineTumb("RIO_TID_RANGE", 43, 3113, 2006, 0.5, {-1, 1}, nil, false, "TID" ,"RIO TID Range")
definePushButton("RIO_TID_NON_ATTK", 43, 3114, 226, "TID", "RIO TID Non Attack")
definePushButton("RIO_TID_JAM_STROBE", 43, 3115, 1118, "TID", "RIO TID Jam Strobe")
definePushButton("RIO_TID_DATA_LINK", 43, 3116, 1117, "TID", "RIO TID Data Link")
definePushButton("RIO_TID_SYM_ELEM", 43, 3117, 1116, "TID", "RIO TID Sym Elem")
definePushButton("RIO_TID_ALT_NUM", 43, 3118, 1115, "TID", "RIO TID Alt Num")
definePushButton("RIO_TID_RID_DSBL", 43, 3119, 2004, "TID", "RIO TID Reject Image Device disable")
definePushButton("RIO_TID_LAUNCH_ZONE", 43, 3120, 2113, "TID", "RIO TID Launch Zone")
definePushButton("RIO_TID_VEL_VECTOR", 43, 3121, 2114, "TID", "RIO TID Velocity Vector")
definePushButton("RIO_TID_CLSN", 43, 3122, 52, "TID", "RIO TID Collision Steering")
definePushButton("RIO_TID_TRACKHOLD", 43, 3123, 53, "TID", "RIO TID Track Hold")
definePotentiometer("RIO_TID_BRIGHT", 43, 3124, 48, {0, 1}, "TID", "RIO TID Brightness")
definePotentiometer("RIO_TID_CONTRAST", 43, 3125, 49, {0, 1}, "TID", "RIO TID Contrast")
-- RIO HCU
defineToggleSwitch("RIO_HCU_TCS", 58, 3096, 2007, "HCU", "RIO HCU TCS Mode")
defineToggleSwitch("RIO_HCU_RADAR", 58, 3097, 2008, "HCU", "RIO HCU Radar Mode")
defineToggleSwitch("RIO_HCU_DDD", 58, 3098, 2009, "HCU", "RIO HCU DDD Mode")
defineToggleSwitch("RIO_HCU_TID", 58, 3099, 2010, "HCU", "RIO HCU TID Mode")
define3PosTumb("RIO_HCU_TVIR_SW", 37, 3100, 2011, "HCU", "RIO HCU TV/IR Switch")
define3PosTumb("RIO_HCU_WCS", 39, 3101, 2012, "HCU", "RIO HCU WCS Switch")
definePushButton("RIO_HCU_PW_RESET", 39, 3644, 2013, "HCU", "RIO HCU Power Reset")
definePushButton("RIO_HCU_LIGHT_TEST", 39, 3645, 2014, "HCU", "RIO HCU Light Test")
-- RIO DDD
definePushButton("RIO_RADAR_5", 39, 3450, 40, "DDD", "RIO Radar 5 NM")
definePushButton("RIO_RADAR_10", 39, 3451, 41, "DDD", "RIO Radar 10 NM")
definePushButton("RIO_RADAR_20", 39, 3452, 42, "DDD", "RIO Radar 20 NM")
definePushButton("RIO_RADAR_50", 39, 3453, 43, "DDD", "RIO Radar 50 NM")
definePushButton("RIO_RADAR_100", 39, 3454, 44, "DDD", "RIO Radar 100 NM")
definePushButton("RIO_RADAR_200", 39, 3455, 45, "DDD", "RIO Radar 200 NM")
definePushButton("RIO_RADAR_PULSE", 39, 3457, 10, "DDD", "RIO Radar Pulse Search")
definePushButton("RIO_RADAR_TWSMAN", 39, 3458, 11, "DDD", "RIO Track While Scan Manual")
definePushButton("RIO_RADAR_TWSAUTO", 39, 3459, 12, "DDD", "RIO Track While Scan Auto")
definePushButton("RIO_RADAR_RWS", 39, 3460, 13, "DDD", "RIO Track While Scan")
definePushButton("RIO_RADAR_PDSRCH", 39, 3461, 14, "DDD", "RIO Radar Pulse Doppler Search")
definePushButton("RIO_RADAR_PSTT", 39, 3462, 15, "DDD", "RIO Radar Pulse Single Target Track")
definePushButton("RIO_RADAR_PDSTT", 39, 3463, 9916, "DDD", "RIO Radar Pulse Doppler Target Track")
definePushButton("RIO_DDD_IFF", 39, 3464, 17, "DDD", "RIO DDD Interrogate Friend or Foe")
definePushButton("RIO_DDD_IR", 39, 3465, 18, "DDD", "RIO DDD Infrared")
definePushButton("RIO_DDD_RADAR", 39, 3466, 19, "DDD", "RIO DDD Radar")
definePushButton("RIO_CCM_SPL", 39, 3686, 1812, "DDD", "RIO CCM SPL")
definePushButton("RIO_CCM_ALT_DIFF", 39, 3687, 1813, "DDD", "RIO CCM ALT DIFF")
definePushButton("RIO_CCM_VGS", 39, 3688, 1814, "DDD", "RIO CCM VGS")
definePotentiometer("RIO_RADAR_IR_GAIN", 39, 3473, 20, {0, 1}, "DDD", "RIO Radar IR Gain")
definePotentiometer("RIO_RADAR_IR_VOL", 39, 3474, 21, {0, 1}, "DDD", "RIO Radar IR Volume")
definePotentiometer("RIO_RADAR_IR_THERESHOLD", 39, 3475, 22, {0, 1}, "DDD", "RIO Radar IR Threshold")
definePotentiometer("RIO_DDD_BRIGHT", 39, 3476, 23, {0, 1}, "DDD", "RIO DDD Brightness")
definePotentiometer("RIO_DDD_PULSE_VID", 39, 3477, 24, {0, 1}, "DDD", "RIO DDD Pulse Video")
definePotentiometer("RIO_DDD_ERASE", 39, 3478, 25, {0, 1}, "DDD", "RIO DDD Erase")
definePotentiometer("RIO_DDD_PULSE_GAIN", 39, 3479, 26, {0, 1}, "DDD", "RIO Pulse Gain")
definePotentiometer("RIO_ACM_THERESHOLD", 39, 3480, 27, {0, 1}, "DDD", "RIO ACM Threshold")
definePotentiometer("RIO_RADAR_JAMJET", 39, 3481, 28, {0, 1}, "DDD", "RIO JAM/JET")
definePotentiometer("RIO_PD_THERESHOLD_CLUTTER", 39, 3482, 29, {0, 1}, "DDD", "RIO PD Threshold Clutter")
definePotentiometer("RIO_PD_THERESHOLD_CLEAR", 39, 3483, 30, {0, 1}, "DDD", "RIO PD Threshold Clear")
define3PosTumb("RIO_DDD_ASPECT", 39, 3467, 34, "DDD", "RIO DDD Aspect")
define3PosTumb("RIO_DDD_VC_SCALE", 39, 3468, 35, "DDD", "RIO DDD Closing Velocity Scale")
define3PosTumb("RIO_DDD_TGTS", 39, 3469, 36, "DDD", "RIO DDD Target Size")
define3PosTumb("RIO_DDD_MLC", 39, 3470, 37, "DDD", "RIO DDD Main Lobe Clutter Filter")
defineToggleSwitch("RIO_DDD_AGC", 39, 3471, 38, "DDD", "RIO DDD Automatic Gain Control")
defineToggleSwitch("RIO_DDD_PARA_AMP", 39, 3472, 3900, "DDD", "RIO DDD Parametric Amplifier")
-- RIO RADAR Panel
defineMultipositionSwitch("RIO_RADAR_ELE_BARS", 39, 3442, 79, 4, 0.33333, "Radar" ,"RIO Radar Elevation Scan")
defineMultipositionSwitch("RIO_RADAR_AZI_SCAN", 39, 3443, 80, 4, 0.33333, "Radar" ,"RIO Radar Azimuth Scan")
definePotentiometer("RIO_RADAR_ELE_CENTER", 39, 3446, 81, {-1, 1}, "Radar", "RIO Radar Elevation Center")
definePotentiometer("RIO_RADAR_AZI_CENTER", 39, 3447, 82, {-1, 1}, "Radar", "RIO Radar Azimuth Center")
defineToggleSwitch("RIO_RADAR_STABI", 39, 3449, 83, "Radar", "RIO Radar Stabilize")
define3PosTumb("RIO_RADAR_VSL", 39, 3448, 84, "Radar", "RIO Radar VSL Switch")
-- RIO TCS Controls
define3PosTumb("RIO_TCS_ACQ", 38, 3495, 87, "TCS", "RIO TCS Acquisition")
defineToggleSwitch("RIO_TCS_FOV", 38, 3494, 88, "TCS", "RIO TCS FOV")
define3PosTumb("RIO_TCS_SLAVE", 38, 3496, 89, "TCS", "RIO TCS Slave")
define3PosTumb("RIO_RECORD_PW", 38, 3617, 90, "TCS", "RIO Record Power")
defineMultipositionSwitch("RIO_RECORD_MODE", 38, 3618, 91, 5, 1.0/4.0, "TCS" ,"RIO Record Mode")
definePotentiometer("RIO_RECORD_RESET", 38, 3622, 16016, {0, 1}, "Radar", "RIO Record Reset")
-- RIO Armament Panel
defineMultipositionSwitch("RIO_WEAPON_TYPE", 55, 3146, 59, 44, 1.0/43.0, "Armament Panel" ,"RIO Weapon Type Wheel")
defineTumb("RIO_WEAPON_INTER_10", 55, 3148, 9960, 0.111, {0, 1}, nil, false, "Armament Panel", "RIO Weapon Interval x10ms")
defineTumb("RIO_WEAPON_INTER_100", 55, 3147, 9961, 0.111, {0, 1}, nil, false, "Armament Panel", "RIO Weapon Interval x100ms")
defineTumb("RIO_WEAPON_QUANT_10", 55, 3149, 9962, 0.111, {0, 1}, nil, false, "Armament Panel", "RIO Weapon Quantity 10s")
defineTumb("RIO_WEAPON_QUANTR_1", 55, 3150, 9963, 0.111, {0, 1}, nil, false, "Armament Panel", "RIO Weapon Quantity 1s")
defineMultipositionSwitch("RIO_WEAPON_ATTK_MODE", 55, 3151, 2022, 5, 0.25, "Armament Panel" ,"RIO Weapon Attack Mode")
defineMultipositionSwitch("RIO_WEAPON_ELEC_FUSE", 55, 3152, 58, 5, 0.25, "Armament Panel" ,"RIO Weapon Elec Fuse")
defineMultipositionSwitch("RIO_WEAPON_MSL_SPD", 55, 3153, 72, 6, 0.2, "Armament Panel" ,"RIO Weapon Missile Speed Gate")
define3PosTumb("RIO_WEAPON_SEL_JETT", 55, 3154, 78, "Armament Panel", "RIO Weapon Selective Jettison")
defineToggleSwitch("RIO_WEAPON_SEL_JETT_COVER", 55, 3668, 1069, "Armament Panel", "RIO Weapon Selective Jettison Aux Guard")
define3PosTumb("RIO_WEAPON_MECH_FUSE", 55, 3155, 63, "Armament Panel", "RIO RIO Weapon Mech Fuse")
define3PosTumb("RIO_WEAPON_MSL_OPT", 55, 3156, 75, "Armament Panel", "RIO RIO Weapon Missile Option")
defineToggleSwitch("RIO_WEAPON_BOMB_SINGLE", 55, 3157, 60, "Armament Panel", "RIO Weapon Bomb Single/Pairs")
defineToggleSwitch("RIO_WEAPON_BOMB_STEP", 55, 3158, 61, "Armament Panel", "RIO Weapon Bomb Step/Ripple")
defineToggleSwitch("RIO_WEAPON_AG_GUN", 55, 3159, 62, "Armament Panel", "RIO Weapon A/G Gun Mode")
defineToggleSwitch("RIO_WEAPON_JETT_RACK", 55, 3160, 66, "Armament Panel", "RIO Weapon Jettison Racks/Weapons")
defineToggleSwitch("RIO_WEAPON_JETT_TANK_L", 55, 3164, 73, "Armament Panel", "RIO Weapon Jettison Left Tank")
defineToggleSwitch("RIO_WEAPON_JETT_TANK_R", 55, 3169, 67, "Armament Panel", "RIO Weapon Jettison Right Tank")
define3PosTumb("RIO_WEAPON_JETT_STAT_1", 55, 3163, 68, "Armament Panel", "RIO Weapon Jettison Station 1")
defineToggleSwitch("RIO_WEAPON_JETT_STAT_3", 55, 3165, 65, "Armament Panel", "RIO Weapon Jettison Station 3")
defineToggleSwitch("RIO_WEAPON_JETT_STAT_4", 55, 3166, 69, "Armament Panel", "RIO Weapon Jettison Station 4")
defineToggleSwitch("RIO_WEAPON_JETT_STAT_5", 55, 3167, 70, "Armament Panel", "RIO Weapon Jettison Station 5")
defineToggleSwitch("RIO_WEAPON_JETT_STAT_6", 55, 3168, 64, "Armament Panel", "RIO Weapon Jettison Station 6")
define3PosTumb("RIO_WEAPON_JETT_STAT_8", 55, 3170, 71, "Armament Panel", "RIO Weapon Jettison Station 8")
definePushButton("RIO_WEAPON_AA_LAUNCH", 55, 3161, 74, "Armament Panel", "RIO Weapon A/A Launch")
definePushButton("RIO_WEAPON_NEXT_LAUNCH", 43, 3162, 9964, "Armament Panel", "RIO Weapon Next Launch")
-- Computer Address Panel (CAP)
defineMultipositionSwitch("RIO_CAP_CATRGORY", 24, 3530, 98, 6, 0.2, "CAP" ,"RIO CAP Category")
definePushButton("RIO_CAP_BTN_4", 24, 3521, 124, "CAP", "RIO CAP Button 4")
definePushButton("RIO_CAP_BTN_5", 24, 3522, 123, "CAP", "RIO CAP Button 5")
definePushButton("RIO_CAP_BTN_3", 24, 3520, 125, "CAP", "RIO CAP Button 3")
definePushButton("RIO_CAP_BTN_2", 24, 3519, 126, "CAP", "RIO CAP Button 2")
definePushButton("RIO_CAP_BTN_1", 24, 3518, 127, "CAP", "RIO CAP Button 1")
definePushButton("RIO_CAP_BTN_TNG", 24, 3528, 128, "CAP", "RIO CAP Button TNG NBR")
definePushButton("RIO_CAP_BTN_10", 24, 3527, 129, "CAP", "RIO CAP Button 10")
definePushButton("RIO_CAP_BTN_9", 24, 3526, 130, "CAP", "RIO CAP Button 9")
definePushButton("RIO_CAP_BTN_8", 24, 3525, 131, "CAP", "RIO CAP Button 8")
definePushButton("RIO_CAP_BTN_7", 24, 3524, 132, "CAP", "RIO CAP Button 7")
definePushButton("RIO_CAP_BTN_6", 24, 3523, 133, "CAP", "RIO CAP Button 6")
definePushButton("RIO_CAP_BTN_PGM_RESTRT", 24, 3529, 134, "CAP", "RIO CAP Button PGM RSTRT")
definePushButton("RIO_CAP_LONG_6", 24, 3541, 136, "CAP", "RIO CAP LONG 6")
definePushButton("RIO_CAP_LAT_1", 24, 3536, 137, "CAP", "RIO CAP LAT 1")
definePushButton("RIO_CAP_NBR_2", 24, 3537, 138, "CAP", "RIO CAP NBR 2")
definePushButton("RIO_CAP_7", 24, 3542, 139, "CAP", "RIO CAP 7")
definePushButton("RIO_CAP_HDG_8", 24, 3543, 140, "CAP", "RIO CAP HDG 8")
definePushButton("RIO_CAP_SPD_3", 24, 3538, 141, "CAP", "RIO CAP SPD 3")
definePushButton("RIO_CAP_ALT_4", 24, 3539, 143, "CAP", "RIO CAP ALT 4")
definePushButton("RIO_CAP_9", 24, 3544, 142, "CAP", "RIO CAP 9")
definePushButton("RIO_CAP_BRG_0", 24, 3535, 144, "CAP", "RIO CAP BRG 0")
definePushButton("RIO_CAP_RNG_5", 24, 3540, 145, "CAP", "RIO CAP RNG 5")
definePushButton("RIO_CAP_NE", 24, 3533, 146, "CAP", "RIO CAP N+E")
definePushButton("RIO_CAP_SW", 24, 3532, 147, "CAP", "RIO CAP S-W")
definePushButton("RIO_CAP_CLEAR", 24, 3531, 148, "CAP", "RIO CAP Clear")
definePushButton("RIO_CAP_ENTER", 24, 3534, 149, "CAP", "RIO CAP Enter")
-- Datalink
define3PosTumb("RIO_DATALINK_PW", 52, 3602, 413, "Datalink", "RIO Datalink Power")
defineToggleSwitch("RIO_DATALINK_ANT", 52, 3603, 175, "Datalink", "RIO Datalink Antenna")
defineToggleSwitch("RIO_DATALINK_REPLY", 52, 3604, 176, "Datalink", "RIO Datalink Reply")
defineToggleSwitch("RIO_DATALINK_CAINS", 52, 3605, 177, "Datalink", "RIO Datalink CAINS/TAC")
define3PosTumb("RIO_DATALINK_ANTIJAM", 52, 3598, 191, "Datalink", "RIO Datalink Antijam")
defineTumb("RIO_DATALINK_FREQ_10", 52, 3599, 196, 0.111, {0, 1}, nil, false, "Datalink", "RIO Datalink Freq 10MHz")
defineTumb("RIO_DATALINK_FREQ_1", 52, 3600, 195, 0.111, {0, 1}, nil, false, "Datalink", "RIO Datalink Freq 1MHz")
defineTumb("RIO_DATALINK_FREQ_100", 52, 3601, 197, 0.111, {0, 1}, nil, false, "Datalink", "RIO Datalink Freq 100kHz")
defineTumb("RIO_DATALINK_ADDR_HI", 52, 3606, 222, 0.111, {0, 1}, nil, false, "Datalink", "RIO Datalink Address High")
defineTumb("RIO_DATALINK_ADDR_LO", 52, 3607, 223, 0.111, {0, 1}, nil, false, "Datalink", "RIO Datalink Address Low")
defineMultipositionSwitch("RIO_BEACON_MODE", 52, 3693, 118, 7, 0.1666667, "Datalink" ,"RIO Beacon Mode")
definePushButton("RIO_BEACON_ACLS", 52, 3692, 117, "Datalink", "RIO Beacon ACLS Test")
define3PosTumb("RIO_BEACON_PW", 52, 3691, 96, "Datalink", "RIO Beacon Power")
-- IFF Panel
define3PosTumb("RIO_IFF_AUDIOLIGHT", 64, 3626, 161, "IFF", "RIO IFF Audio/Light")
define3PosTumb("RIO_IFF_M1", 64, 3627, 162, "IFF", "RIO IFF M1")
define3PosTumb("RIO_IFF_M2", 64, 3628, 163, "IFF", "RIO IFF M2")
define3PosTumb("RIO_IFF_M3A", 64, 3629, 164, "IFF", "RIO IFF M3/A")
define3PosTumb("RIO_IFF_MC", 64, 3630, 165, "IFF", "RIO IFF MC")
define3PosTumb("RIO_IFF_RAD", 64, 3631, 166, "IFF", "RIO IFF RAD")
define3PosTumb("RIO_IFF_IDENT", 64, 3632, 167, "IFF", "RIO IFF Ident")
defineToggleSwitch("RIO_IFF_M4", 64, 3633, 181, "IFF", "RIO IFF M4")
defineMultipositionSwitch("RIO_IFF_CODE", 64, 3634, 183, 4, 1.0/3.0, "IFF" ,"RIO IFF Code")
defineMultipositionSwitch("RIO_IFF_MASTER", 64, 3635, 184, 5, 1.0/4.0, "IFF" ,"RIO IFF Master")
definePushButton("RIO_IFF_TEST", 64, 3636, 185, "IFF", "RIO IFF Test")
definePushButton("RIO_IFF_REPLY", 64, 3637, 186, "IFF", "RIO IFF Reply")
defineTumb("RIO_IFF_M3_1", 64, 3638, 2262, 0.111, {0, 1}, nil, false, "IFF", "RIO IFF M3 Code 1s")
defineTumb("RIO_IFF_M3_10", 64, 3639, 2261, 0.111, {0, 1}, nil, false, "IFF", "RIO IFF M3 Code 10s")
defineTumb("RIO_IFF_M3_100", 64, 3640, 198, 0.111, {0, 1}, nil, false, "IFF", "RIO IFF M3 Code 100s")
defineTumb("RIO_IFF_M3_1000", 64, 3641, 199, 0.111, {0, 1}, nil, false, "IFF", "RIO IFF M3 Code 1000s")
defineTumb("RIO_IFF_M1_1", 64, 3642, 200, 0.111, {0, 1}, nil, false, "IFF", "RIO IFF M1 Code 1s")
defineTumb("RIO_IFF_M1_10", 64, 3643, 201, 0.111, {0, 1}, nil, false, "IFF", "RIO IFF M1 Code 10s")
-- LIQUID Cooling
define3PosTumb("RIO_LIQUD_COOL", 39, 3694, 95, "Radar Panel", "RIO Liquid Cooling Switch")
-- LANTIRN (Panel Arg:666)
defineMultipositionSwitch("RIO_LANTIRN_PW", 7, 3689, 667, 3, 1.0/2.0, "LANTIRN" ,"RIO LANTIRN Power")
defineToggleSwitch("RIO_LANTIRN_LASER_ARM", 7, 3516, 668, "LANTIRN", "RIO LANTIRN Laser Arm Switch")
definePushButton("RIO_LANTIRN_TCS_SEL", 7, 3498, 670, "LANTIRN", "RIO Video Output Toggle (TCS/LANTIRN)")
definePushButton("RIO_LANTIRN_TCS_SEL", 7, 3704, 669, "LANTIRN", "RIO LANTIRN Operate Mode (Unstow)")
definePushButton("RIO_LANTIRN_IBIT", 7, 3690, 671, "LANTIRN", "RIO LANTIRN IBIT")
defineIndicatorLightLANTTop("RIO_LANTIRN_1_OPER", 673, "LANTIRN","RIO LANTIRN STBY Light (TOP) (green)")
defineIndicatorLightLANT("RIO_LANTIRN_2_OPERSTBY", 673, "LANTIRN","RIO LANTIRN OPER STBY Light (BOOTH) (green)")
defineIndicatorLightLANTBottom("RIO_LANTIRN_3_STBY", 673, "LANTIRN","RIO LANTIRN STBY Light (BOTTOM) (green)")
defineIndicatorLightLANTTop("RIO_LANTIRN_1_IMU", 674, "LANTIRN","RIO LANTIRN IMU Light (TOP) (green)")
defineIndicatorLightLANT("RIO_LANTIRN_2_IMUGPS", 674, "LANTIRN","RIO LANTIRN IMU GPS Light (BOOTH) (green)")
defineIndicatorLightLANTBottom("RIO_LANTIRN_3_GPS", 674, "LANTIRN","RIO LANTIRN GPS Light (BOTTOM) (green)")
defineIndicatorLightLANTTop("RIO_LANTIRN_1_LGP", 675, "LANTIRN","RIO LANTIRN LGP Light (TOP) (green)")
defineIndicatorLightLANT("RIO_LANTIRN_2_LGPFLIR", 675, "LANTIRN","RIO LANTIRN LGP FLIR Light (BOOTH) (green)")
defineIndicatorLightLANTBottom("RIO_LANTIRN_3_FLIR", 675, "LANTIRN","RIO LANTIRN FLIR Light (BOTTOM) (green)")
defineIndicatorLightLANTTop("RIO_LANTIRN_1_MUX", 676, "LANTIRN","RIO LANTIRN MUX Light (TOP) (green)")
defineIndicatorLightLANT("RIO_LANTIRN_2_MUXEGU", 676, "LANTIRN","RIO LANTIRN MUX EGU Light (BOOTH) (green)")
defineIndicatorLightLANTBottom("RIO_LANTIRN_3_EGU", 676, "LANTIRN","RIO LANTIRN EGU Light (BOTTOM) (green)")
defineIndicatorLightLANTTop("RIO_LANTIRN_1_LASER", 677, "LANTIRN","RIO LANTIRN SERVO Light (TOP) (green)")
defineIndicatorLightLANT("RIO_LANTIRN_2_LASERSERVO", 677, "LANTIRN","RIO LANTIRN LASER SERVO Light (BOOTH) (green)")
defineIndicatorLightLANTBottom("RIO_LANTIRN_3_SERVO", 677, "LANTIRN","RIO LANTIRN SERVO Light (BOTTOM) (green)")
defineIndicatorLightLANTTop("RIO_LANTIRN_1_FLIR", 678, "LANTIRN","RIO LANTIRN FLIR Light (TOP) (green)")
defineIndicatorLightLANT("RIO_LANTIRN_2_FLIRTCS", 678, "LANTIRN","RIO LANTIRN FLIR TCS Light (BOOTH) (green)")
defineIndicatorLightLANTBottom("RIO_LANTIRN_3_TCS", 678, "LANTIRN","RIO LANTIRN TCS Light (BOTTOM) (green)")
defineIndicatorLightMulti1("RIO_LANTIRN_IBIT", 679, "LANTIRN","RIO LANTIRN IBIT Light (green)")
defineIndicatorLightMulti1("RIO_LANTIRN_LASERARMED", 680, "LANTIRN","RIO LANTIRN LASER ARMED Light (green)")
-- Indicator Lights PLT
defineIndicatorLight("PLT_TACAN_COMAND_PLT", 290, "PLT Indicator Lights","PILOT TACAN Command Light PLT (green)")
defineIndicatorLight("PLT_TACAN_COMAND_NFO", 291, "PLT Indicator Lights","PILOT TACAN Command Light NFO (green)")
defineIndicatorLight("PLT_JETT_LIGHT", 701, "PLT Indicator Lights","PILOT Emergency Stores Jettison Light (red)")
defineIndicatorLight("PLT_FLOOD_LIGHTS", 1800, "PLT Indicator Lights","PILOT Flood Lights Red (red)")
defineIndicatorLight("PLT_PANEL_LIGHTS", 1801, "PLT Indicator Lights","PILOT Panel Lights (red) inverted")
defineIndicatorLight("PLT_INSTRUMENT_LIGHTS", 1802, "PLT Indicator Lights","PILOT Instrument Lights (red) inverted")
defineIndicatorLight("PLT_FLOOD_LIGHTS_W", 1803, "PLT Indicator Lights","PILOT Flood Lights White (white)")
defineIndicatorLight("PLT_AOA_SLOW", 3760, "PLT Indicator Lights","PILOT AOA Slow (green)")
defineIndicatorLight("PLT_AOA_OPT", 3761, "PLT Indicator Lights","PILOT AOA Optimum (yellow)")
defineIndicatorLight("PLT_AOA_FAST", 3762, "PLT Indicator Lights","PILOT AOA Fast (red)")
defineIndicatorLight("PLT_TACAN_GO", 8050, "PLT Indicator Lights","PILOT TACAN GO Light (green)")
defineIndicatorLight("PLT_TACAN_NOGO", 8051, "PLT Indicator Lights","PILOT TACAN NOGO Light (red)")
defineIndicatorLight("PLT_MASTER_CAUTION", 9200, "PLT Indicator Lights","PILOT Weapon Panel Master Caution Light (red)")
defineIndicatorLight("PLT_HOT_TRIGGER", 9201, "PLT Indicator Lights","PILOT Weapon Panel Hot Trigger Light (red)")
defineIndicatorLight("PLT_COLLISION_LIGHT", 9202, "PLT Indicator Lights","PILOT Weapon Panel Collision Light (green)")
defineIndicatorLight("PLT_SEAM_LOCK", 9203, "PLT Indicator Lights","PILOT Weapon Panel SEAM Lock Light (green)")
defineIndicatorLight("PLT_GUN_RATE_HIGH", 9204, "PLT Indicator Lights","PILOT Weapon Panel Gunrate High Light (red)")