Skip to content

Commit 95a6139

Browse files
Add files via upload
Code clean-up and addition of license and copyright
1 parent 5ab5469 commit 95a6139

File tree

1 file changed

+53
-19
lines changed

1 file changed

+53
-19
lines changed

TolissCustom.lua

Lines changed: 53 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,36 @@
1-
print("[ *** IAN Toliss Custom Script - Version 1.1 - 28 July 2025" )
2-
print("[ *** IAN Toliss Custom Script - aircraft type is... ]" )
1+
-- TolissXKeyPadHelper
2+
-- Copyright (C) 2025 Ian Oliver
3+
4+
-- This program is free software: you can redistribute it and/or modify
5+
-- it under the terms of the GNU General Public License as published by
6+
-- the Free Software Foundation, either version 3 of the License, or
7+
-- (at your option) any later version.
8+
9+
-- This program is distributed in the hope that it will be useful,
10+
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
-- GNU General Public License for more details.
13+
14+
-- You should have received a copy of the GNU General Public License
15+
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
17+
18+
print("[ *** IAN TolissXKeyPadHelper - Version 1.1 - 1 August 2025" )
19+
print("[ *** - aircraft type is... ]" )
320
print(PLANE_ICAO)
421

522
-- ToLiss only
623
if PLANE_ICAO == "A319" or PLANE_ICAO == "A321" or PLANE_ICAO == "A21N"
724
or PLANE_ICAO == "A20N" or PLANE_ICAO == "A346" or PLANE_ICAO == "A339" then
825

9-
print("[ *** IAN Toliss Custom Script loaded ]" )
26+
print("[ *** IAN TolissXKeyPadHelper: Script loaded for selected aircraft type ]" )
1027

1128
-- file:///C:/Users/ian/Downloads/FlyWithLua_Manual_en-1.pdf section 2.2.4
12-
local cargodoors = dataref_table( "AirbusFBW/CargoDoorModeArray")
13-
local paxdoors = dataref_table( "AirbusFBW/PaxDoorModeArray")
14-
local dubrightness = dataref_table( "AirbusFBW/DUBrightness")
15-
16-
--AirbusFBW/CabinLightLevel
17-
1829

1930
function PaxDoorsClose()
20-
print("[ *** Toliss Custom/PaxDoorsClose]" )
31+
print("[ *** ian/PaxDoorsClose]" )
32+
33+
paxdoors = dataref_table( "AirbusFBW/PaxDoorModeArray")
2134
paxdoors[0]=0
2235
paxdoors[1]=0
2336
paxdoors[2]=0
@@ -29,7 +42,9 @@ function PaxDoorsClose()
2942
end
3043

3144
function PaxGate1()
32-
print("[ *** Toliss Custom/PaxGate1]" )
45+
print("[ *** ian/PaxGate1]" )
46+
47+
paxdoors = dataref_table( "AirbusFBW/PaxDoorModeArray")
3348
paxdoors[0]=2
3449
paxdoors[1]=0
3550
paxdoors[2]=0
@@ -41,7 +56,9 @@ function PaxGate1()
4156
end
4257

4358
function PaxGate1R()
44-
print("[ *** Toliss Custom/PaxGate1R]" )
59+
print("[ *** ian/PaxGate1R]" )
60+
61+
paxdoors = dataref_table( "AirbusFBW/PaxDoorModeArray")
4562
paxdoors[0]=2
4663
paxdoors[1]=0
4764
paxdoors[2]=0
@@ -53,7 +70,9 @@ function PaxGate1R()
5370
end
5471

5572
function PaxGateAll()
56-
print("[ *** Toliss Custom/PaxGateAll]" )
73+
print("[ *** ian/PaxGateAll]" )
74+
75+
paxdoors = dataref_table( "AirbusFBW/PaxDoorModeArray")
5776
paxdoors[0]=2
5877
paxdoors[1]=2
5978
paxdoors[2]=0
@@ -66,7 +85,9 @@ end
6685

6786

6887
function PaxStand1()
69-
print("[ *** Toliss Custom/PaxStand1]" )
88+
print("[ *** ian/PaxStand1]" )
89+
90+
paxdoors = dataref_table( "AirbusFBW/PaxDoorModeArray")
7091
paxdoors[0]=2
7192
paxdoors[1]=0
7293
paxdoors[2]=0
@@ -78,7 +99,9 @@ function PaxStand1()
7899
end
79100

80101
function PaxStand1R()
81-
print("[ *** Toliss Custom/PaxStand1R]" )
102+
print("[ *** ian/PaxStand1R]" )
103+
104+
paxdoors = dataref_table( "AirbusFBW/PaxDoorModeArray")
82105
paxdoors[0]=2
83106
paxdoors[1]=0
84107
paxdoors[2]=0
@@ -90,7 +113,9 @@ function PaxStand1R()
90113
end
91114

92115
function PaxStandAll()
93-
print("[ *** Toliss Custom/PaxStandAll]" )
116+
print("[ *** ian/PaxStandAll]" )
117+
118+
paxdoors = dataref_table( "AirbusFBW/PaxDoorModeArray")
94119
paxdoors[0]=2
95120
paxdoors[1]=2
96121
paxdoors[2]=0
@@ -102,21 +127,27 @@ function PaxStandAll()
102127
end
103128

104129
function CargoDoorsOpen()
105-
print("[ *** Toliss Custom/CargoDoorOpen]" )
130+
print("[ *** ian/CargoDoorOpen]" )
131+
132+
cargodoors = dataref_table( "AirbusFBW/CargoDoorModeArray")
106133
cargodoors[0]=2
107134
cargodoors[1]=2
108135
cargodoors[2]=2
109136
end
110137

111138
function CargoDoorsClose()
112-
print("[ *** Toliss Custom/CargoDoorClose]" )
139+
print("[ *** ian/CargoDoorClose]" )
140+
141+
cargodoors = dataref_table( "AirbusFBW/CargoDoorModeArray")
113142
cargodoors[0]=0
114143
cargodoors[1]=0
115144
cargodoors[2]=0
116145
end
117146

118147
function DUBright()
119148
print("[ *** ian/DUBright]" )
149+
150+
dubrightness = dataref_table( "AirbusFBW/DUBrightness")
120151
dubrightness[0]=1
121152
dubrightness[1]=1
122153
dubrightness[2]=1
@@ -129,6 +160,8 @@ end
129160

130161
function DUMedium()
131162
print("[ *** ian/DUMedium]" )
163+
164+
dubrightness = dataref_table( "AirbusFBW/DUBrightness")
132165
dubrightness[0]=0.5
133166
dubrightness[1]=0.5
134167
dubrightness[2]=0.5
@@ -141,6 +174,8 @@ end
141174

142175
function DUDim()
143176
print("[ *** ian/DUDim]" )
177+
178+
dubrightness = dataref_table( "AirbusFBW/DUBrightness")
144179
dubrightness[0]=0.2
145180
dubrightness[1]=0.2
146181
dubrightness[2]=0.2
@@ -155,7 +190,6 @@ function IntegralBright()
155190
print("[ *** ian/IntBright]" )
156191

157192
intbrightnesdataref = XPLMFindDataRef( "AirbusFBW/PanelBrightnessLevel")
158-
--fcubrightnesdataref = XPLMFindDataRef( "AirbusFBW/FCUIntegralBrightness")
159193
fcurheostats = dataref_table( "AirbusFBW/SupplLightLevelRehostats")
160194

161195
XPLMSetDataf( intbrightnesdataref, 1.0 )

0 commit comments

Comments
 (0)