Skip to content

Commit

Permalink
fix(elec): Deactivate seats electrical when no elec (flybywiresim#9089)
Browse files Browse the repository at this point in the history
* deactivate seats if no AC

* removed else statements

* Using correct BUS
  • Loading branch information
crocket63 authored Oct 20, 2024
1 parent 444d8c0 commit f98489c
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions ...ft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/model/behaviour/interactive-parts.xml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,14 @@
<SWITCH_POSITION_TYPE>L</SWITCH_POSITION_TYPE>
<SWITCH_POSITION_VAR>XMLVAR_SEAT_FWDAFT</SWITCH_POSITION_VAR>
<MOMENTARY_REPEAT_FREQUENCY>800</MOMENTARY_REPEAT_FREQUENCY>
<CODE_POS_0>(L:SEAT_CPT_MOVE_FWD_AFT) 0.4 + 100 min (&gt;L:SEAT_CPT_MOVE_FWD_AFT)</CODE_POS_0>
<CODE_POS_2>(L:SEAT_CPT_MOVE_FWD_AFT) 0.4 - 0 max (&gt;L:SEAT_CPT_MOVE_FWD_AFT)</CODE_POS_2>
<CODE_POS_0>(L:A32NX_ELEC_AC_2_BUS_IS_POWERED, Bool) if{
(L:SEAT_CPT_MOVE_FWD_AFT) 0.4 + 100 min (&gt;L:SEAT_CPT_MOVE_FWD_AFT)
}
</CODE_POS_0>
<CODE_POS_2>(L:A32NX_ELEC_AC_2_BUS_IS_POWERED, Bool) if{
(L:SEAT_CPT_MOVE_FWD_AFT) 0.4 - 0 max (&gt;L:SEAT_CPT_MOVE_FWD_AFT)
}
</CODE_POS_2>
<MOMENTARY_SWITCH/>
<ANIM_LAG>800</ANIM_LAG>
<STATE_MAX_TIMER>0.2</STATE_MAX_TIMER>
Expand All @@ -288,8 +294,14 @@
<SWITCH_POSITION_TYPE>L</SWITCH_POSITION_TYPE>
<SWITCH_POSITION_VAR>XMLVAR_SEAT_UPDOWN</SWITCH_POSITION_VAR>
<MOMENTARY_REPEAT_FREQUENCY>800</MOMENTARY_REPEAT_FREQUENCY>
<CODE_POS_0>(L:SEAT_CPT_MOVE_UP_DOWN) 0.4 + 100 min (&gt;L:SEAT_CPT_MOVE_UP_DOWN)</CODE_POS_0>
<CODE_POS_2>(L:SEAT_CPT_MOVE_UP_DOWN) 0.4 - 0 max (&gt;L:SEAT_CPT_MOVE_UP_DOWN)</CODE_POS_2>
<CODE_POS_0>(L:A32NX_ELEC_AC_2_BUS_IS_POWERED, Bool) if{
(L:SEAT_CPT_MOVE_UP_DOWN) 0.4 + 100 min (&gt;L:SEAT_CPT_MOVE_UP_DOWN)
}
</CODE_POS_0>
<CODE_POS_2>(L:A32NX_ELEC_AC_2_BUS_IS_POWERED, Bool) if{
(L:SEAT_CPT_MOVE_UP_DOWN) 0.4 - 0 max (&gt;L:SEAT_CPT_MOVE_UP_DOWN)
}
</CODE_POS_2>
<MOMENTARY_SWITCH/>
<ANIM_LAG>800</ANIM_LAG>
<STATE_MAX_TIMER>0.2</STATE_MAX_TIMER>
Expand Down Expand Up @@ -368,8 +380,14 @@
<SWITCH_POSITION_TYPE>L</SWITCH_POSITION_TYPE>
<SWITCH_POSITION_VAR>XMLVAR_SEAT_FO_FWDAFT</SWITCH_POSITION_VAR>
<MOMENTARY_REPEAT_FREQUENCY>400</MOMENTARY_REPEAT_FREQUENCY>
<CODE_POS_0>(L:SEAT_FO_MOVE_FWD_AFT) 0.2 + 100 min (&gt;L:SEAT_FO_MOVE_FWD_AFT)</CODE_POS_0>
<CODE_POS_2>(L:SEAT_FO_MOVE_FWD_AFT) 0.2 - 0 max (&gt;L:SEAT_FO_MOVE_FWD_AFT)</CODE_POS_2>
<CODE_POS_0>(L:A32NX_ELEC_AC_2_BUS_IS_POWERED, Bool) if{
(L:SEAT_FO_MOVE_FWD_AFT) 0.2 + 100 min (&gt;L:SEAT_FO_MOVE_FWD_AFT)
}
</CODE_POS_0>
<CODE_POS_2>(L:A32NX_ELEC_AC_2_BUS_IS_POWERED, Bool) if{
(L:SEAT_FO_MOVE_FWD_AFT) 0.2 - 0 max (&gt;L:SEAT_FO_MOVE_FWD_AFT)
}
</CODE_POS_2>
<MOMENTARY_SWITCH/>
<ANIM_LAG>800</ANIM_LAG>
<STATE_MAX_TIMER>2</STATE_MAX_TIMER>
Expand All @@ -392,8 +410,14 @@
<SWITCH_POSITION_TYPE>L</SWITCH_POSITION_TYPE>
<SWITCH_POSITION_VAR>XMLVAR_SEAT_FO_UPDOWN</SWITCH_POSITION_VAR>
<MOMENTARY_REPEAT_FREQUENCY>400</MOMENTARY_REPEAT_FREQUENCY>
<CODE_POS_0>(L:SEAT_FO_MOVE_UP_DOWN) 0.2 + 100 min (&gt;L:SEAT_FO_MOVE_UP_DOWN)</CODE_POS_0>
<CODE_POS_2>(L:SEAT_FO_MOVE_UP_DOWN) 0.2 - 0 max (&gt;L:SEAT_FO_MOVE_UP_DOWN)</CODE_POS_2>
<CODE_POS_0>(L:A32NX_ELEC_AC_2_BUS_IS_POWERED, Bool) if{
(L:SEAT_FO_MOVE_UP_DOWN) 0.2 + 100 min (&gt;L:SEAT_FO_MOVE_UP_DOWN)
}
</CODE_POS_0>
<CODE_POS_2>(L:A32NX_ELEC_AC_2_BUS_IS_POWERED, Bool) if{
(L:SEAT_FO_MOVE_UP_DOWN) 0.2 - 0 max (&gt;L:SEAT_FO_MOVE_UP_DOWN)
}
</CODE_POS_2>
<MOMENTARY_SWITCH/>
<ANIM_LAG>800</ANIM_LAG>
<STATE_MAX_TIMER>2</STATE_MAX_TIMER>
Expand Down

0 comments on commit f98489c

Please sign in to comment.