Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update FenixA320 #3

Merged
merged 4 commits into from
Nov 11, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 54 additions & 4 deletions src/aircraft/FenixA320.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,35 @@ export default class FenixA320 extends AircraftConfig {
[AircraftFeature.WingLights]: {
S_OH_EXT_LT_WING: FeatureType.Int,
},
[AircraftFeature.EmergencyLights]: {
S_OH_INT_LT_EMER: FeatureType.Int,
},
[AircraftFeature.Seatbelts]: {
S_OH_SIGNS: FeatureType.Int,
},
[AircraftFeature.Battery]: {
S_OH_ELEC_BAT1: FeatureType.Int,
S_OH_ELEC_BAT2: FeatureType.Int,
I_OH_ELEC_EXT_PWR_L: FeatureType.Int,
},
[AircraftFeature.APU]: {
S_OH_ELEC_APU_MASTER: FeatureType.Int,
S_OH_ELEC_APU_START: FeatureType.Int,
I_OH_ELEC_APU_START_U: FeatureType.Int,
},
[AircraftFeature.Packs]: {
S_OH_PNEUMATIC_PACK_1: FeatureType.Int,
I_OH_PNEUMATIC_PACK_1_U: FeatureType.Int,
S_OH_PNEUMATIC_PACK_2: FeatureType.Int,
I_OH_PNEUMATIC_PACK_2_U: FeatureType.Int,
},
[AircraftFeature.Doors]: {
Any_Exit_open_L: FeatureType.Int,
Any_Exit_open_R: FeatureType.Int,
},
[AircraftFeature.AntiIce]: {
S_OH_PNEUMATIC_WING_ANTI_ICE: FeatureType.Int,
S_OH_PNEUMATIC_ENG1_ANTI_ICE: FeatureType.Int,
S_OH_PNEUMATIC_ENG2_ANTI_ICE: FeatureType.Int,
},
}

Expand Down Expand Up @@ -87,15 +113,39 @@ export default class FenixA320 extends AircraftConfig {
return value === 2
}

taxiLights(value: number): FeatureState {
return value === 1 || value === 2
}

wingLights(value: number): FeatureState {
return value === 1
}

taxiLights(value: number): FeatureState {
emergencyLights(value: number): FeatureState {
return value === 1 || value === 2
}

APU(mastersw: number, startsw: number): FeatureState {
return mastersw === 1 && startsw === 2
seatbelts(value: number): FeatureState {
return value === 1
}

battery(b1: number, b2: number, ext_pwr: number): FeatureState {
return (b1 === 1 && b2 === 1) || ext_pwr === 1
}

APU(master_switch: number, avail_status: number): FeatureState {
FatihKoz marked this conversation as resolved.
Show resolved Hide resolved
return master_switch === 1 && avail_status === 1
}

packs(left_switch: number, left_message: number, right_switch: number, right_message: number): FeatureState {
return (left_switch === 1 && left_message === 0) || (right_switch === 1 && right_message === 0)
}

doors(exits_left: number, exits_right: number): FeatureState {
return exits_left === 0 && exits_right === 0
}

antiIce(wing: number, eng1: number, eng2: number): FeatureState {
return wing === 1 || (eng1 === 1 && eng2 === 1)
}
}
Loading