Skip to content

Commit 42a5461

Browse files
authored
Update Toliss A32x Series (#4)
Found no proper way to check Anti Ice systems so far, but rest is ok. Hope `!doors.includes(1)` works fine as the doors are configurable and there is no easy way to check all available doors with all liveries/config options. Simply if the array contains any 1's then this means `AnyDoorOpen = true`, no 1's in the array it will be `AllDoorsClosed = true`.
1 parent 6783a8d commit 42a5461

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

src/aircraft/Toliss.ts

+51-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ export default class Toliss extends AircraftConfig {
2424
[AircraftFeature.LandingLights]: {
2525
'AirbusFBW/OHPLightSwitches': FeatureType.IntArray,
2626
},
27+
[AircraftFeature.LogoLights]: {
28+
'AirbusFBW/OHPLightSwitches': FeatureType.IntArray,
29+
},
2730
[AircraftFeature.NavigationLights]: {
2831
'AirbusFBW/OHPLightSwitches': FeatureType.IntArray,
2932
},
@@ -33,8 +36,27 @@ export default class Toliss extends AircraftConfig {
3336
[AircraftFeature.TaxiLights]: {
3437
'AirbusFBW/OHPLightSwitches': FeatureType.IntArray,
3538
},
39+
[AircraftFeature.WingLights]: {
40+
'AirbusFBW/OHPLightSwitches': FeatureType.IntArray,
41+
},
42+
[AircraftFeature.EmergencyLights]: {
43+
'AirbusFBW/OHPLightSwitches': FeatureType.IntArray,
44+
},
45+
[AircraftFeature.Seatbelts]: {
46+
'AirbusFBW/OHPLightSwitches': FeatureType.IntArray,
47+
},
48+
[AircraftFeature.Battery]: {
49+
'AirbusFBW/BatOHPArray': FeatureType.IntArray,
50+
},
3651
[AircraftFeature.APU]: {
37-
'AirbusFBW/APUAvail': FeatureType.Int,
52+
'AirbusFBW/APUAvail': FeatureType.Int,
53+
},
54+
[AircraftFeature.Packs]: {
55+
'AirbusFBW/Pack1Flow': FeatureType.Int,
56+
'AirbusFBW/Pack2Flow': FeatureType.Int,
57+
},
58+
[AircraftFeature.Doors]: {
59+
'AirbusFBW/PaxDoorArray': FeatureType.IntArray,
3860
},
3961
}
4062

@@ -58,10 +80,26 @@ export default class Toliss extends AircraftConfig {
5880
return value[4] === 2 && value[5] === 2
5981
}
6082

83+
logoLights(value: number[]): FeatureState {
84+
return value[2] === 1 || value[2] === 2
85+
}
86+
6187
navigationLights(value: number[]): FeatureState {
6288
return value[2] === 1 || value[2] === 2
6389
}
6490

91+
wingLights(value: number[]): FeatureState {
92+
return value[1] === 1
93+
}
94+
95+
emergencyLights(value: number[]): FeatureState {
96+
return value[10] === 1 || value[10] === 2
97+
}
98+
99+
seatbelts(value: number[]): FeatureState {
100+
return value[11] === 1
101+
}
102+
65103
strobeLights(value: number[]): FeatureState {
66104
// Ignore if the switch is on AUTO position
67105
if (value[7] === 1) {
@@ -75,7 +113,19 @@ export default class Toliss extends AircraftConfig {
75113
return value[3] === 1 || value[3] === 2
76114
}
77115

116+
battery(value: number[]): FeatureState {
117+
return value[0] === 1 && value[1] === 1
118+
}
119+
78120
APU(value: number): FeatureState {
79121
return value === 1
80122
}
123+
124+
packs(p1: number, p2: number): FeatureState {
125+
return p1 > 0.5 || p2 > 0.5
126+
}
127+
128+
doors(doors: number[]): FeatureState {
129+
return !doors.includes(1)
130+
}
81131
}

0 commit comments

Comments
 (0)