Skip to content

Commit

Permalink
feat(elec-a380): ALTN ESS FEED P/B FAULT illuminates when AC EMER is …
Browse files Browse the repository at this point in the history
…not powered (#8115)

* feat(elec): ALTN ESS FEED P/B FAULT illuminates when AC EMER is not powered

* fix: change unit test, remove unused functions
  • Loading branch information
lukecologne authored Jul 15, 2023
1 parent 9bed87c commit 8a4fc32
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ impl A380AlternatingCurrentElectrical {
self.emergency_gen_contactor.is_closed()
}

pub fn ac_ess_bus_is_powered(&self, electricity: &Electricity) -> bool {
electricity.is_powered(&self.ac_ess_bus)
pub fn ac_emer_bus_is_powered(&self, electricity: &Electricity) -> bool {
electricity.is_powered(&self.ac_emer_bus)
}
}
impl A380AlternatingCurrentElectricalSystem for A380AlternatingCurrentElectrical {
Expand Down
13 changes: 8 additions & 5 deletions fbw-a380x/src/wasm/systems/a380_systems/src/electrical/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ impl A380Electrical {
.emergency_generator_contactor_is_closed()
}

fn ac_ess_bus_is_powered(&self, electricity: &Electricity) -> bool {
self.alternating_current.ac_ess_bus_is_powered(electricity)
fn ac_emer_bus_is_powered(&self, electricity: &Electricity) -> bool {
self.alternating_current.ac_emer_bus_is_powered(electricity)
}

fn galley_is_shed(&self) -> bool {
Expand Down Expand Up @@ -348,7 +348,7 @@ impl A380ElectricalOverheadPanel {
electricity: &Electricity,
) {
self.ac_ess_feed
.set_fault(!electrical.ac_ess_bus_is_powered(electricity));
.set_fault(!electrical.ac_emer_bus_is_powered(electricity));

self.generators
.iter_mut()
Expand Down Expand Up @@ -2479,8 +2479,11 @@ mod a380_electrical_circuit_tests {
}

#[test]
fn when_ac_ess_bus_is_unpowered_ac_ess_feed_has_fault() {
let mut test_bed = test_bed_with().airspeed(Velocity::default()).run();
fn when_ac_emer_bus_is_unpowered_ac_ess_feed_has_fault() {
let mut test_bed = test_bed_with()
.airspeed(Velocity::default())
.all_bats_off()
.run();

assert!(test_bed.ac_ess_feed_has_fault());
}
Expand Down

0 comments on commit 8a4fc32

Please sign in to comment.