gustavousanj Posted January 31, 2021 Report Posted January 31, 2021 Hello all, I'm about to finish my home cockpit, but I'm still missing some of the codes to make the momentary switches work. I understand some of the switches Carenado is using have their own code. Has anyone here had success using L:Var Macro for the momentary buttons/switches like the test button for Engine Fire or INV1/2 START both in the overhead panel? By momentary switches I mean those that when pushed, return to the initial position. I have tried with Inc, Dec, Set, Toggle, etc, but it didn't work. Is it possible to make them work with L:Var Macro only?Another example is for the APU start, where I can move to position OFF and ON but can't move to the start position because it is only momentary. Is it possible make the momentary switches work with L:Var Macro only? Will post some of the L:Var Macros, -Engine Fire Test: 1=L:ASD_BTN_TEST_FIRE_ENG1_850XP -INV1 START 1=L:ASD_SWITCH_AC_INV1_850XP -APU Start L:ASD_SWITCH_APU_MASTERSTART_DIR Thank you all in advance, Gustavo D R.
spokes2112 Posted February 1, 2021 Report Posted February 1, 2021 Gustavo, Most, if not all the switches/buttons you are referring to have logic built in to the VC click spots, mainly timers. Much like interfacing the AP, there is no real way to do this via L:Var macros & lua is out of the question too. Just returned home after some time away and continuing on your AP interface ( some FMC too 😉 ). If you take some screenshots highlighted with all the buttons & switches you need , I can add those too. (send via our PM thread) Roman P.S. Here's an example of the APU code needed just to make it work - (M:Event) 'LeftSingle' scmi 0 == (M:Event) 'WheelUp' scmp 0 == or if{ (L:ASD_SWITCH_APU_MASTERSTART_DIR,number) 2 < if{ 1 (>L:ClickSoundCar,number) } (L:ASD_SWITCH_APU_MASTERSTART_DIR,number) ++ 2 min (>L:ASD_SWITCH_APU_MASTERSTART_DIR,number) (L:ASD_SWITCH_APU_MASTERSTART_DIR,number) 2 == if{ (P:local time,seconds) 05 + (>L:ASD_SWITCH_APU_MASTERSTART_TIMER) } } (M:Event) 'RightSingle' scmi 0 == (M:Event) 'WheelDown' scmp 0 == or if{ (L:ASD_SWITCH_APU_MASTERSTART_DIR,number) 0 > if{ 1 (>L:ClickSoundCar,number) } (L:ASD_SWITCH_APU_MASTERSTART_DIR,number) -- 0 max (>L:ASD_SWITCH_APU_MASTERSTART_DIR,number) } (L:ASD_SWITCH_APU_MASTERSTART_DIR,number) 2 == if{ 1 (>L:APU_START,number) 1 (>L:APU_GENERATOR_SWITCH,number) 0 (>L:APU_STOP,number) } (L:ASD_SWITCH_APU_MASTERSTART_DIR,number) 0 == if{ 0 (>L:APU_START,number) 0 (>L:APU_GENERATOR_SWITCH,number) 1 (>L:APU_STOP,number) } }
gustavousanj Posted February 1, 2021 Author Report Posted February 1, 2021 Hello Roman, You are saving my home cockpit, thank you x1000! Will send via PM thread 👍
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now