Skip to content

Commit

Permalink
fix(lg): nose gear park brake light (flybywiresim#7787)
Browse files Browse the repository at this point in the history
  • Loading branch information
tracernz authored Jun 16, 2024
1 parent 99b7564 commit 0cc0c71
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 33 deletions.
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

0 comments on commit 0cc0c71

Please sign in to comment.