Spitfire Panel Lights

Post any technical issues here. This forum gets priority from our staff.
new reply
User avatar
ACE-9
Airman First Class
Posts: 57
Joined: 05 Mar 2016

Spitfire Panel Lights

Post ACE-9 »

Hi.
I am attempting to programme Linda to individually switch the Panel Instrument Lights on individually and seem to have hit a brick wall, I am a relative newbie to lua programming etc.

The Spitfire Lvar List it says

Flood lights (A:LIGHT PANEL,bool)

(>K:PANEL_LIGHTS_TOGGLE)

I cannot figure out what is individually different controlling the left and right instrument panel light switches even using Linda tracer and scan too.

I figure the Event_ID Panel_Lights_toggle (65750) is what is being referred to above, what is (A:LIGHT PANEL, Bool) :?: pardon my lack of understanding. :roll:

Using the Linda Tracer and switching the cockpit switches with a mouse I receive the Lvar sequence below, but from within Linda, none of the Lvar's actually toggles the switch to individually turn on the Left Lamp / Right Lamp.

Can some please point me in the right direction to programme a physical toggle switch Lua function ()

Code: Select all

Left On
[L] LVar: LightPanelSwitchSave = 1
[L] LVar: LightPanelPast = 1
[L] LVar: Lamp1State = 1
[L] LVar: LightsElectricalDraw = 4.3
[L] LVar: Paused = 1
[L] LVar: SoundStats_CurrentCount = 1
[L] LVar: Paused = 0
[L] LVar: SoundStats_CurrentCount = 0

Left Off
[L] LVar: LightPanelPast = 0
[L] LVar: CockpitSwitchSnd = 9
[L] LVar: Lamp1State = 0
[L] LVar: LightsElectricalDraw = 1.8
[L] LVar: LightPanelSwitchSave = 0
[L] LVar: SoundStats_CurrentCount = 1
[L] LVar: CockpitSwitchSnd = 0
[L] LVar: SoundStats_CurrentCount = 0

Right On
[L] LVar: LightPanelPast = 1
[L] LVar: CockpitSwitchSnd = 10
[L] LVar: Lamp2State = 1
[L] LVar: LightsElectricalDraw = 4.3
[L] LVar: LightPanelSwitchSave = 1
[L] LVar: SoundStats_CurrentCount = 1
[L] LVar: CockpitSwitchSnd = 0
[L] LVar: SoundStats_CurrentCount = 0

Right Off
[L] LVar: LightPanelSwitchSave = 0
[L] LVar: SoundStats_CurrentCount = 1
[L] LVar: LightPanelPast = 0
[L] LVar: Lamp2State = 0
[L] LVar: LightsElectricalDraw = 1.8
[L] LVar: SoundStats_CurrentCount = 0
ATB
Roger

Image

User avatar
ACE-9
Airman First Class
Posts: 57
Joined: 05 Mar 2016

Re: Spitfire Panel Lights

Post ACE-9 »

There are Lvar missing in action or have not been included in the Spitfire despite being on the Spitfire Lvar list.

In my quest for a mouse free cockpit combined with the height of realism in the A2A Spitfire, I downloaded the Lvar list (as mentioned above) and have since discovered that the very first two Lvars listed in the download file, cannot be found in the sim :o :shock: .

A2A Spitfire I/II
variables list and notes for simpit builders
Dash – gauges:

1) - Left landing flap (L:LeftFlapNeedle,percent) 0 – 100 Cannot be found
2) - Right landing flap (L:RightFlapNeedle,percent) 0 – 100 Cannot be found
3) - Voltimeter (L:Voltmeter,volts) 0 – 20 OK

A bit furthur on I come across another: - Oil pressure (L:Eng1_OilPressureFront,psi) 0 – 150 Which also cannot be found I stopped at this point realising that I was not going to find an Lvar Flood lights (A:LIGHT PANEL,bool) to be able to operate both left and right panel flood lights independantly of each other.

Notwithstanding, the Lua functions below in green work without issue, switching the landing lights on and off individually, | Right ON / Left OFF |=| Right OFF / Left ON.

However, there is no way to do the same for the Panel Lights - I think because there is no Lvar in the Spitfire with a similar function to "L:LandingLightSwitch" i.e. there is no Lvar for example "L:PanelFloodLightSwitch" that will allow the panel flood lights to be operated individually.

In my first post above I have shown all of the Lvars that list (operate) when the Panel flood light knob is turned in the cockpit, none of them work, however L:Lamp1State & L:Lamp2State do actually rotate the cockpit knobs but fail to switch on the panel flood lights. see code in Blue Below.

function SPIT_Light_Land_left ()
LVarSet = "L:LandingLightSwitch"
ipc.writeLvar(LVarSet, 0)
end

function SPIT_Light_Land_off ()
LVarSet = "L:LandingLightSwitch"
ipc.writeLvar(LVarSet, 1)
end

function SPIT_Light_Land_left_toggle ()
LVarSet = "L:LandingLightSwitch"
if ipc.readLvar(LVarSet) == 1 then
SPIT_Light_Land_left()
else
SPIT_Light_Land_off()
end
end




function SPIT_Light_Panel_left ()
LVarSet = "L:Lamp1State" -- another function for Lamp2State
ipc.writeLvar(LVarSet, 2)
end

function SPIT_Light_Panel_off ()
LVarSet = "L:Lamp1State" -- another function for Lamp2State
ipc.writeLvar(LVarSet, 0)
end

function SPIT_Light_Panel_right ()
LVarSet = "L:Lamp2State" -- another function for Lamp2State
ipc.writeLvar(LVarSet, 2)
end


Please can somebody help with this.
Thanks in hope..
ATB
Roger

Image

new reply

Return to “Spitfire MkI/II Tech Support”

Who is online

Users browsing this forum: No registered users and 4 guests