forked from s-d-a/DCS-ExportScripts
-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathAV8BNA.lua
More file actions
1435 lines (1275 loc) · 52.3 KB
/
AV8BNA.lua
File metadata and controls
1435 lines (1275 loc) · 52.3 KB
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
-- AV8BNA
ExportScript.FoundDCSModule = true
ExportScript.Version.AV8BNA = "1.2.1"
ExportScript.ConfigEveryFrameArguments =
{
--[[
every frames arguments
based of "mainpanel_init.lua"
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
[DeviceID] = "Format"
[4] = "%.4f", <- floating-point number with 4 digits after point
[19] = "%0.1f", <- floating-point number with 1 digit after point
[129] = "%1d", <- decimal number
[5] = "%.f", <- floating point number rounded to a decimal number
]]
-- LAMPS --------------------------------------
--MIP INNER LEFT SIDE
[196] = "%.f", --Master Caution (yellow)
[326] = "%.f", --L FUEL
[327] = "%.f", --R FUEL
[328] = "%.f", --15 Sek
[329] = "%.f", --MFS
[330] = "%.f", --BINGO
[331] = "%.f", --H2O
--MIP RIGHT SIDE
[197] = "%.f", --Master Warning (red)
[334] = "%.f", --FIRE
[335] = "%.f", --LAW
[336] = "%.f", --FLAPS
[337] = "%.f", --L TANK
[338] = "%.f", --R TANK
[339] = "%.f", --HHYD
[340] = "%.f", --GEAR
[341] = "%.f", --OT
[342] = "%.f", --JPTL
[343] = "%.f", --EFC
[344] = "%.f", --GEN
--EYEBROW LIGHTS RIGHT SIGHT
[276] = "%.f", --SAM
[277] = "%.f", --CW
[278] = "%.f", --AI
[279] = "%.f", --AAA
--MIP OUTER LEFT SIDE
[283] = "%.f", --NAV
[285] = "%.f", --VSTOL
[281] = "%.f", --A/G
[451] = "%.f", --SEL
[452] = "%.f", --CMBT
[453] = "%.f", --STO
--CANOPY FRAME
[750] = "%.f", --LEFT
[751] = "%.f", --READY
[752] = "%.f", --RIGHT
--GEAR LEVER
[446] = "%.f", --(red warning light)
--CAUTION PANEL (from upper left to lower right)
[560] = "%.f", --OXY
[561] = "%.f", --WSLD
[562] = "%.f", --HYD 1
[563] = "%.f", --HYD 2
[564] = "%.f", --L PUMP
[565] = "%.f", --R PUMP
[566] = "%.f", --L TRANS
[567] = "%.f", --R TRANS
[568] = "%.f", --FLAPS 1
[569] = "%.f", --FLAPS 2
[570] = "%.f", --AUT FLP
[571] = "%.f", --PROP
[572] = "%.f", --LIDS
[573] = "%.f", --OIL
[574] = "%.f", --APU GEN
[575] = "%.f", --"--"
[576] = "%.f", --GPS
[577] = "%.f", --DEP RES
[578] = "%.f", --DC
[579] = "%.f", --STBY TR
[580] = "%.f", --CS COOL
[581] = "%.f", --LOAD
[582] = "%.f", --CANOPY
[583] = "%.f", --INS
[584] = "%.f", --SKID
[585] = "%.f", --EFC
[586] = "%.f", --NWS
[587] = "%.f", --AFC
[588] = "%.f", --C AUT
[589] = "%.f", --H2O SEL
[590] = "%.f", --APU
[591] = "%.f", --PITCH
[592] = "%.f", --IFF
[593] = "%.f", --SPD BRK
[594] = "%.f", --DROOP
[595] = "%.f", --ROLL
[596] = "%.f", --AFT BAY
[597] = "%.f", --AV BIT -----MAYBE NOT WORKING !-----
[598] = "%.f", --"--"
[599] = "%.f", --YAW
[600] = "%.f", --CW NOGO
[601] = "%.f", --P JAM
[602] = "%.f", --JAM HOT
[603] = "%.f", --ENG EXC
[604] = "%.f", --P NOGO
[605] = "%.f", --CW JAM
[606] = "%.f", --REPLY
--ENGINE DISPLAY
[253] = "%.4f", --DUCT 1. DRUM
[254] = "%.4f", --DUCT 2.
[255] = "%.4f", --DUCT 3.
[256] = "%.4f", --RPM 1. DRUM
[257] = "%.4f", --RPM 2.
[258] = "%.4f", --RPM 3.
[259] = "%.4f", --RPM 4.
[260] = "%.4f", --FF 1. DRUM
[261] = "%.4f", --FF 2.
[262] = "%.4f", --FF 3.
[263] = "%.4f", --JPT 1. DRUM
[264] = "%.4f", --JPT 2.
[265] = "%.4f", --JPT 3.
[266] = "%.4f", --STAB(Arrow up/down)
[267] = "%.4f", --STAB 1. Number, 2.DRUM
[268] = "%.4f", --STAB 2. Number, 3. DRUM
[269] = "%.4f", --H2O 1. Number
[270] = "%.4f", --H2O 2. Number -----3. Number is fix !!----
[177] = "%.f", --FLOW W LAMP
[271] = "%.4f", --NOZZLE POINTER
--FUEL PANEL DISPLAY
[365] = "%.4f", --ON/OFF FLAG
[366] = "%.4f", --TOT FUEL 1. DRUM
[367] = "%.4f", --TOT FUEL 2.
[368] = "%.4f", --TOT FUEL 3.
[369] = "%.4f", --TOT FUEL 4.
[370] = "%.4f", --TOT FUEL 5.
[371] = "%.4f", --LBS L 1. DRUM
[372] = "%.4f", --LBS L 2.
[373] = "%.4f", --LBS L 3.
[374] = "%.4f", --LBS L 4.
[375] = "%.4f", --LBS R 1. DRUM
[376] = "%.4f", --LBS R 2.
[377] = "%.4f", --LBS R 3.
[378] = "%.4f", --LBS R 4.
[381] = "%.4f", --BINGO 1. DRUM
[382] = "%.4f", --BINGO 2.
[383] = "%.4f", --BINGO 3.
[384] = "%.4f", --BINGO 4.
--UPPER AMARMENT PANEL
[385] = "%.4f", --MODE
[386] = "%.4f", --FUZ 1. DRUM
[387] = "%.4f", --FUR 2.
[392] = "%.4f", --InVT x 10 1. DRUM
[393] = "%.4f", --InVT x 10 2.
[394] = "%.4f", --InVT x 10 3.
[391] = "%.4f", --MULT
[389] = "%.4f", --QTY 1. Drum
[390] = "%.4f", --QTY 2.
--LOWER AMARMENT PANEL
[406] = "%1d", --SET FLAG 1
[408] = "%1d", --SET FLAG 2
[410] = "%1d", --SET FLAG 3
[412] = "%1d", --SET FLAG 4
[414] = "%1d", --SET FLAG 5
[416] = "%1d", --SET FLAG 6
[418] = "%1d", --SET FLAG 7
--GEAR PANEL DISPLAY --STATUS LIGHTS--
[462] = "%.f", --NOSE GEAR (YELLOW)
[463] = "%.f", --NOSE GEAR (GREEN)
[464] = "%.f", --LEFR GEAR (YELLOW)
[465] = "%.f", --LEFT GEAR (GREEN)
[466] = "%.f", --RIGHT GEAR (YELLOW)
[467] = "%.f", --RIGHT GEAR (GREEN)
[469] = "%.f", --MAIN GEAR (YELLOW)
[468] = "%.f", --MAIN GEAR (GREEN)
--BRAKE/ HYD DISPLAY
[550] = "%.4f", --BRAKE 1. DRUM
[551] = "%.4f", --BRAKE 2.
[552] = "%.4f", --BRAKE 3.
[553] = "%.4f", --HYD1 1. DRUM
[554] = "%.4f", --HYD1 2.
[555] = "%.4f", --HYD1 3.
[556] = "%.4f", --HYD2 1. DRUM
[557] = "%.4f", --HYD2 2.
[558] = "%.4f", --HYD2 3.
--FLAP POSITION DISPLAY
[455] = "%.4f", --FLAP POS 1. DRUM
[456] = "%.4f", --FLAP POS 2. DRUM
-- INSTRUMENTS ------------------------------------------------
---STBY MIP
--ADI
[349] = "%.4f", --ADI DRUM UO/DWN CLIMB/DESCEND
[348] = "%.4f", --ADI DRUM LEFR RIGHT (BANK)
[347] = "%.4f", --OFF FLAG
--AIRSPEED
[346] = "%.4f", --KNT POINTER SHORT
[345] = "%.4f", --KNT POINTER LONG
--ALTIMETER
[352] = "%.4f", --ALT POINTER
[355] = "%.4f", --ALT DIGITAL 1. NUMBER
[354] = "%.4f", --ALT DIGITAL 2.
[353] = "%.4f", --ALT DIGITAL 3.
[356] = "%.4f", --IN HG 1. NUMBER
[357] = "%.4f", --IN HG 2. NUMBER
[358] = "%.4f", --IN HG 3. NUMBER
[359] = "%.4f", --IN HG 4. NUMBER
--AOA
[360] = "%.4f", --AOA FLAG
[361] = "%.4f", --AOA POINTER
--VVI
[362] = "%.4f", --VVI POINTER
--SLIP INDICATOR
[363] = "%.4f", --BALL
---SIDE PANELS LEFT
--AILERON METER
[473] = "%.4f", --AILERON NEEDLE
--RUDDER
[474] = "%.4f", --RUDDER NEEDLE
---SIDE PANELS RIGHT
--ACCU METER
[559] = "%.4f", --ACCU POINTER
--CABIN PRESSURE
[607] = "%.4f", --CABIN PRESS POINTER
--BATTERY (VOLT METER)
[608] = "%.4f", --VOLT METER POINTER
---Compass
[753] = "%.4f", --Compassrose N-> S (rotate)
[754] = "%.4f", --Compassrose Up / Down
[755] = "%.4f", --Compassrose bank
---CLOCK
[759] = "%.4f", --POINTER HOUR
[760] = "%.4f", --POINTER MINUTE
[761] = "%.4f", --POINTER SECOND
---STOPWATCH
--NOTHING FOUND YET
--CABIN LIGHTNING
[180] = "%.f", --FLOOD
[182] = "%.f", --MIP BACKLIGHTING
[183] = "%.f", --LEFT AND RIGHT SIDEPANEL LIGHTING
[184] = "%.f", --WHISKEY COMPASS BACKLIGHT (LEFT CANOPY FRAME)
}
ExportScript.ConfigArguments =
{
--[[
arguments for export in low tick interval
based on "clickabledata.lua"
]]
-- Master Modes Panel
[282] = "%.1f", --Nav Master Mode selector
[284] = "%.1f", --VSTOL Master Mode Selector
[280] = "%.1f", --AG Master Mode Selector
-- Engine Display Panel
[272] = "%.2f", --EDP Brightness Control
[655] = "%1d", --EDP BIT Button
-- HUD Control Panel
[288] = "%.4f", --HUD
[289] = "%.4f", --HUD Off/Brightness Control
[290] = "%.1f", --HUD Display Mode Switch
[291] = "%.2f", --HUD Video Brightness Control
[292] = "%.2f", --HUD Video Contrast Control
[293] = "%1d", --HUD Altitude Selector Switch
-- UFC Panel
[302] = "%1d", --UFC Button 1
[303] = "%1d", --UFC Button 2/N
[304] = "%1d", --UFC Button 3
[306] = "%1d", --UFC Button 4/W
[307] = "%1d", --UFC Button 5
[308] = "%1d", --UFC Button 6/E
[310] = "%1d", --UFC Button 7
[311] = "%1d", --UFC Button 8/S
[312] = "%1d", --UFC Button 9
[315] = "%1d", --UFC Button 0
[316] = "%1d", --UFC Button .
[313] = "%1d", --UFC Button -
[314] = "%1d", --ENTER Data Button
[305] = "%1d", --Clear Entry Button
[294] = "%1d", --Timer Function Selector
[324] = "%1d", --Altitude Function Selector
[318] = "%1d", --IFF Function Selector
[319] = "%1d", --TACAN Function Selector
[320] = "%1d", --All Weather Landing Function Selector
[317] = "%1d", --Radalt/TACAN/AWL/IFF ON/OFF Toggle
[325] = "%1d", --EMCON ON/OFF Toggle
[296] = "%1d", --Target-Of-Opportunity Selector
[322] = "%1d", --Waypoint Overfly INS Update Selector
[321] = "%1d", --Weapons Function Selector
[323] = "%1d", --Radar Beacon Function Selector
[297] = "%1d", --I/P Button
[309] = "%1d", --Save Data Button
[295] = "%.2f", --Display Brightness Control
[298] = "%.2f", --Comm 1 Volume Control
[299] = "%.2f", --Comm 2 Volume Control
[300] = "%.4f", --Comm 1 Channel Selector
[301] = "%.4f", --Comm 2 Channel Selector
[178] = "%.4f", --Comm 1 Channel Show Button
[179] = "%.4f", --Comm 2 Channel Show Button
-- ODU Panel
[250] = "%1d", --ODU Option1
[251] = "%1d", --ODU Option2
[252] = "%1d", --ODU Option3
[248] = "%1d", --ODU Option4
[249] = "%1d", --ODU Option5
-- Master Caution/Warning Panel
[198] = "%1d", --Master Caution
[199] = "%1d", --Master Warning
-- Fuel Quantity Indicator
[379] = "%.1f", --Fuel Totalizer Selector
[380] = "%.4f", --Bingo Fuel Set Knob
-- MPCD left
[200] = "%1d", --MPCD Left Button 1
[201] = "%1d", --MPCD Left Button 2
[202] = "%1d", --MPCD Left Button 3
[203] = "%1d", --MPCD Left Button 4
[204] = "%1d", --MPCD Left Button 5
[205] = "%1d", --MPCD Left Button 6
[206] = "%1d", --MPCD Left Button 7
[207] = "%1d", --MPCD Left Button 8
[208] = "%1d", --MPCD Left Button 9
[209] = "%1d", --MPCD Left Button 10
[210] = "%1d", --MPCD Left Button 11
[211] = "%1d", --MPCD Left Button 12
[212] = "%1d", --MPCD Left Button 13
[213] = "%1d", --MPCD Left Button 14
[214] = "%1d", --MPCD Left Button 15
[215] = "%1d", --MPCD Left Button 16
[216] = "%1d", --MPCD Left Button 17
[217] = "%1d", --MPCD Left Button 18
[218] = "%1d", --MPCD Left Button 19
[219] = "%1d", --MPCD Left Button 20
[220] = "%1d", --MPCD Left Display DAY/NIGHT Mode
[221] = "%1d", --MPCD Left Display Symbology
[222] = "%1d", --MPCD Left Display Gain
[223] = "%1d", --MPCD Left Display Contrast
[194] = "%.2f", --MPCD Left Off/Brightness Control
-- MPCD Right
[224] = "%1d", --MPCD Right Button 1
[225] = "%1d", --MPCD Right Button 2
[226] = "%1d", --MPCD Right Button 3
[227] = "%1d", --MPCD Right Button 4
[228] = "%1d", --MPCD Right Button 5
[229] = "%1d", --MPCD Right Button 6
[230] = "%1d", --MPCD Right Button 7
[231] = "%1d", --MPCD Right Button 8
[232] = "%1d", --MPCD Right Button 9
[233] = "%1d", --MPCD Right Button 10
[234] = "%1d", --MPCD Right Button 11
[235] = "%1d", --MPCD Right Button 12
[236] = "%1d", --MPCD Right Button 13
[237] = "%1d", --MPCD Right Button 14
[238] = "%1d", --MPCD Right Button 15
[239] = "%1d", --MPCD Right Button 16
[240] = "%1d", --MPCD Right Button 17
[241] = "%1d", --MPCD Right Button 18
[242] = "%1d", --MPCD Right Button 19
[243] = "%1d", --MPCD Right Button 20
[244] = "%1d", --MPCD Right Display DAY/NIGHT Mode
[245] = "%1d", --MPCD Right Display Symbology
[246] = "%1d", --MPCD Right Display Gain
[247] = "%1d", --MPCD Right Display Contrast
[195] = "%.2f", --MPCD Right Off/Brightness Control
-- Armament Control Panel ACP
[395] = "%.1f", --Manual Release Control Knob
[396] = "%1d", --Armament Mode Control
[397] = "%1d", --Fuzing Control
[398] = "%1d", --Quantity Selector (Tens)
[399] = "%1d", --Quantity Selector (Units)
[400] = "%1d", --Multiple Release Control
[401] = "%1d", --Release Interval Control (Hundreds)
[402] = "%1d", --Release Interval Control (Tens)
[403] = "%1d", --Release Interval Control (Units)
[404] = "%1d", --Jettison Mode Selector
[405] = "%1d", --Jettison Stores
[407] = "%1d", --Select Station 1 Toggle
[409] = "%1d", --Select Station 2 Toggle
[411] = "%1d", --Select Station 3 Toggle
[413] = "%1d", --Select Station 4 Toggle
[415] = "%1d", --Select Station 5 Toggle
[417] = "%1d", --Select Station 6 Toggle
[419] = "%1d", --Select Station 7 Toggle
[420] = "%1d", --Ground IR Cool Switch
-- Master Armament Panel
[286] = "%1d", --Launch Flare Salvo
[287] = "%1d", --Master Arm Switch
-- ECM Control Panel
[273] = "%.2f", --RWR Power/Volume Button
[274] = "%.1f", --Decoy Dispenser Control
[275] = "%.1f", --Jammer Control
-- Landing Gear/Flaps Control Panel
[447] = "%1d", --Emergency Landing Gear Lever
[448] = "%1d", --Gear Down Lock Override Button
[454] = "%.1f", --Flaps Mode Switch
[457] = "%.1f", --Flaps Power Switch
[458] = "%1d", --Emergency Jettison Button
[459] = "%.1f", --Anti-Skid Switch
[460] = "%1d", --Flaps BIT Button
[461] = "%1d", --Landing Gear Lever
[470] = "%1d", --Landing Gear Emergency Battery Lever
-- Combat/Water Panel
[449] = "%.1f", --H2O Mode Switch
[450] = "%1d", --CMBT Thrust Button
-- Bulkhead Switches
[501] = "%1d", --MFS Emergency Lever
[1121] = "%1d", --Stopwatch Start/Stop
[1122] = "%1d", --Stopwatch Lap/Reset
-- Seat
[800] = "%1d", --Seat Ground Safety Lever
-------------------------------------------------------------------
-- CENTER CONSOLE:
-------------------------------------------------------------------
-- Flights Instruments Panel
[364] = "%.4f", --NAV Course Setting
[653] = "%.4f", --Barometric Pressure Calibration
[350] = "%1d", --Backup ADI Cage
[351] = "%.4f", --Backup ADI Pitch Adjust Knob
-- Miscelaneous Switch Panel
[422] = "%1d", --Video Recorder System Mode Switch
[423] = "%1d", --Video Recorder System Display Selector Switch
[424] = "%1d", --DMT Toggle On/Off
[425] = "%.1f", --Dual Processor Mode Selector Switch
[426] = "%1d", --Probe Heat Mode Switch
[427] = "%.1f", --Mission Computer Mode Switch
[429] = "%1d", --FLIR Power Switch
-- INS Panel
[421] = "%.1f", --INS Mode Knob
-------------------------------------------------------------------
-- LEFT CONSOLE:
-------------------------------------------------------------------
-- Trim Panel
[471] = "%.1f", --RPS/YAW Trim Switch
[472] = "%.1f", --Trim Mode Switch
-- SAAHS Panel
[476] = "%1d", --Alt Hold Switch
[475] = "%1d", --Q Feel Switch
[477] = "%.1f", --AFC Switch
[478] = "%1d", --SAS Yaw Switch"
[479] = "%1d", --SAS Roll Switch
[480] = "%1d", --SAS Pitch Switch
-- Throttle Quadrant
[481] = "%1d", --JPTL Switch
[483] = "%1d", --Rudder Trim Switch
[482] = "%1d", --EMS Button
[484] = "%1d", --Manual Fuel Switch
[485] = "%.4f", --Throttle Lever Friction Knob
[486] = "%.4f", --Nozzle Lever Friction Knob
[490] = "%1d", --Throttle Cutoff Lever
[489] = "%1d", --Parking Brake Lever
[487] = "%.4f", --Nozzle Control Lever
[488] = "%.4f", --STO Stop Lever
--[491] = "%1d", --Air Brake Switch
-- Fuel Panel
[504] = "%1d", --Fuel Proportioner
[505] = "%.1f", --Fuel Pump L Switch
[506] = "%.1f", --Fuel Pump R Switch
[507] = "%.1f", --Air Refueling Probe Switch
[508] = "%1d", --Fuel Dump L Switch
[509] = "%1d", --Fuel Dump R Switch"
-- External Lights Panel
[472] = "%.1f", --Landing/Taxi Lights Switch
[503] = "%.1f", --External Lights Mode Switch"
[510] = "%.4f", --Formation Lights Knob
[511] = "%1d", --Position Lights Switch
[512] = "%1d", --Anti-Collision Lights Switch
[513] = "%1d", --External Auxiliary Lights Switch
-- Pilot Service Panel
[514] = "%1d", --"Oxygen Switch
[515] = "%1d", --H2O Dump Switch
[516] = "%1d", --LIDS Switch
[517] = "%1d", --ENG RPM Switch
[518] = "%1d", --EFC Switch
-- Bulkhead Switches
[502] = "%1d", --Seat Adjustment Switch
[519] = "%1d", --Fuel Shutoff Lever
[520] = "%1d", --DECS Switch
-------------------------------------------------------------------
-- RIGHT CONSOLE:
-------------------------------------------------------------------
-- Electrical Panel
[609] = "%.1f", --DC Test Switch
[610] = "%.1f", --APU Generator Switch
[611] = "%1d", --Engine Start Switch
[612] = "%.1f", --Generator Switch
[613] = "%.1f", --Battery Switch
-- V/UHF Radio Panel
[614] = "%.2f", --V/UHF RSC Volume Knob
[615] = "%.3f", --V/UHF RSC Chan/Freq Knob
[616] = "%.1f", --V/UHF RSC Operational Mode Switch
[617] = "%1d", --V/UHF RSC Ancillary Mode Pointer
[618] = "%1d", --V/UHF RSC Ancillary Mode Switch
[619] = "%.1f", --V/UHF RSC Frequency Mode Switch
[620] = "%1d", --V/UHF RSC LOAD/OFST Switch
-- ACNIP
[621] = "%1d", --ACNIP Mode Switch
[622] = "%1d", --KY-1 Cipher Type Selector Switch
[623] = "%1d", --KY-2 Cipher Type Selector Switch
[624] = "%1d", --KY-1 Code/Mode Switch
[625] = "%1d", --KY-2 Code/Mode Switch
[626] = "%1d", --ACNIP Radio Selector Switch
[627] = "%1d", --KY-58 Codes Clear Switch
[628] = "%1d", --KY-58 Remote Codes Load Switch
-- ICS
[629] = "%.2f", --ICS Aux Volume Knob
[630] = "%.2f", --ICS Ground Volume Knob
[631] = "%.1f", --ICS Mic Operational Mode Switch
-- IFF
[632] = "%1d", --IFF Operational Mode Switch
[633] = "%1d", --IFF Crypto Mode Switch
-- Interior Lights Panel
[634] = "%1d", --Compass Light/Test Lights
[635] = "%.2f", --Instruments Lights
[636] = "%.2f", --Console Lights
[637] = "%.2f", --Flood Lights
[638] = "%.2f", --Annunciator Lights
}
-----------------------------
-- HIGH IMPORTANCE EXPORTS --
-- done every export event --
-----------------------------
-- Pointed to by ProcessIkarusDCSHighImportance
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
--[[
export in low tick interval to Ikarus
Example from A-10C
Get Radio Frequencies
get data from device
local lUHFRadio = GetDevice(54)
ExportScript.Tools.SendData("ExportID", "Format")
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
]]
end
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
--[[
export in low tick interval to DAC
Example from A-10C
Get Radio Frequencies
get data from device
local UHF_RADIO = GetDevice(54)
ExportScript.Tools.SendDataDAC("ExportID", "Format")
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
]]
end
-----------------------------------------------------
-- LOW IMPORTANCE EXPORTS --
-- done every gExportLowTickInterval export events --
-----------------------------------------------------
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
--[[
export in low tick interval to Ikarus
Example from A-10C
Get Radio Frequencies
get data from device
local lUHFRadio = GetDevice(54)
ExportScript.Tools.SendData("ExportID", "Format")
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
]]
--ENGINE DISPLAY
--[253] = "%.4f", --DUCT 1. DRUM
--[254] = "%.4f", --DUCT 2.
--[255] = "%.4f", --DUCT 3.
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(253) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(254) * 10)
digits[3] = string.format("%1.0f",mainPanelDevice:get_argument_value(255) * 10)
ExportScript.Tools.SendData(2001, digits[1]..digits[2]..digits[3])
--[256] = "%.4f", --RPM 1. DRUM
--[257] = "%.4f", --RPM 2.
--[258] = "%.4f", --RPM 3.
--[259] = "%.4f", --RPM 4.
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(256) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(257) * 10)
digits[3] = string.format("%1.0f",mainPanelDevice:get_argument_value(258) * 10)
digits[4] = string.format("%1.0f",mainPanelDevice:get_argument_value(259) * 10)
ExportScript.Tools.SendData(2002, digits[1]..digits[2]..digits[3]..digits[4])
--[260] = "%.4f", --FF 1. DRUM
--[261] = "%.4f", --FF 2.
--[262] = "%.4f", --FF 3.
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(260) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(261) * 10)
digits[3] = string.format("%1.0f",mainPanelDevice:get_argument_value(262) * 10)
ExportScript.Tools.SendData(2003, digits[1]..digits[2]..digits[3])
--[263] = "%.4f", --JPT 1. DRUM
--[264] = "%.4f", --JPT 2.
--[265] = "%.4f", --JPT 3.
--[266] = "%.4f", --STAB(Arrow up/down)
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(263) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(264) * 10)
digits[3] = string.format("%1.0f",mainPanelDevice:get_argument_value(265) * 10)
ExportScript.Tools.SendData(2004, digits[1]..digits[2]..digits[3])
--[267] = "%.4f", --STAB 1. Number, 2. DRUM
--[268] = "%.4f", --STAB 2. Number, 3. DRUM
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(267) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(268) * 10)
ExportScript.Tools.SendData(2005, digits[1]..digits[2])
--[269] = "%.4f", --H2O 1. Number
--[270] = "%.4f", --H2O 2. Number -----3. Number is fix !!----
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(269) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(270) * 10)
ExportScript.Tools.SendData(2006, digits[1]..digits[2])
-- Fuel Total
-------------------------------------------------
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(366) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(367) * 10)
digits[3] = string.format("%1.0f",mainPanelDevice:get_argument_value(368) * 10)
digits[4] = string.format("%1.0f",mainPanelDevice:get_argument_value(369) * 10)
digits[5] = string.format("%1.0f",mainPanelDevice:get_argument_value(370) * 10)
ExportScript.Tools.SendData(2010, digits[1]..digits[2]..digits[3]..digits[4]..digits[5])
--[371] = "%.4f", --LBS L 1. DRUM
--[372] = "%.4f", --LBS L 2.
--[373] = "%.4f", --LBS L 3.
--[374] = "%.4f", --LBS L 4.
-- Fuel Left
-------------------------------------------------
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(371) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(372) * 10)
digits[3] = string.format("%1.0f",mainPanelDevice:get_argument_value(373) * 10)
digits[4] = string.format("%1.0f",mainPanelDevice:get_argument_value(374) * 10)
ExportScript.Tools.SendData(2011, digits[1]..digits[2]..digits[3]..digits[4])
--[375] = "%.4f", --LBS R 1. DRUM
--[376] = "%.4f", --LBS R 2.
--[377] = "%.4f", --LBS R 3.
--[378] = "%.4f", --LBS R 4.
-- Fuel Right
-------------------------------------------------
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(375) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(376) * 10)
digits[3] = string.format("%1.0f",mainPanelDevice:get_argument_value(377) * 10)
digits[4] = string.format("%1.0f",mainPanelDevice:get_argument_value(378) * 10)
ExportScript.Tools.SendData(2012, digits[1]..digits[2]..digits[3]..digits[4])
--[381] = "%.4f", --BINGO 1. DRUM
--[382] = "%.4f", --BINGO 2.
--[383] = "%.4f", --BINGO 3.
--[384] = "%.4f", --BINGO 4.
-- Fuel Bingo
-------------------------------------------------
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(381) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(382) * 10)
digits[3] = string.format("%1.0f",mainPanelDevice:get_argument_value(383) * 10)
digits[4] = string.format("%1.0f",mainPanelDevice:get_argument_value(384) * 10)
ExportScript.Tools.SendData(2013, digits[1]..digits[2]..digits[3]..digits[4])
--FLAP POSITION DISPLAY
--[455] = "%.4f", --FLAP POS 1. DRUM
--[456] = "%.4f", --FLAP POS 2. DRUM
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(455) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(456) * 10)
ExportScript.Tools.SendData(2014, digits[1]..digits[2])
--BRAKE/HYD DISPLAY
--[550] = "%.4f", --BRAKE 1. DRUM
--[551] = "%.4f", --BRAKE 2.
--[552] = "%.4f", --BRAKE 3.
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(550) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(551) * 10)
digits[3] = string.format("%1.0f",mainPanelDevice:get_argument_value(552) * 10)
ExportScript.Tools.SendData(2015, digits[1]..digits[2]..digits[3])
--[553] = "%.4f", --HYD1 1. DRUM
--[554] = "%.4f", --HYD1 2.
--[555] = "%.4f", --HYD1 3.
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(553) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(554) * 10)
digits[3] = string.format("%1.0f",mainPanelDevice:get_argument_value(555) * 10)
ExportScript.Tools.SendData(2016, digits[1]..digits[2]..digits[3])
--[556] = "%.4f", --HYD2 1. DRUM
--[557] = "%.4f", --HYD2 2.
--[558] = "%.4f", --HYD2 3.
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(556) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(557) * 10)
digits[3] = string.format("%1.0f",mainPanelDevice:get_argument_value(558) * 10)
ExportScript.Tools.SendData(2017, digits[1]..digits[2]..digits[3])
--UPPER AMARMENT PANEL
--[385] = "%.4f", --MODE
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(385) * 10)
if digits[1] == "0" then
ExportScript.Tools.SendData(2018, " - ")
elseif digits[1] == "2" then
ExportScript.Tools.SendData(2018, "AUT")
elseif digits[1] == "4" then
ExportScript.Tools.SendData(2018, "CIP")
elseif digits[1] == "6" then
ExportScript.Tools.SendData(2018, "DSL")
elseif digits[1] == "8" then
ExportScript.Tools.SendData(2018, "DIR ")
elseif digits[1] == "10" then
ExportScript.Tools.SendData(2018, "AGM")
end
--[386] = "%.4f", --FUZ 1. DRUM
--[387] = "%.4f", --FUR 2.
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(386) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(387) * 10)
ExportScript.Tools.SendData(2019, digits[1]..digits[2])
--[392] = "%.4f", --InVT x 10 1. DRUM
--[393] = "%.4f", --InVT x 10 2.
--[394] = "%.4f", --InVT x 10 3.
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(392) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(393) * 10)
digits[3] = string.format("%1.0f",mainPanelDevice:get_argument_value(394) * 10)
ExportScript.Tools.SendData(2020, digits[1]..digits[2]..digits[3])
--[391] = "%.4f", --MULT
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(391) * 10)
ExportScript.Tools.SendData(2021, digits[1])
--[389] = "%.4f", --QTY 1. Drum
--[390] = "%.4f", --QTY 2.
digits = {}
digits[1] = string.format("%1.0f",mainPanelDevice:get_argument_value(389) * 10)
digits[2] = string.format("%1.0f",mainPanelDevice:get_argument_value(390) * 10)
ExportScript.Tools.SendData(2022, digits[1]..digits[2])
--> McMicha
-- UFC Displays
local lUfcDisplays = list_indication(5)
if ExportScript.Config.Debug then
ExportScript.Tools.WriteToLog('lUfcDisplays : '..ExportScript.Tools.dump(lUfcDisplays))
end
local to1, to2, from1, from2, lUFC_Chnl1, lUFC_Chnl2, lUFC_Left_Position, lUFC_Right_Position, lUFC_Display = nil, nil, nil, nil, "", "", "", "", ""
to1, to2 = lUfcDisplays:find("UFC_DISPLAY")
if (to1 ~= nil) then
from1, from2 = lUfcDisplays:find("ufc_chnl_1_.%c")
if (from2 ~= nill) then
to1, to2 = lUfcDisplays:find("%c", from2+2)
if (to1 ~= nil) then
lUFC_Chnl1 = lUfcDisplays:sub(from2+1, to1-1)
end
end
from1, from2 = lUfcDisplays:find("ufc_chnl_2_.%c", to2)
if (from2 ~= nill) then
to1, to2 = lUfcDisplays:find("%c", from2+2)
if (to1 ~= nil) then
lUFC_Chnl2 = lUfcDisplays:sub(from2+1, to1-1)
end
end
from1, from2 = lUfcDisplays:find("ufc_left_position%c", to2)
if (from2 ~= nill) then
to1, to2 = lUfcDisplays:find("%c", from2+2)
if (to1 ~= nil) then
lUFC_Left_Position = lUfcDisplays:sub(from2+1, to1-1)
end
end
from1, from2 = lUfcDisplays:find("ufc_right_position%c", to2)
if (from2 ~= nill) then
if (from2 ~= nil) then
lUFC_Right_Position = lUfcDisplays:sub(from2+1)
lUFC_Right_Position = lUFC_Right_Position:gsub("%c", "")
end
end
end
local lRep = 8 - lUFC_Left_Position:len() - lUFC_Right_Position:len()
lUFC_Display = lUFC_Left_Position..string.rep(" ", lRep)..lUFC_Right_Position
if ExportScript.Config.Debug then
ExportScript.Tools.WriteToLog("lUFC_Chnl1: "..string.format("%s", lUFC_Chnl1)) -- string with max 2 charachters
ExportScript.Tools.WriteToLog("lUFC_Chnl2: "..string.format("%s", lUFC_Chnl2)) -- string with max 2 charachters
ExportScript.Tools.WriteToLog("lUFC_Left_Position: "..string.format("%s", lUFC_Left_Position))
ExportScript.Tools.WriteToLog("lUFC_Right_Position: "..string.format("%s", lUFC_Right_Position))
ExportScript.Tools.WriteToLog("lUFC_Display: "..string.format("%s", lUFC_Display)) -- string with max 8 charachters
end
ExportScript.Tools.SendData(2023, string.format("%s", lUFC_Chnl1)) -- string with max 2 charachters
ExportScript.Tools.SendData(2024, string.format("%s", lUFC_Chnl2)) -- string with max 2 charachters
ExportScript.Tools.SendData(2025, string.format("%s", lUFC_Display)) -- string with max 8 charachters
-- ODU Display
local lODUDisplays = list_indication(6)
if ExportScript.Config.Debug then
ExportScript.Tools.WriteToLog('lODUDisplays : '..ExportScript.Tools.dump(lODUDisplays))
end
local to1, to2, from1, from2 = nil, nil, nil, nil
local lODU_Text = {"","","","",""}
local lODU_select = " "
to1, to2 = lODUDisplays:find("ODU_DISPLAY")
if (to1 ~= nil) then
for lIndex = 1, 5, 1 do
lODU_select = " "
from1, from2 = lODUDisplays:find("ODU_Option_"..lIndex.."_Slc%c")
if (from2 ~= nill) then
to1, to2 = lODUDisplays:find("%c", from2+2)
if (to1 ~= nil) then
lODU_select = lODUDisplays:sub(from2+1, to1-1)
lODU_select = lODU_select:gsub(":", "¦")
end
end
from1, from2 = lODUDisplays:find("ODU_Option_"..lIndex.."_Text%c")
if (from2 ~= nill) then
to1, to2 = lODUDisplays:find("%c", from2+2)
if (to1 ~= nil) then
lODU_Text[lIndex] = lODUDisplays:sub(from2+1, to1-1)
end
end
lODU_Text[lIndex] = lODU_select..lODU_Text[lIndex]
end -- for
end
-- string with max 5 characters
if ExportScript.Config.Debug then
ExportScript.Tools.WriteToLog("lODU_Text1: "..string.format("%s", lODU_Text[1]))
ExportScript.Tools.WriteToLog("lODU_Text2: "..string.format("%s", lODU_Text[2]))
ExportScript.Tools.WriteToLog("lODU_Text3: "..string.format("%s", lODU_Text[3]))
ExportScript.Tools.WriteToLog("lODU_Text4: "..string.format("%s", lODU_Text[4]))
ExportScript.Tools.WriteToLog("lODU_Text5: "..string.format("%s", lODU_Text[5]))
end
ExportScript.Tools.SendData(2026, string.format("%s", lODU_Text[1]))
ExportScript.Tools.SendData(2027, string.format("%s", lODU_Text[2]))
ExportScript.Tools.SendData(2028, string.format("%s", lODU_Text[3]))
ExportScript.Tools.SendData(2029, string.format("%s", lODU_Text[4]))
ExportScript.Tools.SendData(2030, string.format("%s", lODU_Text[5]))
-- UVHF Display
local lUVHFDisplay = list_indication(7)
if ExportScript.Config.Debug then
ExportScript.Tools.WriteToLog('lUVHFDisplay : '..ExportScript.Tools.dump(lUVHFDisplay))
end
local to1, to2, from1, from2, lUVHF_Channel, lUHF_Freq_Left, lacnip_1_label_mode, lacnip_1_mode, lacnip_1_label_code, lacnip_1_code, lacnip_2_label_mode, lacnip_2_mode, lacnip_2_label_code, lacnip_2_code = nil, nil, nil, nil, "", "", "", "", "", "", "", "", "", ""
local lacnip_line = {"", "", "", ""}
to1, to2 = lUVHFDisplay:find("UVHF_DISPLAY")
if (to1 ~= nil) then
from1, from2 = lUVHFDisplay:find("uvhf_channel%c")
if (from2 ~= nil) then
to1, to2 = lUVHFDisplay:find("%c", from2+2)
if (to1 ~= nil) then
lUVHF_Channel = lUVHFDisplay:sub(from2+1, to1-1)
end
end
from1, from2 = lUVHFDisplay:find("uvhf_freq_left%c", to2)
if (from2 ~= nil) then
to1, to2 = lUVHFDisplay:find("%c", from2+2)
if (to1 ~= nil) then
lUHF_Freq_Left = lUVHFDisplay:sub(from2+1, to1-1)
end
end
from1, from2 = lUVHFDisplay:find("acnip_1_label_mode%c", to2)
if (from2 ~= nil) then
to1, to2 = lUVHFDisplay:find("%c", from2+2)
if (to1 ~= nil) then
lacnip_1_label_mode = lUVHFDisplay:sub(from2+1, to1-1)
end
end
from1, from2 = lUVHFDisplay:find("acnip_1_mode%c", to2)
if (from2 ~= nil) then
to1, to2 = lUVHFDisplay:find("%c", from2+2)
if (to1 ~= nil) then
lacnip_1_mode = lUVHFDisplay:sub(from2+1, to1-1)
end
end
from1, from2 = lUVHFDisplay:find("acnip_1_label_code%c", to2)
if (from2 ~= nil) then
to1, to2 = lUVHFDisplay:find("%c", from2+2)
if (to1 ~= nil) then
lacnip_1_label_code = lUVHFDisplay:sub(from2+1, to1-1)
end
end
from1, from2 = lUVHFDisplay:find("acnip_1_code%c", to2)
if (from2 ~= nil) then
to1, to2 = lUVHFDisplay:find("%c", from2+2)
if (to1 ~= nil) then
lacnip_1_code = lUVHFDisplay:sub(from2+1, to1-1)
end
end
from1, from2 = lUVHFDisplay:find("acnip_2_label_mode%c", to2)
if (from2 ~= nil) then
to1, to2 = lUVHFDisplay:find("%c", from2+2)
if (to1 ~= nil) then
lacnip_2_label_mode = lUVHFDisplay:sub(from2+1, to1-1)
end
end
from1, from2 = lUVHFDisplay:find("acnip_2_mode%c", to2)
if (from2 ~= nil) then
to1, to2 = lUVHFDisplay:find("%c", from2+2)
if (to1 ~= nil) then
lacnip_2_mode = lUVHFDisplay:sub(from2+1, to1-1)
end
end
from1, from2 = lUVHFDisplay:find("acnip_2_label_code%c", to2)
if (from2 ~= nil) then
to1, to2 = lUVHFDisplay:find("%c", from2+2)
if (to1 ~= nil) then
lacnip_2_label_code = lUVHFDisplay:sub(from2+1, to1-1)
end
end
from1, from2 = lUVHFDisplay:find("acnip_2_code%c", to2)
if (from2 ~= nil) then
to1, to2 = lUVHFDisplay:find("%c", from2+2)
if (to1 ~= nil) then
lacnip_2_code = lUVHFDisplay:sub(from2+1, to1-1)
end
end
end
lacnip_line[1] = lacnip_1_label_mode.." "..lacnip_2_label_mode
local lRep1 = 4 - lacnip_1_mode:len()
local lRep2 = 4 - lacnip_2_mode:len()
lacnip_line[2] = string.rep(" ", lRep1)..lacnip_1_mode.." "..lacnip_2_mode..string.rep(" ", lRep2)
lacnip_line[3] = lacnip_1_label_code.." "..lacnip_2_label_code
lRep1 = 4 - lacnip_1_code:len()
lRep2 = 4 - lacnip_2_code:len()
lacnip_line[4] = string.rep(" ", lRep1)..lacnip_1_code.." "..lacnip_2_code..string.rep(" ", lRep2)
if ExportScript.Config.Debug then
-- string with max 2 charachters
ExportScript.Tools.WriteToLog("lUVHF_Channel: "..string.format("%s", lUVHF_Channel))
-- string with max 7 charachters
ExportScript.Tools.WriteToLog("lUHF_Freq_Left: "..string.format("%s", lUHF_Freq_Left))
-- string with max 10 charachters
ExportScript.Tools.WriteToLog("lacnip_line1: '"..string.format("%s", lacnip_line[1]).."'")
ExportScript.Tools.WriteToLog("lacnip_line2: '"..string.format("%s", lacnip_line[2]).."'")
ExportScript.Tools.WriteToLog("lacnip_line3: '"..string.format("%s", lacnip_line[3]).."'")
ExportScript.Tools.WriteToLog("lacnip_line4: '"..string.format("%s", lacnip_line[4]).."'")
end
-- string with max 2 charachters