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

feat: add console/floor light switch functionality #3930

Merged
merged 17 commits into from
Mar 15, 2021
Merged
Show file tree
Hide file tree
Changes from 8 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
1 change: 1 addition & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
1. [CDU] Reworked Flight Phase system - @MisterChocker (Leon)
1. [MISC] Fixed button labels not showing when unlit - @ImenesFBW (Imenes)
1. [EFB] Added functionality to ground services page - @Saschl (saschl#9432)
1. [MISC] Added functionality to the console/floor light switch - @ImenesFBW (Imenes)

## 0.5.2
1. [CDU] Changing CRZ/DES speed to acknowledge any speed restriction - @Watsi01 (RogePete)
Expand Down
2 changes: 2 additions & 0 deletions A32NX/SimObjects/AirPlanes/Asobo_A320_NEO/approach.FLT
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ CabinLights=True
GlareshieldLights=False
PedestalLights=False
Potentiometer.7=0
Potentiometer.8=0
Potentiometer.9=0
Potentiometer.86=0.5
Potentiometer.88=0.5
Potentiometer.89=0.5
Expand Down
2 changes: 2 additions & 0 deletions A32NX/SimObjects/AirPlanes/Asobo_A320_NEO/apron.FLT
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ CabinLights=False
GlareshieldLights=False
PedestalLights=False
Potentiometer.7=0
Potentiometer.8=0
Potentiometer.9=0
Potentiometer.84=0
Potentiometer.85=0
Potentiometer.86=0
Expand Down
2 changes: 2 additions & 0 deletions A32NX/SimObjects/AirPlanes/Asobo_A320_NEO/cruise.FLT
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ CabinLights=True
GlareshieldLights=False
PedestalLights=False
Potentiometer.7=0
Potentiometer.8=0
Potentiometer.9=0
Potentiometer.84=0.5
Potentiometer.85=0.5
Potentiometer.86=0.5
Expand Down
2 changes: 2 additions & 0 deletions A32NX/SimObjects/AirPlanes/Asobo_A320_NEO/final.FLT
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ CabinLights=False
GlareshieldLights=False
PedestalLights=False
Potentiometer.7=0
Potentiometer.8=0
Potentiometer.9=0
Potentiometer.84=0.5
Potentiometer.85=0.5
Potentiometer.87=0.5
Expand Down
2 changes: 2 additions & 0 deletions A32NX/SimObjects/AirPlanes/Asobo_A320_NEO/hangar.flt
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ CabinLights=False
GlareshieldLights=False
PedestalLights=False
Potentiometer.7=0
Potentiometer.8=0
Potentiometer.9=0
Potentiometer.84=0
Potentiometer.85=0
Potentiometer.86=0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,19 @@
<POTENTIOMETER>87</POTENTIOMETER>
</UseTemplate>
<CameraTitle>PA</CameraTitle>

<!-- Console/Floor Lights -->
<UseTemplate Name="FBW_LIGHTING_Switch_Console_Template">
<POTENTIOMETER>8</POTENTIOMETER>
<NODE_ID>SWITCH_EFIS_CS_CONSOLE</NODE_ID>
<ANIM_NAME>SWITCH_EFIS_CS_CONSOLE</ANIM_NAME>
</UseTemplate>

<UseTemplate Name="FBW_LIGHTING_Switch_Console_Template">
<POTENTIOMETER>9</POTENTIOMETER>
<NODE_ID>SWITCH_EFIS_FO_CONSOLE</NODE_ID>
<ANIM_NAME>SWITCH_EFIS_FO_CONSOLE</ANIM_NAME>
</UseTemplate>
</Component>

<!-- G1000 ###################################### -->
Expand Down Expand Up @@ -3871,9 +3884,6 @@
<UseTemplate Name="ASOBO_GT_Interaction_Tooltip">
<NODE_ID>PUSH_EFIS_FO_PFD</NODE_ID>
</UseTemplate>
<UseTemplate Name="ASOBO_GT_Interaction_Tooltip">
<NODE_ID>SWITCH_EFIS_FO_CONSOLE</NODE_ID>
</UseTemplate>
<UseTemplate Name="ASOBO_GT_Interaction_Tooltip">
<NODE_ID>KNOB_EFIS_FO_LOUDSPKR</NODE_ID>
</UseTemplate>
Expand Down
2 changes: 2 additions & 0 deletions A32NX/SimObjects/AirPlanes/Asobo_A320_NEO/runway.FLT
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ CabinLights=False
GlareshieldLights=False
PedestalLights=False
Potentiometer.7=0
Potentiometer.8=0
Potentiometer.9=0
Potentiometer.84=0.5
Potentiometer.85=0.5
Potentiometer.86=0.5
Expand Down
6 changes: 4 additions & 2 deletions A32NX/SimObjects/AirPlanes/Asobo_A320_NEO/systems.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ lightdef.31 = Type:1#Index:2#LocalPosition:-3.4,0,-3.1#LocalRotation:-15,0,90#Ef
lightdef.32 = Type:1#Index:2#LocalPosition:-3.4,0,-3.1#LocalRotation:-15,0,-90#EffectFile:LIGHT_A32NX_BeaconBelly_Right#Node:#PotentiometerIndex:1#EmMesh:LIGHT_ASOBO_BeaconBelly
lightdef.33 = Type:12#Index:1#LocalPosition:38.5,-1.825,5.980#LocalRotation:104,0,90#EffectFile:LIGHT_A32NX_ScreenOrange#Node:#PotentiometerIndex:10
lightdef.34 = Type:12#Index:2#LocalPosition:38.5,1.760,5.980#LocalRotation:104,0,90#EffectFile:LIGHT_A32NX_ScreenOrange#Node:#PotentiometerIndex:11
lightdef.35 = Type:13#Index:2#LocalPosition:35.0,0.960,9.000#LocalRotation:110,90,0#EffectFile:LIGHT_A32NX_CockpitSpotNarrow#PotentiometerIndex:97
lightdef.36 = Type:13#Index:2#LocalPosition:34.488,-1.160,9.040#LocalRotation:110,90,0#EffectFile:LIGHT_A32NX_CockpitSpotNarrow#PotentiometerIndex:96
lightdef.35 = Type:4#Index:2#LocalPosition:35.0,0.960,9.000#LocalRotation:110,90,0#EffectFile:LIGHT_A32NX_CockpitSpotNarrow#PotentiometerIndex:97
lightdef.36 = Type:4#Index:2#LocalPosition:34.488,-1.160,9.040#LocalRotation:110,90,0#EffectFile:LIGHT_A32NX_CockpitSpotNarrow#PotentiometerIndex:96
lightdef.37 = Type:6#Index:2#LocalPosition:0,0,0#LocalRotation:0,0,-40#EffectFile:LIGHT_A32NX_LeftRunway(V)#Node:LIGHT_ASOBO_RunwayTurnOffLeft#PotentiometerIndex:1#EmMesh:LIGHT_ASOBO_RunwayTurnOffLeft
lightdef.38 = Type:6#Index:3#LocalPosition:0,0,0#LocalRotation:0,0,40#EffectFile:LIGHT_A32NX_RightRunway(V)#Node:LIGHT_ASOBO_RunwayTurnOffRight#PotentiometerIndex:1#EmMesh:LIGHT_ASOBO_RunwayTurnOffRight
lightdef.39 = Type:5#Index:2#LocalPosition:-10,-7.6,-0.7#LocalRotation:0,0,5#EffectFile:LIGHT_A32NX_LandingLarge(V)#Node:#PotentiometerIndex:1#EmMesh:LIGHT_ASOBO_LandingLeft
Expand All @@ -56,6 +56,8 @@ lightdef.49 = Type:2#Index:3#LocalPosition:0,0,6.9#LocalRotation:0,0,-50#EffectF
lightdef.50 = Type:9#Index:1#LocalPosition:-70.6,-12.3,8.9#LocalRotation:-60,0,-70#EffectFile:LIGHT_A32NX_LogoLight(V)#PotentiometerIndex:1#EmMesh:LIGHT_ASOBO_LogoLeft
lightdef.51 = Type:9#Index:2#LocalPosition:-70.6,12.3,8.9#LocalRotation:-60,0,70#EffectFile:LIGHT_A32NX_LogoLight(V)#PotentiometerIndex:1#EmMesh:LIGHT_ASOBO_LogoRight
lightdef.52 = Type:13#Index:0#LocalPosition:36.5,0,6#LocalRotation:0,0,0#EffectFile:LIGHT_A32NX_CockpitMinimalAmbiantLarge#PotentiometerIndex:1
lightdef.53 = Type:4#Index:0#LocalPosition:37,-4,5.1#LocalRotation:90,0,0#EffectFile:LIGHT_A32NX_Console#PotentiometerIndex:8
lightdef.54 = Type:4#Index:0#LocalPosition:37,4,5.1#LocalRotation:90,0,0#EffectFile:LIGHT_A32NX_Console#PotentiometerIndex:9

[BRAKES]
parking_brake = 1 ; BrakeTypes enum
Expand Down
2 changes: 2 additions & 0 deletions A32NX/SimObjects/AirPlanes/Asobo_A320_NEO/taxi.flt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ TailhookState=0
FoldingWingsHandle=False
FoldingWingsState=0, 0
Potentiometer.7=0.5
Potentiometer.8=0
Potentiometer.9=0
Potentiometer.84=0.5
Potentiometer.85=0.5
Potentiometer.87=0.5
Expand Down
77 changes: 77 additions & 0 deletions A32NX/effects/LIGHT_A32NX_Console.fx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
[Library Effect]
Lifetime=5
Version=2.00
Radius=-1

[Properties]
Spot=1
Tower=1
Map=1

[Emitter.0]
Lifetime=1.00, 1.00
Delay=0.00, 0.00
Bounce=0.00
Light=1
No Interpolate=1
Rate=1.00, 1.00
X Emitter Velocity=0.00, 0.00
Y Emitter Velocity=0.00, 0.00
Z Emitter Velocity=0.00, 0.00
Drag=0.00, 0.00
X Particle Velocity=0.00, 0.00
Y Particle Velocity=0.00, 0.00
Z Particle Velocity=0.00, 0.00
X Rotation=0.00, 0.00
Y Rotation=0.00, 0.00
Z Rotation=0.00, 0.00
X Offset=0.0, 0.0
Y Offset=0.0, 0.0
Z Offset=0.0, 0.0

[Particle.0]
Lifetime=0.00, 0.00
Type=19
X Scale=0.75, 0.75
Y Scale=0.75, 0.75
Z Scale=0.00, 0.00
X Scale Rate=0.00, 0.00
Y Scale Rate=0.00, 0.00
Z Scale Rate=0.00, 0.00
Drag=0.00, 0.00
Color Rate=0.00, 0.00
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
Fade In=0.50, 0.50
Fade Out=0.50, 0.50
Rotation=0.00, 0.00
Static=1
Face=1, 1, 1

[ParticleAttributes.0]
Blend Mode=2
Bounce=0.00
Color Start=255, 179, 117, 10
Color End=248, 156, 106, 10
Jitter Distance=0.00
Jitter Time=0.00
uv1=0.00, 0.00
uv2=1.0, 1.0
X Scale Goal=0.00
Y Scale Goal=0.00
Z Scale Goal=0.00
Extrude Length=0.00
Extrude Pitch Max=0.00
Extrude Heading Max=0.00

[LightAttributes.0]
Type=spot
Size=0.02
Range=2.0
Intensity=0.8
Softness=0.1
SpotInner=45
SpotOuter=81
Volumetric=1
ScatDir=1
21 changes: 21 additions & 0 deletions src/behavior/src/A32NX_Interior_Misc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,27 @@
</UseTemplate>
</Template>

<!--
Template for console light switches
-->
<Template Name="FBW_LIGHTING_Switch_Console_Template">
<UseTemplate Name="ASOBO_LIGHTING_Switch_Light_Template">
<DIMMER/>
<ANIMTIP_0_ON_PERCENT>0</ANIMTIP_0_ON_PERCENT>
<ANIMTIP_1_ON_PERCENT>0.5</ANIMTIP_1_ON_PERCENT>
<ANIMTIP_2_ON_PERCENT>1</ANIMTIP_2_ON_PERCENT>
<ANIMTIP_0>Set CONSOLE/FLOOR OFF</ANIMTIP_0>
<ANIMTIP_1>Set CONSOLE/FLOOR DIM</ANIMTIP_1>
<ANIMTIP_2>Set CONSOLE/FLOOR BRT</ANIMTIP_2>
<ANIMCURSOR_MIN>0</ANIMCURSOR_MIN>
<ANIMCURSOR_MAX>1</ANIMCURSOR_MAX>
<INVERT_ANIM>True</INVERT_ANIM>
<WWISE_EVENT>lswitch</WWISE_EVENT>
<NORMALIZED_TIME_1>0.1</NORMALIZED_TIME_1>
<NORMALIZED_TIME_2>0.5</NORMALIZED_TIME_2>
</UseTemplate>
</Template>

<!--
Template for handling landing gear indications
-->
Expand Down