Jump to content

Lvar/ variable list of twin otter for AAO - external hardware


 Share

Recommended Posts

I found how to see the list in SPAD.neXt. You just need to show the  data list (go through the motions of setting an action to change a data value) and filter the list by 'DHC6'. I see 100+ Lvars, as in the attched image. (Sorry, I couldn't see how to capture it as text.) I said it was 297 variables before, but I think that's too many. SPAD's search functions don't always seem to do what I expect 😐

 

 

dhc6-lvars.png

Link to comment
Share on other sites

  • Aerosoft

For the ones using AAO, don't forget to read LVARS from the sim first.
This can be done from the scripting menu.

 

Please also bear in mind that these are internal variables used by the addon.
It means that some may be overwritten AFTER you assigned them a value therefore

appearing as non working.

 

Thank you.

Link to comment
Share on other sites

So Aerosoft will you make the switches interactable by hardware buttons and include the missing ones? It should be fairly easily doable to expose the BVars as LVars to the outside user with control over the model, no? That would be way easier than any BVar hacks. And it was kind of said this would be done in the pre release thread.

Link to comment
Share on other sites

  • Root Admin
10 minutes ago, Deimos said:

So Aerosoft will you make the switches interactable by hardware buttons and include the missing ones? It should be fairly easily doable to expose the BVars as LVars to the outside user with control over the model, no? That would be way easier than any BVar hacks. And it was kind of said this would be done in the pre release thread.

 

Well, that is not nearly as easy as you make it seem.

 

The moment you replace a sim function with one you replace by one you program to make it do something better you are committed.  Say you program your own pitot heater system. That would most likely result in something better then default (otherwise why do it?) but when you link that to the default simvar to make it usable by hardware, it means you have to fight the sim to counter what the default sim reaction to that command would be. 

 

Believe me, that is incredibly hard. That is why the Twin Otter was written as much as possible to use default commands (unlike the CRJ for example). 

Link to comment
Share on other sites

vor 20 Minuten, Mathijs Kok sagte:

Believe me, that is incredibly hard.

 

Thank you for your reply.

 

Yeah I understand. But other devs just put out their own LVars for those that do not respond to default bindings. As you do with some DHC6_ ones. When these also move the switches then assignments with the proper tools (Lorby's, spad.next) would be way easier and this would go way further then what is possible now for integrating into a mouseless environment or homepit. You can then check the state of the switches in the cockpit, hear the associated sounds and assign it to ample hardware (be it stream decks, midi boards, alphas, bravos, joysticks and button boards of many makings). At the moment not many switches actually move when pressed, even with the default bindings (like the generators) or that are accessed by LVar change. Many more are not easily accessible (icing and pumps among others) being not default and having no Lvar.

Link to comment
Share on other sites

Thanks to the reply from @UnsealedKarma, I managed to get the strobes, pitot heat and window heater switches also working for those using mobiflight.

 

You have to put this block of code in the DHC6_Interior.xml to create access to the Bvars through self-defined Lvars (I did it just before the system simulations header, row 12). Be aware, after each update you need to redo this, since it will be overwritten if the DHC6_Interior.xml file is renewed.

<!-- BVar link ################################# -->
		<Component ID="LVAR_TO_BVAR">
			<UseTemplate Name="ASOBO_GT_Update">
				<UPDATE_CODE>
					(L:EC_TWOTTER_PITOT_HEAT_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:DEICE_IE_PITOT_HEAT_Set) 0 (&gt;L:EC_TWOTTER_PITOT_HEAT_SET) }
					(L:EC_TWOTTER_PITOT_HEAT_TOGGLE, Number) s0 0 &gt; if{ (B:DEICE_IE_PITOT_HEAT, Bool) if{ 0 (&gt;B:DEICE_IE_PITOT_HEAT_Set) 0 (&gt;L:EC_TWOTTER_PITOT_HEAT_TOGGLE) } els{ 1 (&gt;B:DEICE_IE_PITOT_HEAT_Set) 0 (&gt;L:EC_TWOTTER_PITOT_HEAT_TOGGLE) } }
					(L:EC_TWOTTER_STROBES_TOGGLE, Number) s0 0 &gt; if{ (B:LIGHTING_IE_STROBE_LIGHTS, number) 0 == if{ 1 (&gt;B:LIGHTING_IE_STROBE_LIGHTS_Set) 0 (&gt;L:EC_TWOTTER_STROBES_TOGGLE) } els{ 0 (&gt;B:LIGHTING_IE_STROBE_LIGHTS_Set) 0 (&gt;L:EC_TWOTTER_STROBES_TOGGLE) } }
					(L:EC_TWOTTER_WINDOW_HEAT_TOGGLE, Number) s0 0 &gt; if{ (B:INSTRUMENT_IE_WINDOW_HEAT, enum) 0 == if{ 1 (&gt;B:INSTRUMENT_IE_WINDOW_HEAT_Set) 0 (&gt;L:EC_TWOTTER_WINDOW_HEAT_TOGGLE) } els{ 0 (&gt;B:INSTRUMENT_IE_WINDOW_HEAT_Set) 0 (&gt;L:EC_TWOTTER_WINDOW_HEAT_TOGGLE) } }
					(L:EC_TWOTTER_GENERATORS_TOGGLE, Number) s0 0 &gt; if{ (B:ELECTRICAL_IE_GENERATOR_RIGHT, number) 0 == if{ 1 (&gt;B:ELECTRICAL_IE_GENERATOR_RIGHT_Set) 0 (&gt;L:EC_TWOTTER_GENERATORS_TOGGLE) } els{ 0 (&gt;B:ELECTRICAL_IE_GENERATOR_RIGHT_Set) 0 (&gt;L:EC_TWOTTER_GENERATORS_TOGGLE) } (B:ELECTRICAL_IE_GENERATOR_LEFT, number) 0 == if{ 1 (&gt;B:ELECTRICAL_IE_GENERATOR_LEFT_Set) } els{ 0 (&gt;B:ELECTRICAL_IE_GENERATOR_LEFT_Set) } }
					(L:EC_TWOTTER_DC_MASTER_TOGGLE, Number) s0 0 &gt; if{ (B:ELECTRICAL_IE_DC_MASTER, enum) 0 == if{ 1 (&gt;B:ELECTRICAL_IE_DC_MASTER_Toggle) 0 (&gt;L:EC_TWOTTER_DC_MASTER_TOGGLE) } els{ 0 (&gt;B:ELECTRICAL_IE_DC_MASTER_Toggle) 0 (&gt;L:EC_TWOTTER_DC_MASTER_TOGGLE) } }	
				</UPDATE_CODE>
				<FREQUENCY>1</FREQUENCY>
			</UseTemplate>
		</Component>
		


With Mobiflight you can then toggle the events as follows (I use the events.txt file to define the events):
1 (>L:EC_TWOTTER_PITOT_HEAT_TOGGLE)

 

I will be working on more switches over the next couple of days. 

  • Like 2
  • Thanks 1
  • Upvote 1
Link to comment
Share on other sites

  • Aerosoft

Using Bvars is indeed a good system but as TheFly said, dont forget to paste your code in  DHC6_Interior.xml after each update.
Do not overwrite the full file but add the custom block each time instead.

Link to comment
Share on other sites

Hello, i want to know, when i add some code in the DHC6_interior.xml :

how do you choose the initial state oh the button (like value 3 or 2 or 1)

because in my case there are on a bad position 0

 

exemple with the fuel boost

 

Quote

(L:EC_TWOTTER_FUELBOOST_FWD, number) 1 == if{ 1 (&gt;B:FUEL_IE_FUELBOOST_FWD_Set) } els{ (L:EC_TWOTTER_FUELBOOST_FWD, number) 2 == if{ 2 (&gt;B:FUEL_IE_FUELBOOST_FWD_Set) } els{ 0 (&gt;B:FUEL_IE_FUELBOOST_FWD_Set) } }

 

thanks

Julien.

 

 

Link to comment
Share on other sites

Hello,

 

i have updated the code :

Quote

<!-- BVar link ################################# -->
        <Component ID="LVAR_TO_BVAR">
            <UseTemplate Name="ASOBO_GT_Update">
                <UPDATE_CODE>
                    (L:EC_TWOTTER_PITOT_HEAT_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:DEICE_IE_PITOT_HEAT_Set) 0 (&gt;L:EC_TWOTTER_PITOT_HEAT_SET) }
                    (L:EC_TWOTTER_PITOT_HEAT_TOGGLE, Number) s0 0 &gt; if{ (B:DEICE_IE_PITOT_HEAT, Bool) if{ 0 (&gt;B:DEICE_IE_PITOT_HEAT_Set) 0 (&gt;L:EC_TWOTTER_PITOT_HEAT_TOGGLE) } els{ 1 (&gt;B:DEICE_IE_PITOT_HEAT_Set) 0 (&gt;L:EC_TWOTTER_PITOT_HEAT_TOGGLE) } }
                    (L:EC_TWOTTER_STROBES_TOGGLE, Number) s0 0 &gt; if{ (B:LIGHTING_IE_STROBE_LIGHTS, number) 0 == if{ 1 (&gt;B:LIGHTING_IE_STROBE_LIGHTS_Set) 0 (&gt;L:EC_TWOTTER_STROBES_TOGGLE) } els{ 0 (&gt;B:LIGHTING_IE_STROBE_LIGHTS_Set) 0 (&gt;L:EC_TWOTTER_STROBES_TOGGLE) } }
                    (L:EC_TWOTTER_WINDOW_HEAT_TOGGLE, Number) s0 0 &gt; if{ (B:INSTRUMENT_IE_WINDOW_HEAT, enum) 0 == if{ 1 (&gt;B:INSTRUMENT_IE_WINDOW_HEAT_Set) 0 (&gt;L:EC_TWOTTER_WINDOW_HEAT_TOGGLE) } els{ 0 (&gt;B:INSTRUMENT_IE_WINDOW_HEAT_Set) 0 (&gt;L:EC_TWOTTER_WINDOW_HEAT_TOGGLE) } }
                    (L:EC_TWOTTER_GENERATORS_TOGGLE, Number) s0 0 &gt; if{ (B:ELECTRICAL_IE_GENERATOR_RIGHT, number) 0 == if{ 1 (&gt;B:ELECTRICAL_IE_GENERATOR_RIGHT_Set) 0 (&gt;L:EC_TWOTTER_GENERATORS_TOGGLE) } els{ 0 (&gt;B:ELECTRICAL_IE_GENERATOR_RIGHT_Set) 0 (&gt;L:EC_TWOTTER_GENERATORS_TOGGLE) } (B:ELECTRICAL_IE_GENERATOR_LEFT, number) 0 == if{ 1 (&gt;B:ELECTRICAL_IE_GENERATOR_LEFT_Set) } els{ 0 (&gt;B:ELECTRICAL_IE_GENERATOR_LEFT_Set) } }
                    (L:EC_TWOTTER_DC_MASTER_TOGGLE, Number) s0 0 &gt; if{ (B:ELECTRICAL_IE_DC_MASTER, enum) 0 == if{ 1 (&gt;B:ELECTRICAL_IE_DC_MASTER_Toggle) 0 (&gt;L:EC_TWOTTER_DC_MASTER_TOGGLE) } els{ 0 (&gt;B:ELECTRICAL_IE_DC_MASTER_Toggle) 0 (&gt;L:EC_TWOTTER_DC_MASTER_TOGGLE) } }

                    (L:EC_TWOTTER_DC_SOURCE_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ELECTRICAL_IE_DC_SOURCE_Set) 0 (&gt;L:EC_TWOTTER_DC_SOURCE_SET) }

                    (L:EC_TWOTTER_FUELBOOST_FWD, Number) s0 0 &gt; if{ l0 1 - (&gt;B:FUEL_IE_FUELBOOST_FWD_Set) 0 (&gt;L:EC_TWOTTER_FUELBOOST_FWD) }    
    
                    (L:EC_TWOTTER_FUELBOOST_AFT, Number) s0 0 &gt; if{ l0 1 - (&gt;B:FUEL_IE_FUELBOOST_AFT_Set) 0 (&gt;L:EC_TWOTTER_FUELBOOST_AFT) }    

                    (L:EC_TWOTTER_NAV, number) (&gt;B:LIGHTING_NAV_1_Set)

                    (L:EC_TWOTTER_TAXI, number) (&gt;B:LIGHTING_TAXI_1_Set)

                    (L:EC_TWOTTER_LANDING_1, number) (&gt;B:LIGHTING_LANDING_1_Set)

                    (L:EC_TWOTTER_LANDING_2, number) (&gt;B:LIGHTING_LANDING_2_Set)

                    (L:EC_TWOTTER_BEACON, number) (&gt;B:LIGHTING_BEACON_1_Set)

                    (L:EC_TWOTTER_NO_SM, number) (&gt;B:SAFETY_IE_NO_SMOKING_Set)

                    (L:EC_TWOTTER_SEAT_BELTS, number) (&gt;B:SAFETY_IE_SEAT_BELTS_Set)

                    (L:EC_TWOTTER_ENGINE_START, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ENGINE_IE_STARTER_Set) 0 (&gt;L:EC_TWOTTER_ENGINE_START) } 

                </UPDATE_CODE>
                <FREQUENCY>1</FREQUENCY>
            </UseTemplate>
        </Component>

 

  • Thanks 2
Link to comment
Share on other sites

18 hours ago, Padbol Prod said:

Hello, i want to know, when i add some code in the DHC6_interior.xml :

how do you choose the initial state oh the button (like value 3 or 2 or 1)

because in my case there are on a bad position 0

 

exemple with the fuel boost

 

 

thanks

Julien.

 

 

I would recommend to read this page, it explains this in more detail: http://www.badcasserole.com/adding-workarounds-to-msfs2020-for-mobiflight/

Link to comment
Share on other sites

This is the latest status, with most of the LVars now defined. Just let me know if you miss something. Some of the LVARs for various lights (like NAV, TAXI, etc) posted above, I haven't included, as these can be set with standard Simconnect events. Thanks @Padbol Prod for adding the fuel boost and no smoking and seatbelts events.

I renamed the LVARs to a more general name (ASDHC6), as the previous name was referring to my own control application  EasyControls for MSFS (a kind of spad.next light, freely available on Github: https://github.com/TheFlyingDutchman77/EasyControlsMSFS)

 

EDIT: I included some more from @Padbol Prod and made the naming consistent with SET events and TOGGLE events. Set events will mostly take 2 and 1 as commands for on and off respectively. For NO_SM and SEATBELTS set values are 1 and 0.

 

		<Component ID="LVAR_TO_BVAR">
			<UseTemplate Name="ASOBO_GT_Update">
				<UPDATE_CODE>
					(L:ASDHC6_PITOT_HEAT_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:DEICE_IE_PITOT_HEAT_Set) 0 (&gt;L:ASDHC6_PITOT_HEAT_SET) }
					(L:ASDHC6_PITOT_HEAT_TOGGLE, Number) s0 0 &gt; if{ (B:DEICE_IE_PITOT_HEAT, Bool) if{ 0 (&gt;B:DEICE_IE_PITOT_HEAT_Set) 0 (&gt;L:ASDHC6_PITOT_HEAT_TOGGLE) } els{ 1 (&gt;B:DEICE_IE_PITOT_HEAT_Set) 0 (&gt;L:ASDHC6_PITOT_HEAT_TOGGLE) } }
					(L:ASDHC6_STROBES_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:LIGHTING_IE_STROBE_LIGHTS_Set) 0 (&gt;L:ASDHC6_STROBES_SET) }
					(L:ASDHC6_STROBES_TOGGLE, Number) s0 0 &gt; if{ (B:LIGHTING_IE_STROBE_LIGHTS, number) 0 == if{ 1 (&gt;B:LIGHTING_IE_STROBE_LIGHTS_Set) 0 (&gt;L:ASDHC6_STROBES_TOGGLE) } els{ 0 (&gt;B:LIGHTING_IE_STROBE_LIGHTS_Set) 0 (&gt;L:ASDHC6_STROBES_TOGGLE) } }
					(L:ASDHC6_WINDOW_HEAT_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:INSTRUMENT_IE_WINDOW_HEAT_Set) 0 (&gt;L:ASDHC6_WINDOW_HEAT_SET) }
					(L:ASDHC6_WINDOW_HEAT_TOGGLE, Number) s0 0 &gt; if{ (B:INSTRUMENT_IE_WINDOW_HEAT, enum) 0 == if{ 1 (&gt;B:INSTRUMENT_IE_WINDOW_HEAT_Set) 0 (&gt;L:ASDHC6_WINDOW_HEAT_TOGGLE) } els{ 0 (&gt;B:INSTRUMENT_IE_WINDOW_HEAT_Set) 0 (&gt;L:ASDHC6_WINDOW_HEAT_TOGGLE) } }
					(L:ASDHC6_GENERATOR_LEFT_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ELECTRICAL_IE_GENERATOR_LEFT_Set) 0 (&gt;L:ASDHC6_GENERATOR_LEFT_SET) }
					(L:ASDHC6_GENERATOR_RIGHT_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ELECTRICAL_IE_GENERATOR_RIGHT_Set) 0 (&gt;L:ASDHC6_GENERATOR_RIGHT_SET) }
					(L:ASDHC6_GENERATORS_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ELECTRICAL_IE_GENERATOR_RIGHT_Set) l0 1 - (&gt;B:ELECTRICAL_IE_GENERATOR_LEFT_Set) 0 (&gt;L:ASDHC6_GENERATORS_SET) }
					(L:ASDHC6_GENERATORS_TOGGLE, Number) s0 0 &gt; if{ (B:ELECTRICAL_IE_GENERATOR_RIGHT, number) 0 == if{ 1 (&gt;B:ELECTRICAL_IE_GENERATOR_RIGHT_Set) 0 (&gt;L:ASDHC6_GENERATORS_TOGGLE) } els{ 0 (&gt;B:ELECTRICAL_IE_GENERATOR_RIGHT_Set) 0 (&gt;L:ASDHC6_GENERATORS_TOGGLE) } (B:ELECTRICAL_IE_GENERATOR_LEFT, number) 0 == if{ 1 (&gt;B:ELECTRICAL_IE_GENERATOR_LEFT_Set) } els{ 0 (&gt;B:ELECTRICAL_IE_GENERATOR_LEFT_Set) } }
					(L:ASDHC6_DC_MASTER_TOGGLE, Number) s0 0 &gt; if{ (B:ELECTRICAL_IE_DC_MASTER, enum) 0 == if{ 1 (&gt;B:ELECTRICAL_IE_DC_MASTER_Toggle) 0 (&gt;L:ASDHC6_DC_MASTER_TOGGLE) } els{ 0 (&gt;B:ELECTRICAL_IE_DC_MASTER_Toggle) 0 (&gt;L:ASDHC6_DC_MASTER_TOGGLE) } }	
					(L:ASDHC6_ENGINE_START, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ENGINE_IE_STARTER_Set) 0 (&gt;L:ASDHC6_ENGINE_START) } 	
					(L:ASDHC6_DC_SOURCE_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ELECTRICAL_IE_DC_SOURCE_Set) 0 (&gt;L:ASDHC6_DC_SOURCE_SET) }
					(L:ASDHC6_COND_LVR1_SET, Number) s0 0 &gt; if{ l0 1 - 1 == if{ 1 (&gt;B:CONDITION_LEVER_1_HIGH_IDLE) } els{ 1 (&gt;B:CONDITION_LEVER_1_CUT_OFF) } 0 (&gt;L:ASDHC6_COND_LVR1_SET) }
					(L:ASDHC6_COND_LVR2_SET, Number) s0 0 &gt; if{ l0 1 - 1 == if{ 1 (&gt;B:CONDITION_LEVER_2_HIGH_IDLE) } els{ 1 (&gt;B:CONDITION_LEVER_2_CUT_OFF) } 0 (&gt;L:ASDHC6_COND_LVR2_SET) }
					(L:ASDHC6_FUELBOOST_FWD_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:FUEL_IE_FUELBOOST_FWD_Set) 0 (&gt;L:ASDHC6_FUELBOOST_FWD) }    
					(L:ASDHC6_FUELBOOST_FWD_TOGGLE, Number) s0 0 &gt; if{ (B:FUEL_IE_FUELBOOST_FWD, Bool) if{ 0 (&gt;B:FUEL_IE_FUELBOOST_FWD_Set) 0 (&gt;L:ASDHC6_FUELBOOST_FWD_TOGGLE) } els{ 1 (&gt;B:FUEL_IE_FUELBOOST_FWD_Set) 0 (&gt;L:ASDHC6_FUELBOOST_FWD_TOGGLE) } }
					(L:ASDHC6_FUELBOOST_AFT_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:FUEL_IE_FUELBOOST_AFT_Set) 0 (&gt;L:ASDHC6_FUELBOOST_AFT) }
					(L:ASDHC6_FUELBOOST_AFT_TOGGLE, Number) s0 0 &gt; if{ (B:FUEL_IE_FUELBOOST_AFT, Bool) if{ 0 (&gt;B:FUEL_IE_FUELBOOST_AFT_Set) 0 (&gt;L:ASDHC6_FUELBOOST_AFT_TOGGLE) } els{ 1 (&gt;B:FUEL_IE_FUELBOOST_AFT_Set) 0 (&gt;L:ASDHC6_FUELBOOST_AFT_TOGGLE) } }
					(L:ASDHC6_SEATBELTS_SET, number) (&gt;B:SAFETY_IE_SEAT_BELTS_Set)
					(L:ASDHC6_SEATBELTS_TOGGLE, number) s0 0 &gt; if{ (B:SAFETY_IE_SEAT_BELTS, Bool) if{ 0 (&gt;L:ASDHC6_SEATBELTS_SET) 0 (&gt;L:ASDHC6_SEATBELTS_TOGGLE) } els{ 1 (&gt;L:ASDHC6_SEATBELTS_SET) 0 (&gt;L:ASDHC6_SEATBELTS_TOGGLE) } }
					(L:ASDHC6_NO_SM_SET, number) (&gt;B:SAFETY_IE_NO_SMOKING_Set)
					(L:ASDHC6_NO_SM_TOGGLE, number) s0 0 &gt; if{ (B:SAFETY_IE_NO_SMOKING, Bool) if{ 0 (&gt;L:ASDHC6_NO_SM_SET) 0 (&gt;L:ASDHC6_NO_SM_TOGGLE) } els{ 1 (&gt;L:ASDHC6_NO_SM_SET) 0 (&gt;L:ASDHC6_NO_SM_TOGGLE) } }
					(L:ASDHC6_PROP_DEICE_SET, number) s0 0 &gt; if{ l0 1 - (&gt;B:DEICE_IE_PROP_DEICE_Set) 0 (&gt;L:ASDHC6_PROP_DEICE_SET) } 
					(L:ASDHC6_PROP_DEICE_TOGGLE, number) s0 0 &gt; if{ (B:DEICE_IE_PROP_DEICE, Bool) if{ 0 (&gt;B:DEICE_IE_PROP_DEICE_Set) 0 (&gt;L:ASDHC6_PROP_DEICE_TOGGLE) } els{ 1 (&gt;B:DEICE_IE_PROP_DEICE_Set) 0 (&gt;L:ASDHC6_PROP_DEICE_TOGGLE) } }
					(L:ASDHC6_ENG_INTAKE_DEICE_SET, number) s0 0 &gt; if{ l0 1 - (&gt;B:DEICE_IE_INTAKE_ANTIICE_Set) 0 (&gt;L:ASDHC6_ENG_INTAKE_DEICE_SET) } 
					(L:ASDHC6_ENG_INTAKE_DEICE_TOGGLE, number) s0 0 &gt; if{ (B:DEICE_IE_INTAKE_ANTIICE, Bool) if{ 0 (&gt;B:DEICE_IE_INTAKE_ANTIICE_Set) 0 (&gt;L:ASDHC6_ENG_INTAKE_DEICE_TOGGLE) } els{ 1 (&gt;B:DEICE_IE_INTAKE_ANTIICE_Set) 0 (&gt;L:ASDHC6_ENG_INTAKE_DEICE_TOGGLE) } }
					(L:ASDHC6_DEICE_BOOTS_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:DEICE_IE_DEICE_BOOTS_Set) 0 (&gt;L:ASDHC6_DEICE_BOOTS_SET) }
					(L:ASDHC6_DEICE_BOOTS_TOGGLE, Number) s0 0 &gt; if{ (B:DEICE_IE_DEICE_BOOTS, Bool) if{ 0 (&gt;B:DEICE_IE_DEICE_BOOTS_Set) 0 (&gt;L:ASDHC6_DEICE_BOOTS_TOGGLE) } els{ 1 (&gt;B:DEICE_IE_DEICE_BOOTS_Set) 0 (&gt;L:ASDHC6_DEICE_BOOTS_TOGGLE) } }
					(L:ASDHC6_LANDING_GEAR_SET, number) s0 0 &gt; if{ l0 1 - (&gt;B:LANDING_GEAR_Gear_Set) 0 (&gt;L:ASDHC6_LANDING_GEAR_SET) } 
					(L:ASDHC6_LANDING_GEAR_TOGGLE, number) s0 0 &gt; if{ (B:LANDING_GEAR_Gear, Bool) if{ 0 (&gt;B:LANDING_GEAR_Gear_Set) 0 (&gt;L:ASDHC6_LANDING_GEAR_TOGGLE) } els{ 1 (&gt;B:LANDING_GEAR_Gear_Set) 0 (&gt;L:ASDHC6_LANDING_GEAR_TOGGLE) } }
				</UPDATE_CODE>
				<FREQUENCY>1</FREQUENCY>
			</UseTemplate>
		</Component>

        

  • Like 1
  • Thanks 3
Link to comment
Share on other sites

3 hours ago, TheFly77 said:

This is the latest status, with most of the LVars now defined. Just let me know if you miss something. I renamed the LVARs to a more general name (ASDHC6), as the previous name was referring to my own control application  EasyControls for MSFS (a kind of spad.next light, freely available on Github: https://github.com/TheFlyingDutchman77/EasyControlsMSFS)

 

        <Component ID="LVAR_TO_BVAR">
            <UseTemplate Name="ASOBO_GT_Update">
                <UPDATE_CODE>
                    (L:ASDHC6_PITOT_HEAT_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:DEICE_IE_PITOT_HEAT_Set) 0 (&gt;L:ASDHC6_PITOT_HEAT_SET) }
                    (L:ASDHC6_PITOT_HEAT_TOGGLE, Number) s0 0 &gt; if{ (B:DEICE_IE_PITOT_HEAT, Bool) if{ 0 (&gt;B:DEICE_IE_PITOT_HEAT_Set) 0 (&gt;L:ASDHC6_PITOT_HEAT_TOGGLE) } els{ 1 (&gt;B:DEICE_IE_PITOT_HEAT_Set) 0 (&gt;L:ASDHC6_PITOT_HEAT_TOGGLE) } }
                    (L:ASDHC6_STROBES_TOGGLE, Number) s0 0 &gt; if{ (B:LIGHTING_IE_STROBE_LIGHTS, number) 0 == if{ 1 (&gt;B:LIGHTING_IE_STROBE_LIGHTS_Set) 0 (&gt;L:ASDHC6_STROBES_TOGGLE) } els{ 0 (&gt;B:LIGHTING_IE_STROBE_LIGHTS_Set) 0 (&gt;L:ASDHC6_STROBES_TOGGLE) } }
                    (L:ASDHC6_WINDOW_HEAT_TOGGLE, Number) s0 0 &gt; if{ (B:INSTRUMENT_IE_WINDOW_HEAT, enum) 0 == if{ 1 (&gt;B:INSTRUMENT_IE_WINDOW_HEAT_Set) 0 (&gt;L:ASDHC6_WINDOW_HEAT_TOGGLE) } els{ 0 (&gt;B:INSTRUMENT_IE_WINDOW_HEAT_Set) 0 (&gt;L:ASDHC6_WINDOW_HEAT_TOGGLE) } }
                    (L:ASDHC6_GENERATORS_TOGGLE, Number) s0 0 &gt; if{ (B:ELECTRICAL_IE_GENERATOR_RIGHT, number) 0 == if{ 1 (&gt;B:ELECTRICAL_IE_GENERATOR_RIGHT_Set) 0 (&gt;L:ASDHC6_GENERATORS_TOGGLE) } els{ 0 (&gt;B:ELECTRICAL_IE_GENERATOR_RIGHT_Set) 0 (&gt;L:ASDHC6_GENERATORS_TOGGLE) } (B:ELECTRICAL_IE_GENERATOR_LEFT, number) 0 == if{ 1 (&gt;B:ELECTRICAL_IE_GENERATOR_LEFT_Set) } els{ 0 (&gt;B:ELECTRICAL_IE_GENERATOR_LEFT_Set) } }
                    (L:ASDHC6_DC_MASTER_TOGGLE, Number) s0 0 &gt; if{ (B:ELECTRICAL_IE_DC_MASTER, enum) 0 == if{ 1 (&gt;B:ELECTRICAL_IE_DC_MASTER_Toggle) 0 (&gt;L:ASDHC6_DC_MASTER_TOGGLE) } els{ 0 (&gt;B:ELECTRICAL_IE_DC_MASTER_Toggle) 0 (&gt;L:ASDHC6_DC_MASTER_TOGGLE) } }    
                    (L:ASDHC6_ENGINE_START, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ENGINE_IE_STARTER_Set) 0 (&gt;L:ASDHC6_ENGINE_START) }     
                    (L:ASDHC6_DC_SOURCE_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ELECTRICAL_IE_DC_SOURCE_Set) 0 (&gt;L:ASDHC6_DC_SOURCE_SET) }
                    (L:ASDHC6_DC_ALL, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ELECTRICAL_IE_DC_SOURCE_Set) l0 1 - (&gt;B:ELECTRICAL_IE_DC_MASTER_Toggle) 0 (&gt;L:ASDHC6_DC_ALL) }
                    (L:ASDHC6_COND_LVR1_SET, Number) s0 0 &gt; if{ l0 1 - 1 == if{ 1 (&gt;B:CONDITION_LEVER_1_HIGH_IDLE) } els{ 1 (&gt;B:CONDITION_LEVER_1_CUT_OFF) } 0 (&gt;L:ASDHC6_COND_LVR1_SET) }
                    (L:ASDHC6_COND_LVR2_SET, Number) s0 0 &gt; if{ l0 1 - 1 == if{ 1 (&gt;B:CONDITION_LEVER_2_HIGH_IDLE) } els{ 1 (&gt;B:CONDITION_LEVER_2_CUT_OFF) } 0 (&gt;L:ASDHC6_COND_LVR2_SET) }
                    (L:ASDHC6_FUELBOOST_FWD, Number) s0 0 &gt; if{ l0 1 - (&gt;B:FUEL_IE_FUELBOOST_FWD_Set) 0 (&gt;L:ASDHC6_FUELBOOST_FWD) }    
                    (L:ASDHC6_FUELBOOST_AFT, Number) s0 0 &gt; if{ l0 1 - (&gt;B:FUEL_IE_FUELBOOST_AFT_Set) 0 (&gt;L:ASDHC6_FUELBOOST_AFT) }    
                    (L:ASDHC6_NAV, number) (&gt;B:LIGHTING_NAV_1_Set)
                    (L:ASDHC6_TAXI, number) (&gt;B:LIGHTING_TAXI_1_Set)
                    (L:ASDHC6_LANDING_1, number) (&gt;B:LIGHTING_LANDING_1_Set)
                    (L:ASDHC6_LANDING_2, number) (&gt;B:LIGHTING_LANDING_2_Set)
                    (L:ASDHC6_BEACON, number) (&gt;B:LIGHTING_BEACON_1_Set)
                    (L:ASDHC6_NO_SM, number) (&gt;B:SAFETY_IE_NO_SMOKING_Set)
                    (L:ASDHC6_SEAT_BELTS, number) (&gt;B:SAFETY_IE_SEAT_BELTS_Set)
                </UPDATE_CODE>
                <FREQUENCY>1</FREQUENCY>
            </UseTemplate>
        </Component>

        

 

I think it will be usefull if you add the full deice option (windows+propeller+engine :

  

Quote

    (L:EC_TWOTTER_DEICE_BOOTS, Number) (&gt;B:DEICE_IE_DEICE_BOOTS_Set)

    (L:EC_TWOTTER_DEICE_PROP, Number) (&gt;B:DEICE_IE_PROP_DEICE_Set)

 

- the landing gear for the ski and amphibian livery 

Quote

(L:EC_TWOTTER_LANDING_GEAR, number) (&gt;B:LANDING_GEAR_Gear_Set)

- general lighting in the cockpit 

Quote

    (L:EC_TWOTTER_COCKPIT_LT, number) (&gt;B:LIGHTING_IE_CEILING_LT_Set)

 

tx 

Julien

 

 

 

 

 

Link to comment
Share on other sites

  • Developer
32 minutes ago, TheFly77 said:

This is the latest status, with most of the LVars now defined. Just let me know if you miss something. Some of the LVARs for various lights (like NAV, TAXI, etc) posted above, I haven't included, as these can be set with standard Simconnect events. Thanks @Padbol Prod for adding the fuel boost and no smoking and seatbelts events.

I renamed the LVARs to a more general name (ASDHC6), as the previous name was referring to my own control application  EasyControls for MSFS (a kind of spad.next light, freely available on Github: https://github.com/TheFlyingDutchman77/EasyControlsMSFS)

 

		<Component ID="LVAR_TO_BVAR">
			<UseTemplate Name="ASOBO_GT_Update">
				<UPDATE_CODE>
					(L:ASDHC6_PITOT_HEAT_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:DEICE_IE_PITOT_HEAT_Set) 0 (&gt;L:ASDHC6_PITOT_HEAT_SET) }
					(L:ASDHC6_PITOT_HEAT_TOGGLE, Number) s0 0 &gt; if{ (B:DEICE_IE_PITOT_HEAT, Bool) if{ 0 (&gt;B:DEICE_IE_PITOT_HEAT_Set) 0 (&gt;L:ASDHC6_PITOT_HEAT_TOGGLE) } els{ 1 (&gt;B:DEICE_IE_PITOT_HEAT_Set) 0 (&gt;L:ASDHC6_PITOT_HEAT_TOGGLE) } }
					(L:ASDHC6_STROBES_TOGGLE, Number) s0 0 &gt; if{ (B:LIGHTING_IE_STROBE_LIGHTS, number) 0 == if{ 1 (&gt;B:LIGHTING_IE_STROBE_LIGHTS_Set) 0 (&gt;L:ASDHC6_STROBES_TOGGLE) } els{ 0 (&gt;B:LIGHTING_IE_STROBE_LIGHTS_Set) 0 (&gt;L:ASDHC6_STROBES_TOGGLE) } }
					(L:ASDHC6_WINDOW_HEAT_TOGGLE, Number) s0 0 &gt; if{ (B:INSTRUMENT_IE_WINDOW_HEAT, enum) 0 == if{ 1 (&gt;B:INSTRUMENT_IE_WINDOW_HEAT_Set) 0 (&gt;L:ASDHC6_WINDOW_HEAT_TOGGLE) } els{ 0 (&gt;B:INSTRUMENT_IE_WINDOW_HEAT_Set) 0 (&gt;L:ASDHC6_WINDOW_HEAT_TOGGLE) } }
					(L:ASDHC6_GENERATORS_TOGGLE, Number) s0 0 &gt; if{ (B:ELECTRICAL_IE_GENERATOR_RIGHT, number) 0 == if{ 1 (&gt;B:ELECTRICAL_IE_GENERATOR_RIGHT_Set) 0 (&gt;L:ASDHC6_GENERATORS_TOGGLE) } els{ 0 (&gt;B:ELECTRICAL_IE_GENERATOR_RIGHT_Set) 0 (&gt;L:ASDHC6_GENERATORS_TOGGLE) } (B:ELECTRICAL_IE_GENERATOR_LEFT, number) 0 == if{ 1 (&gt;B:ELECTRICAL_IE_GENERATOR_LEFT_Set) } els{ 0 (&gt;B:ELECTRICAL_IE_GENERATOR_LEFT_Set) } }
					(L:ASDHC6_DC_MASTER_TOGGLE, Number) s0 0 &gt; if{ (B:ELECTRICAL_IE_DC_MASTER, enum) 0 == if{ 1 (&gt;B:ELECTRICAL_IE_DC_MASTER_Toggle) 0 (&gt;L:ASDHC6_DC_MASTER_TOGGLE) } els{ 0 (&gt;B:ELECTRICAL_IE_DC_MASTER_Toggle) 0 (&gt;L:ASDHC6_DC_MASTER_TOGGLE) } }	
					(L:ASDHC6_ENGINE_START, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ENGINE_IE_STARTER_Set) 0 (&gt;L:ASDHC6_ENGINE_START) } 	
					(L:ASDHC6_DC_SOURCE_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ELECTRICAL_IE_DC_SOURCE_Set) 0 (&gt;L:ASDHC6_DC_SOURCE_SET) }
					(L:ASDHC6_DC_ALL_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ELECTRICAL_IE_DC_SOURCE_Set) l0 1 - (&gt;B:ELECTRICAL_IE_DC_MASTER_Toggle) 0 (&gt;L:ASDHC6_DC_ALL) }
					(L:ASDHC6_DC_ALL_TOGGLE, Number) s0 0 &gt; if{ (B:DEICE_IE_PITOT_HEAT, Bool) if{ 0 (&gt;B:ELECTRICAL_IE_DC_SOURCE_Set) 0 (&gt;B:ELECTRICAL_IE_DC_MASTER_Toggle) } els{ 1 (&gt;B:ELECTRICAL_IE_DC_SOURCE_Set) 1 (&gt;B:ELECTRICAL_IE_DC_MASTER_Toggle) } 0 (&gt;L:ASDHC6_DC_ALL) }
					(L:ASDHC6_COND_LVR1_SET, Number) s0 0 &gt; if{ l0 1 - 1 == if{ 1 (&gt;B:CONDITION_LEVER_1_HIGH_IDLE) } els{ 1 (&gt;B:CONDITION_LEVER_1_CUT_OFF) } 0 (&gt;L:ASDHC6_COND_LVR1_SET) }
					(L:ASDHC6_COND_LVR2_SET, Number) s0 0 &gt; if{ l0 1 - 1 == if{ 1 (&gt;B:CONDITION_LEVER_2_HIGH_IDLE) } els{ 1 (&gt;B:CONDITION_LEVER_2_CUT_OFF) } 0 (&gt;L:ASDHC6_COND_LVR2_SET) }
					(L:ASDHC6_FUELBOOST_FWD, Number) s0 0 &gt; if{ l0 1 - (&gt;B:FUEL_IE_FUELBOOST_FWD_Set) 0 (&gt;L:ASDHC6_FUELBOOST_FWD) }    
					(L:ASDHC6_FUELBOOST_FWD_TOGGLE, Number) s0 0 &gt; if{ (B:FUEL_IE_FUELBOOST_FWD, Bool) if{ 0 (&gt;B:FUEL_IE_FUELBOOST_FWD_Set) 0 (&gt;L:ASDHC6_FUELBOOST_FWD_TOGGLE) } els{ 1 (&gt;B:FUEL_IE_FUELBOOST_FWD_Set) 0 (&gt;L:ASDHC6_FUELBOOST_FWD_TOGGLE) } }
					(L:ASDHC6_FUELBOOST_AFT, Number) s0 0 &gt; if{ l0 1 - (&gt;B:FUEL_IE_FUELBOOST_AFT_Set) 0 (&gt;L:ASDHC6_FUELBOOST_AFT) }
					(L:ASDHC6_FUELBOOST_AFT_TOGGLE, Number) s0 0 &gt; if{ (B:FUEL_IE_FUELBOOST_AFT, Bool) if{ 0 (&gt;B:FUEL_IE_FUELBOOST_AFT_Set) 0 (&gt;L:ASDHC6_FUELBOOST_AFT_TOGGLE) } els{ 1 (&gt;B:FUEL_IE_FUELBOOST_AFT_Set) 0 (&gt;L:ASDHC6_FUELBOOST_AFT_TOGGLE) } }
					(L:ASDHC6_SEAT_BELTS, number) (&gt;B:SAFETY_IE_SEAT_BELTS_Set)
					(L:ASDHC6_ENGINE_START, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ENGINE_IE_STARTER_Set) 0 (&gt;L:EC_TWOTTER_ENGINE_START) } 
				</UPDATE_CODE>
				<FREQUENCY>1</FREQUENCY>
			</UseTemplate>
		</Component>
		

        

 

This will become part of the standard Twin Otter package with the next update. Thanks @TheFly77 for allowing us to include it.

  • Like 2
  • Thanks 3
  • Upvote 3
Link to comment
Share on other sites

For the transponder :

 

it need value 3 for ON and 1 for stby (corresponding of the states of my switch)

 

(L:EC_TWOTTER_TRANSPONDER_MODE, number) s0 0 &gt; if{ l0 1 - (&gt;B:NAVCOM_TRANSPONDER_MODE_Set) 0 (&gt;L:EC_TWOTTER_TRANSPONDER_MODE) } 

 

 

 

Link to comment
Share on other sites

(L:ASDHC6_DC_SOURCE_SET, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ELECTRICAL_IE_DC_SOURCE_Set) 0 (&gt;L:ASDHC6_DC_SOURCE_SET) }

Looking good.
Be aware that not all switches are simple 0/1 on/off switches and that 0 not always is off. DC Source is a three-way switch (0, 1, 2) for battery, off and external. So are fuel boost aft and fwd with off, test and on. Same with starter where 0 is left starter, 1 is neutral/off and 2 is right starter. You need to go through each of them in dev mode, behaviour window and look at the parameters they take to move the switch. Or you can check out the xml in the file I uploaded to flightsim.to

Link to comment
Share on other sites

  • 1 month later...

Hello,

 

Sorry for my lack of knowledge on all of this, however from my understanding of the above, with the new code that has been added in from the updates,

 

When i use Spad.Next to change an Lvar, the switch in question should toggle within the sim? I'm trying to create a profile for my logitec switch panel and have mapped the DC Source and Master.

 

The switches work in the sense i can give the plane power however the switches themselves do not toggle? 

 

I've checked the DCH6_Interior.XML and can see the above code is there so im at a bit of a loss.

 

Can anyone help at all?

 

Regards

 

Jack 

Link to comment
Share on other sites

  • Aerosoft

Hi,

There are L-Vars for the functions themselves

and other specific to the switch animation.

However certain functions don't have animation

so that eventough you can control the function, you won't see the switch move.

 

Best regards.

Link to comment
Share on other sites

  • 3 weeks later...

This is fantastic.  Do you have any code for the landing lights?  

 

I've tried to convert the LVAR Bridge from AAO over, but I am afraid I don't understand the syntax well enough:

 

 (L:AAO_TWOTTER_WING, number) (B:LIGHTING_WING_1, number) != if{ (L:AAO_TWOTTER_WING, number) (&gt;B:LIGHTING_WING_1_Set) } 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...