Caravan: lighting and external hardware
-
Hello, I would like to map the light rotary knobs to external hardware. I found that the Pilot's Instrument Lighting is controlled by the LVar
(L:LIGHTING_PANEL_2, number)
. But writing to this variable with Axis And Ohs or Mobiflight does not change the brightness. But when I'm changing the knob using a mouse in-sim, the knob continues at the last value.Example: Variable is 0. I set it to 50 using AAO, nothing happens. I'm using the mouse and the brightness continues to change from level 50.
My questions:
- What do I have to do to change the brightness values using external hardware?
- Which additional events has to be sent?
- Which additional variables have to be set?
-
The knobs in the aircraft have two functions. They turn the circuit for the light on and off, and they adjust the potentiometer setting of the light, which is what in turn controls the physically rendered 3D light.
This system is kind of a pain with MSFS... to be safe, turn the circuit switch on when the light percent value is above 0, and write to the L:Var, AND use the key events to write to the potentiometer. That should look something like this, but haven't tested it: 1 50 (>K:2:LIGHT_POTENTIOMETER_SET)
The first value is the potentiometer number, and the second is the value. I believe these two numbers are mistakenly flipped in the SDK. If that doesn't work, try using, 50 (>K:LIGHT_POTENTIOMETER_X_SET), where X is the number of the potentiometer. Lastly, you can try, 50 (>K:LIGHT_POTENTIOMETER_INC).
Feel free to send us a ticket https://support.justflight.com/support/tickets/new
-
@simon Thank you, Simon,
your hints were great. I looked into the ASOBO templates and found these as working:
<percent>·(>L:LIGHTING_<type>_<sim_var>,·number) <percent>·<potentiometer>·(>K:2:<type>_LIGHTS_SET) 1·<percent>·(>K:LIGHT_POTENTIOMETER_<potentiometer>_SET)
<percent>
is the value between 0 and 100 (or more for more brightness) of the light.This table for the different types, sim_vars and potentiometers:
Pilot Instrument - PANEL - 2 - 2 Pilot Flood - GLARESHIELD - 1 - 5 Copilot Instr. - PANEL - 3 - 3 Copilot Flood - GLARESHIELD - 2 - 6 Pedestal - GLARESHIELD - 3 - 7 Circuit Br. - GLARESHIELD - 4 - 8 Engine Instr. - PANEL - 1 - 4 Radio Backl. - PANEL - 4 - 9
Sample for Pilot Instruments to set brightness to 50%
50·(>L:LIGHTING_PANEL_2,·number) 50·2·(>K:2:PANEL_LIGHTS_SET) 1·50·(>K:LIGHT_POTENTIOMETER_2_SET)
-
@ape42 Thanks, this was useful to me.
For anyone looking to know which circuits to switch on for each of the lights, the event to use is "CIRCUIT SWITCH ON:" and below I've listed the Circuit numbers as well as screenshots of my SPAD potentiometer bindings for 3 rotary switches (increase side only, the decrease is the reverse to decrement but turning the circuits off is optional).
INSTRUMENT LIGHTS HARDWARE KNOB:
engine inst = 39
pilot inst = 40
copilot inst = 41
radio inst = 50
CONSOLE LIGHTS HARDWARE KNOB:
circuit breaker 90
pedestal 38
FLOOD LIGHTS HARDWARE KNOB:
pilot flood 36
copilot flood 37
One bit of strangeness that happens is the first time I turn the lights up with my hardware they go to full power. EDIT: Solved this by adding an extra line with higher priority to first sync the Potentiometer value to the LVAR (Glareshield/Panel) value. It seems MSFS Potentiometers might start fully on, but the LVARs will start fully off.
Also 2 other things I'd like to map but can't find how are the No Smoking and Seatbelt light switches. Not sure if these are actually functional though? But they do click into position and move, I can't see any lights in the cabin. However I do have 2 spare switches in that position so I wouldn't mind mapping them. The default Asobo seatbelt/smoking airliner events don't work.