From a659487c564496f40aa13ad2ab2e3ed03da9aa15 Mon Sep 17 00:00:00 2001 From: "B.Fatih KOZ" Date: Sun, 17 Nov 2024 22:37:57 +0300 Subject: [PATCH] Update Toliss.ts No Anti ICE so far, but rest is ok. --- src/aircraft/Toliss.ts | 52 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/src/aircraft/Toliss.ts b/src/aircraft/Toliss.ts index f387630..c55fce3 100644 --- a/src/aircraft/Toliss.ts +++ b/src/aircraft/Toliss.ts @@ -24,6 +24,9 @@ export default class Toliss extends AircraftConfig { [AircraftFeature.LandingLights]: { 'AirbusFBW/OHPLightSwitches': FeatureType.IntArray, }, + [AircraftFeature.LogoLights]: { + 'AirbusFBW/OHPLightSwitches': FeatureType.IntArray, + }, [AircraftFeature.NavigationLights]: { 'AirbusFBW/OHPLightSwitches': FeatureType.IntArray, }, @@ -33,8 +36,27 @@ export default class Toliss extends AircraftConfig { [AircraftFeature.TaxiLights]: { 'AirbusFBW/OHPLightSwitches': FeatureType.IntArray, }, + [AircraftFeature.WingLights]: { + 'AirbusFBW/OHPLightSwitches': FeatureType.IntArray, + }, + [AircraftFeature.EmergencyLights]: { + 'AirbusFBW/OHPLightSwitches': FeatureType.IntArray, + }, + [AircraftFeature.Seatbelts]: { + 'AirbusFBW/OHPLightSwitches': FeatureType.IntArray, + }, + [AircraftFeature.Battery]: { + 'AirbusFBW/BatOHPArray': FeatureType.IntArray, + }, [AircraftFeature.APU]: { - 'AirbusFBW/APUAvail': FeatureType.Int, + 'AirbusFBW/APUAvail': FeatureType.Int, + }, + [AircraftFeature.Packs]: { + 'AirbusFBW/Pack1Flow': FeatureType.Int, + 'AirbusFBW/Pack2Flow': FeatureType.Int, + }, + [AircraftFeature.Doors]: { + 'AirbusFBW/PaxDoorArray': FeatureType.IntArray, }, } @@ -58,10 +80,26 @@ export default class Toliss extends AircraftConfig { return value[4] === 2 && value[5] === 2 } + logoLights(value: number[]): FeatureState { + return value[2] === 1 || value[2] === 2 + } + navigationLights(value: number[]): FeatureState { return value[2] === 1 || value[2] === 2 } + wingLights(value: number[]): FeatureState { + return value[1] === 1 + } + + emergencyLights(value: number[]): FeatureState { + return value[10] === 1 || value[10] === 2 + } + + seatbelts(value: number[]): FeatureState { + return value[11] === 1 + } + strobeLights(value: number[]): FeatureState { // Ignore if the switch is on AUTO position if (value[7] === 1) { @@ -75,7 +113,19 @@ export default class Toliss extends AircraftConfig { return value[3] === 1 || value[3] === 2 } + battery(value: number[]): FeatureState { + return value[0] === 1 && value[1] === 1 + } + APU(value: number): FeatureState { return value === 1 } + + packs(p1: number, p2: number): FeatureState { + return p1 > 0.5 || p2 > 0.5 + } + + doors(doors: number[]): FeatureState { + return !doors.includes(1) + } }