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

fix(lg): nose gear park brake light #7787

Merged
merged 2 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,16 @@
<ANIM_CODE>(L:A32NX_NOSE_WHEEL_POSITION)</ANIM_CODE>
<ANIM_LENGTH>1</ANIM_LENGTH>
</UseTemplate>
<!-- PARK BRK EXT LT -->
<Component ID="Ext_Park_Brake_Light">
<UseTemplate Name="FBW_Potentiometer_Toggle">
<!-- FIXME should also get a discrete from the hydraulic valve limit switch -->
<TOGGLE_CONDITION>(L:A32NX_PARK_BRAKE_LEVER_POS, bool) 1 ==</TOGGLE_CONDITION>
<!-- C/B 70GG (121VU M36) fed from 601PP -->
<TOGGLE_REQUISITE>(L:A32NX_ELEC_DC_GND_FLT_SVC_BUS_IS_POWERED, Bool)</TOGGLE_REQUISITE>
<POTENTIOMETER>99</POTENTIOMETER>
</UseTemplate>
</Component>
</Component>
<Component ID="ENGINE">
<UseTemplate Name="A32NX_ENGINE_Turbine_Template">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2142,13 +2142,6 @@
</UseTemplate>
</Component>

<!-- PARK BRK EXT LT -->
<UseTemplate Name="FBW_Potentiometer_Toggle">
<TOGGLE_CONDITION>(L:A32NX_GEAR_CENTER_POSITION, Percent over 100) 1 == (L:A32NX_PARK_BRAKE_LEVER_POS, bool) 1 == and</TOGGLE_CONDITION>
<TOGGLE_REQUISITE>(L:A32NX_ELEC_DC_GND_FLT_SVC_BUS_IS_POWERED, Bool)</TOGGLE_REQUISITE>
<POTENTIOMETER>99</POTENTIOMETER>
</UseTemplate>

<!-- CPT DOME LT -->
<UseTemplate Name="ASOBO_LIGHTING_Cabin_Emissive_Template">
<NODE_ID>LIGHTS_Overhead_L</NODE_ID>
Expand Down
25 changes: 25 additions & 0 deletions fbw-a32nx/src/behavior/src/A32NX_Exterior.xml
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,29 @@
</Component>
</Template>

<!--
Template for toggling of light potentiometers that not are bound to a specific lightdef.Type.
Needs a condition, requisite and a potentiometer to toggle.

Main Parameters:
- SYNC_FREQUENCY Default: 1 Speed of update loop, N per second.
- TOGGLE_CONDITION <Boolean> The condition to trigger a toggle.
- TOGGLE_REQUISITE <Boolean> The required powered BUS for potentiometer.
- POTENTIOMETER <Number> The potentiometer index # to toggle.
-->
<Template Name="FBW_Potentiometer_Toggle">
<DefaultTemplateParameters>
<SYNC_FREQUENCY>1</SYNC_FREQUENCY>
<TOGGLE_REQUISITE></TOGGLE_REQUISITE>
<TOGGLE_CONDITION></TOGGLE_CONDITION>
</DefaultTemplateParameters>

<UseTemplate Name="ASOBO_GT_Update">
<FREQUENCY>#SYNC_FREQUENCY#</FREQUENCY>
<UPDATE_CODE>
#TOGGLE_REQUISITE# #TOGGLE_CONDITION# and 100 * #POTENTIOMETER# (&gt;K:2:LIGHT_POTENTIOMETER_SET)
</UPDATE_CODE>
</UseTemplate>
</Template>

</ModelBehaviors>
26 changes: 0 additions & 26 deletions fbw-a32nx/src/behavior/src/A32NX_Interior_Generics.xml
Original file line number Diff line number Diff line change
Expand Up @@ -751,32 +751,6 @@
</Template>


<!--
Template for toggling of light potentiometers that not are bound to a specific lightdef.Type.
Needs a condition, requisite and a potentiometer to toggle.

Main Parameters:
- SYNC_FREQUENCY Default: 1 Speed of update loop, N per second.
- TOGGLE_CONDITION <Boolean> The condition to trigger a toggle.
- TOGGLE_REQUISITE <Boolean> The required powered BUS for potentiometer.
- POTENTIOMETER <Number> The potentiometer index # to toggle.
-->
<Template Name="FBW_Potentiometer_Toggle">
<DefaultTemplateParameters>
<SYNC_FREQUENCY>1</SYNC_FREQUENCY>
<TOGGLE_REQUISITE></TOGGLE_REQUISITE>
<TOGGLE_CONDITION></TOGGLE_CONDITION>
</DefaultTemplateParameters>

<UseTemplate Name="ASOBO_GT_Update">
<FREQUENCY>#SYNC_FREQUENCY#</FREQUENCY>
<UPDATE_CODE>
#TOGGLE_REQUISITE# #TOGGLE_CONDITION# and 100 * #POTENTIOMETER# (&gt;K:2:LIGHT_POTENTIOMETER_SET)
</UPDATE_CODE>
</UseTemplate>
</Template>


<!--
Wrapper utility template for animation interaction speeds allowing
for control of all button, switches and korry's from one place.
Expand Down