Skip to content

Commit

Permalink
Merge branch 'RMP_fix_behavior_lights'
Browse files Browse the repository at this point in the history
  • Loading branch information
juliansebline committed Aug 7, 2022
2 parents b71ebfb + 08f7009 commit b21b690
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 77 deletions.
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@
1. [FMGC] Fix unnatural turn direction for path capture transition - @tracernz (Mike)
1. [FMGC] Fix unnatural turn direction for course capture transition - @tracernz (Mike)
1. [FMGC] Update spoiler CD for MSFS SDK clarification - @donstim (donbikes#4084)
1. [HYD] Actuators damping chambers can be asymetrical - @Crocket63 (crocket)
1. [FMGC] Implement procedure turns (PI leg) - @tracernz (Mike)
1. [ECAM] Move EWD to correct AC bus - @tracernz (Mike)
1. [FMGC] Fix inbound leg time for holds - @tracernz (Mike)
1. [MCDU] Improved visuals of Init-A and Init-B page - @derl30n (Leon)
1. [MODEL] Added new animated gear gravity extension handle- @tyler58546 (tyler58546), @MoreRightRudder (Mike), @Crocket63 (crocket), @Lantarius
1. [MCDU] Hide stored elements on A/C Status when there are none - @tracernz (Mike)
1. [FMGC] Fix ident for CD legs - @tracernz (Mike)
1. [RMP] Fixed the behavior of the RMPs and ACPs (VHFs only) - Julian Sebline (Julian Sebline#8476 on Discord)

## 0.8.0

Expand Down Expand Up @@ -306,6 +308,7 @@
1. [ATSU] Add FANS-C simulation for CPDLC - @Sven [de en] - (Sven Czarnian)
1. [ATSU] Add VDL3-simulation of datalink transport protocol - @Sven [de en] - (Sven Czarnian)
1. [FMGC] Improve robustness of ILS auto-tuning - @tracernz (Mike)
1. [OVHD] Fixed fire push button not being able to be stowed - Julian Sebline (Julian Sebline#8476 on Discord)

## 0.7.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,7 @@
<NODE_ID_BUTTON_SEQ1>#NODE_ID_BUTTON_SEQ1_VHF_L#</NODE_ID_BUTTON_SEQ1>
<NODE_ID_BUTTON_SEQ2>#NODE_ID_BUTTON_SEQ2_VHF_L#</NODE_ID_BUTTON_SEQ2>
<FREQ_ID>VHF_L</FREQ_ID>
<Radio_ID>1</Radio_ID>
<Button_ID>1</Button_ID>
<TRANSMIT_ID>1</TRANSMIT_ID>
<TRANSMIT_ID>0</TRANSMIT_ID>
<TOOLTIP_LEFT>TT:COCKPIT.TOOLTIPS.TRANSMITTER_VHF_L_VOLUME_DEC</TOOLTIP_LEFT>
<TOOLTIP_RIGHT>TT:COCKPIT.TOOLTIPS.TRANSMITTER_VHF_L_VOLUME_INC</TOOLTIP_RIGHT>
<TOOLTIP_HAND>TT:COCKPIT.TOOLTIPS.TRANSMITTER_VHF_L_AUDIO_TOGGLE</TOOLTIP_HAND>
Expand All @@ -374,9 +372,7 @@
<NODE_ID_BUTTON_SEQ1>#NODE_ID_BUTTON_SEQ1_VHF_C#</NODE_ID_BUTTON_SEQ1>
<NODE_ID_BUTTON_SEQ2>#NODE_ID_BUTTON_SEQ2_VHF_C#</NODE_ID_BUTTON_SEQ2>
<FREQ_ID>VHF_C</FREQ_ID>
<Radio_ID>2</Radio_ID>
<Button_ID>2</Button_ID>
<TRANSMIT_ID>2</TRANSMIT_ID>
<TRANSMIT_ID>1</TRANSMIT_ID>
<TOOLTIP_LEFT>TT:COCKPIT.TOOLTIPS.TRANSMITTER_VHF_C_VOLUME_DEC</TOOLTIP_LEFT>
<TOOLTIP_RIGHT>TT:COCKPIT.TOOLTIPS.TRANSMITTER_VHF_C_VOLUME_INC</TOOLTIP_RIGHT>
<TOOLTIP_HAND>TT:COCKPIT.TOOLTIPS.TRANSMITTER_VHF_C_AUDIO_TOGGLE</TOOLTIP_HAND>
Expand All @@ -396,9 +392,7 @@
<NODE_ID_BUTTON_SEQ1>#NODE_ID_BUTTON_SEQ1_VHF_R#</NODE_ID_BUTTON_SEQ1>
<NODE_ID_BUTTON_SEQ2>#NODE_ID_BUTTON_SEQ2_VHF_R#</NODE_ID_BUTTON_SEQ2>
<FREQ_ID>VHF_R</FREQ_ID>
<Radio_ID>3</Radio_ID>
<Button_ID>3</Button_ID>
<TRANSMIT_ID>3</TRANSMIT_ID>
<TRANSMIT_ID>2</TRANSMIT_ID>
<TOOLTIP_LEFT>TT:COCKPIT.TOOLTIPS.TRANSMITTER_VHF_R_VOLUME_DEC</TOOLTIP_LEFT>
<TOOLTIP_RIGHT>TT:COCKPIT.TOOLTIPS.TRANSMITTER_VHF_R_VOLUME_INC</TOOLTIP_RIGHT>
<TOOLTIP_HAND>TT:COCKPIT.TOOLTIPS.TRANSMITTER_VHF_R_AUDIO_TOGGLE</TOOLTIP_HAND>
Expand Down Expand Up @@ -691,22 +685,6 @@
}
</TRANSMIT_EMISSIVE_CODE>
</OverrideTemplateParameters>
<Condition Valid="Radio_ID">
<True>
<UseTemplate Name="ASOBO_GT_Update">
<FREQUENCY>3</FREQUENCY>
<UPDATE_CODE>
<!-- At the time of RMP fix, I couldn't figure out the purpose of this condition and its underlying code -->
<!-- But to me it was part of all the problems -->
<!-- I have disabled the code to make an example of regular code update if needed -->
(A:COM TRANSMIT:#Radio_ID#, Bool) if{
<!-- #Button_ID# (&gt;L:XMLVAR_COM_PANEL#ID#_Transmit_Channel) -->
}
</UPDATE_CODE>
</UseTemplate>
</True>
</Condition>

<Condition Valid="NO_BUTTON">
<False>
<UseTemplate Name="ASOBO_GT_Push_Button_Airliner">
Expand All @@ -715,26 +693,45 @@
<ANIM_NAME>#ANIM_NAME_BUTTON#</ANIM_NAME>
<SEQ1_NODE_ID>#NODE_ID_BUTTON_SEQ1#</SEQ1_NODE_ID>
<SEQ2_NODE_ID>#NODE_ID_BUTTON_SEQ2#</SEQ2_NODE_ID>
<LEFT_SINGLE_CODE>
<!-- valueCopilot to save the value because PILOT_TRANSMITTER_SET sets it for the copilot too
It generates a script error in the console but it works
-->
<LEFT_SINGLE_CODE type="rnp">
#SEQ1_POWERED# if{
(A:COM TRANSMIT:#Radio_ID#, Bool) ! (&gt;K:COM#Radio_ID#_TRANSMIT_SELECT)
#Button_ID# (L:XMLVAR_COM_PANEL#ID#_Transmit_Channel) == if{
0 (&gt;L:XMLVAR_COM_PANEL#ID#_Transmit_Channel)
let valueCopilot=(L:XMLVAR_COM_PANEL2_Transmit_Channel);

#TRANSMIT_ID# (L:XMLVAR_COM_PANEL#ID#_Transmit_Channel) == if{
4 (&gt;L:XMLVAR_COM_PANEL#ID#_Transmit_Channel)
} els{
#Button_ID# (&gt;L:XMLVAR_COM_PANEL#ID#_Transmit_Channel)
#TRANSMIT_ID# (&gt;L:XMLVAR_COM_PANEL#ID#_Transmit_Channel)
}

#ID# 1 == if{
(A:PILOT TRANSMITTER TYPE, Enum) #TRANSMIT_ID# == if{
4 (&gt;K:PILOT_TRANSMITTER_SET)
} els{
#TRANSMIT_ID# (&gt;K:PILOT_TRANSMITTER_SET)
}
valueCopilot (&gt;K:COPILOT_TRANSMITTER_SET)
} els{
(A:COPILOT TRANSMITTER TYPE, Enum) #TRANSMIT_ID# == if{
4 (&gt;K:COPILOT_TRANSMITTER_SET)
} els{
#TRANSMIT_ID# (&gt;K:COPILOT_TRANSMITTER_SET)
}
}
}
</LEFT_SINGLE_CODE>
<!-- Green light -->
<SEQ1_EMISSIVE_CODE>
#SEQ1_POWERED# if{
#Button_ID# (L:XMLVAR_COM_PANEL#ID#_Transmit_Channel) == (L:A32NX_OVHD_INTLT_ANN) 0 == or #EMISSIVE_DIM# *
#TRANSMIT_ID# (L:XMLVAR_COM_PANEL#ID#_Transmit_Channel) == (L:A32NX_OVHD_INTLT_ANN) 0 == or #EMISSIVE_DIM# *
}
</SEQ1_EMISSIVE_CODE>
<!-- Button name light (for example CALL or MECH)-->
<SEQ2_EMISSIVE_CODE>
#SEQ1_POWERED# if{
#Button_ID# (L:XMLVAR_COM_PANEL#ID#_Transmit_Channel) == (L:A32NX_OVHD_INTLT_ANN) 0 == or #EMISSIVE_DIM# *
#TRANSMIT_ID# (L:XMLVAR_COM_PANEL#ID#_Transmit_Channel) == (L:A32NX_OVHD_INTLT_ANN) 0 == or #EMISSIVE_DIM# *
}
</SEQ2_EMISSIVE_CODE>
<WWISE_EVENT_1>fcubutton</WWISE_EVENT_1>
Expand Down Expand Up @@ -776,13 +773,7 @@
(L:XMLVAR_COM_#ID#_Volume_#FREQ_ID#) #VOLUME_INCREMENT# - 0 max (&gt;L:XMLVAR_COM_#ID#_Volume_#FREQ_ID#)
}
</ANTICLOCKWISE_CODE>
<ANIM_CODE_SWITCH>
<!-- Code disabled because I did not understand its purpose when I fixed the RMPs -->
<!-- No changes seen but I don't want to delete code I don't understand -->

<!-- (L:XMLVAR_COM_#ID#_#FREQ_ID#_Switch_Down) -->
<!-- #Button_ID# (L:XMLVAR_COM_Transmit_Channel) == or 100 * -->
</ANIM_CODE_SWITCH>
<ANIM_CODE_SWITCH>(L:XMLVAR_COM_#ID#_#FREQ_ID#_Switch_Down) 100 *</ANIM_CODE_SWITCH>
<ANIM_NAME_PUSH>#ANIM_NAME_SWITCH#</ANIM_NAME_PUSH>
<LEFT_SINGLE_CODE>
#SEQ1_POWERED# if{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4061,22 +4061,20 @@
<Component ID="Audio_Panel_Left">
<!-- Init of volume and transmit channels in default operation state: Transmit VHF1 and listen VHF1 and VFH2 -->
<Update Once="True">
1 (&gt;L:XMLVAR_COM_PANEL1_Transmit_Channel)
1 (&gt;L:XMLVAR_COM_PANEL2_Transmit_Channel)
0 (&gt;L:XMLVAR_COM_PANEL1_Transmit_Channel)
0 (&gt;K:PILOT_TRANSMITTER_SET)

1 (&gt;L:XMLVAR_COM_1_VHF_L_Switch_Down)
1 (&gt;L:XMLVAR_COM_1_VHF_C_Switch_Down)
1 (&gt;L:XMLVAR_COM_2_VHF_L_Switch_Down)
1 (&gt;L:XMLVAR_COM_2_VHF_C_Switch_Down)

1 (&gt;K:COM1_RECEIVE_SELECT)
1 (&gt;K:COM2_RECEIVE_SELECT)
1 (&gt;K:COM3_RECEIVE_SELECT)

0.8 (&gt;L:XMLVAR_COM_1_Volume_VHF_L)
0.4 (&gt;L:XMLVAR_COM_1_Volume_VHF_C)
0.8 (&gt;L:XMLVAR_COM_2_Volume_VHF_L)
0.4 (&gt;L:XMLVAR_COM_2_Volume_VHF_C)
0 (&gt;L:XMLVAR_COM_1_Volume_VHF_R)
0 (&gt;K:COM3_VOLUME_SET)
</Update>
<UseTemplate Name="FBW_AIRLINER_Audio_Panel_Template">
<ID>1</ID>
Expand Down Expand Up @@ -4224,6 +4222,17 @@
</UseTemplate>
</Component>
<Component ID="Audio_Panel_Right">
<Update Once="True">
0 (&gt;L:XMLVAR_COM_PANEL2_Transmit_Channel)
0 (&gt;K:COPILOT_TRANSMITTER_SET)

1 (&gt;L:XMLVAR_COM_2_VHF_L_Switch_Down)
1 (&gt;L:XMLVAR_COM_2_VHF_C_Switch_Down)

0.8 (&gt;L:XMLVAR_COM_2_Volume_VHF_L)
0.4 (&gt;L:XMLVAR_COM_2_Volume_VHF_C)
0 (&gt;L:XMLVAR_COM_2_Volume_VHF_R)
</Update>
<UseTemplate Name="FBW_AIRLINER_Audio_Panel_Template">
<ID>2</ID>
<SIDE>R</SIDE>
Expand Down
31 changes: 20 additions & 11 deletions src/systems/a320_systems/src/hydraulic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ impl A320CargoDoorFactory {
1000000.,
Duration::from_millis(100),
[1., 1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1., 1.],
[0., 0.2, 0.21, 0.79, 0.8, 1.],
Self::FLOW_CONTROL_PROPORTIONAL_GAIN,
Self::FLOW_CONTROL_INTEGRAL_GAIN,
Expand Down Expand Up @@ -314,6 +315,7 @@ impl A320AileronFactory {
randomized_damping,
Duration::from_millis(300),
[1., 1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1., 1.],
[0., 0.2, 0.21, 0.79, 0.8, 1.],
Self::FLOW_CONTROL_PROPORTIONAL_GAIN,
Self::FLOW_CONTROL_INTEGRAL_GAIN,
Expand Down Expand Up @@ -426,6 +428,7 @@ impl A320SpoilerFactory {
randomized_damping,
Duration::from_millis(300),
[1., 1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1., 1.],
[0., 0.2, 0.21, 0.79, 0.8, 1.],
Self::FLOW_CONTROL_PROPORTIONAL_GAIN,
Self::FLOW_CONTROL_INTEGRAL_GAIN,
Expand Down Expand Up @@ -535,6 +538,7 @@ impl A320ElevatorFactory {
randomized_damping,
Duration::from_millis(300),
[1., 1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1., 1.],
[0., 0.2, 0.21, 0.79, 0.8, 1.],
Self::FLOW_CONTROL_PROPORTIONAL_GAIN,
Self::FLOW_CONTROL_INTEGRAL_GAIN,
Expand Down Expand Up @@ -632,6 +636,7 @@ impl A320RudderFactory {
randomized_damping,
Duration::from_millis(300),
[1., 1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1., 1.],
[0., 0.2, 0.21, 0.79, 0.8, 1.],
Self::FLOW_CONTROL_PROPORTIONAL_GAIN,
Self::FLOW_CONTROL_INTEGRAL_GAIN,
Expand Down Expand Up @@ -731,7 +736,8 @@ impl A320GearDoorFactory {
2000.,
28000.,
Duration::from_millis(100),
[0.5, 0.5, 1., 1., 0.5, 0.5],
[1., 1., 1., 1., 0.5, 0.5],
[0.5, 0.5, 1., 1., 1., 1.],
[0., 0.15, 0.16, 0.84, 0.85, 1.],
FLOW_CONTROL_PROPORTIONAL_GAIN,
FLOW_CONTROL_INTEGRAL_GAIN,
Expand All @@ -753,13 +759,14 @@ impl A320GearDoorFactory {
Length::new::<meter>(0.055),
Length::new::<meter>(0.03),
VolumeRate::new::<gallon_per_second>(0.09),
20000.,
5000.,
200000.,
2500.,
2000.,
9000.,
Duration::from_millis(100),
[0.5, 0.5, 1., 1., 0.5, 0.5],
[0., 0.15, 0.16, 0.84, 0.85, 1.],
[1., 1., 1., 1., 0.5, 0.5],
[0.5, 0.5, 1., 1., 1., 1.],
[0., 0.09, 0.1, 0.9, 0.91, 1.],
FLOW_CONTROL_PROPORTIONAL_GAIN,
FLOW_CONTROL_INTEGRAL_GAIN,
FLOW_CONTROL_FORCE_GAIN,
Expand Down Expand Up @@ -871,7 +878,8 @@ impl A320GearFactory {
50000.,
1000000.,
Duration::from_millis(100),
[0.5, 0.5, 1., 1., 0.5, 0.5],
[1., 1., 1., 1., 0.5, 0.5],
[0.5, 0.5, 1., 1., 1., 1.],
[0., 0.1, 0.11, 0.89, 0.9, 1.],
FLOW_CONTROL_PROPORTIONAL_GAIN,
FLOW_CONTROL_INTEGRAL_GAIN,
Expand All @@ -896,8 +904,9 @@ impl A320GearFactory {
50000.,
2500000.,
Duration::from_millis(100),
[0.5, 0.5, 1., 1., 0.5, 0.5],
[0., 0.1, 0.11, 0.89, 0.9, 1.],
[1., 1., 1., 1., 0.5, 0.5],
[0.2, 0.4, 1., 1., 1., 1.],
[0., 0.13, 0.17, 0.95, 0.96, 1.],
FLOW_CONTROL_PROPORTIONAL_GAIN,
FLOW_CONTROL_INTEGRAL_GAIN,
FLOW_CONTROL_FORCE_GAIN,
Expand Down Expand Up @@ -10596,14 +10605,14 @@ mod tests {

test_bed = test_bed
.stow_emergency_gear_extension()
.run_waiting_for(Duration::from_secs_f64(10.));
.run_waiting_for(Duration::from_secs_f64(5.));

// // After 10 seconds we expect gear being retracted and doors still down
// After 5 seconds we expect gear being retracted and doors still down
assert!(test_bed.gear_system_state() == GearSystemState::Retracting);
assert!(test_bed.is_all_doors_really_down());
assert!(!test_bed.is_all_gears_really_down());

test_bed = test_bed.run_waiting_for(Duration::from_secs_f64(10.));
test_bed = test_bed.run_waiting_for(Duration::from_secs_f64(15.));

assert!(test_bed.gear_system_state() == GearSystemState::AllUpLocked);
assert!(test_bed.is_all_doors_really_up());
Expand Down
16 changes: 9 additions & 7 deletions src/systems/systems/src/hydraulic/landing_gear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1432,14 +1432,15 @@ mod tests {
1,
Length::new::<meter>(0.055),
Length::new::<meter>(0.03),
VolumeRate::new::<gallon_per_second>(0.08),
VolumeRate::new::<gallon_per_second>(0.09),
20000.,
5000.,
2000.,
28000.,
9000.,
Duration::from_millis(100),
[0.5, 1., 1., 1., 1., 0.5],
[0., 0.2, 0.21, 0.79, 0.8, 1.],
[1., 1., 1., 1., 0.5, 0.5],
[0.5, 0.5, 1., 1., 1., 1.],
[0., 0.15, 0.16, 0.84, 0.85, 1.],
DEFAULT_P_GAIN,
DEFAULT_I_GAIN,
DEFAULT_FORCE_GAIN,
Expand Down Expand Up @@ -1487,14 +1488,15 @@ mod tests {
1,
Length::new::<meter>(0.145),
Length::new::<meter>(0.105),
VolumeRate::new::<gallon_per_second>(0.15),
VolumeRate::new::<gallon_per_second>(0.17),
800000.,
15000.,
50000.,
1200000.,
Duration::from_millis(100),
[1., 1., 1., 1., 1., 1.],
[0., 0.2, 0.21, 0.79, 0.8, 1.],
[1., 1., 1., 1., 0.5, 0.5],
[0.5, 0.5, 1., 1., 1., 1.],
[0., 0.1, 0.11, 0.89, 0.9, 1.],
DEFAULT_P_GAIN,
DEFAULT_I_GAIN,
DEFAULT_FORCE_GAIN,
Expand Down
Loading

0 comments on commit b21b690

Please sign in to comment.