MSFS2020, Mega 2560
Is there yet a way to turn assign a local variable, set it in an input event, and access it in an output event? What I am trying to do is light an LED to signal a button state where no output config is apparently provided for the aircraft. an example would be most of the pushbuttons in the Asobo ATR series aircraft autopilot.
#ATR Autopilot Local Variables
1 messages ยท Page 1 of 1 (latest)
Sure, you can just set a Mobiflight Variable in your input config, and map an output config to display it
but it's a recipe for sadness as it will invariably get out of sync with whatever you are trying to make it replicate in-sim. it is always better to find the variable the sim uses and access it
Yes I agree, using an existing output config would always be my first approach. I thought I had nailed using a local variable 12 months ago Neil, completely forgot how I did it though. Cant find the reference in my many configs.
I tried this as an added line in a button input event ... 1 (>L:HDG_SET) then in output custom config, I just put (L:HDG_SEL)
Actually I just retried this and it worked perfectly to set the output to 1 state. ZappyG(Glenn)
OP
โ Today at 9:30 AM
However it doesnt hold the state for a push-button??
this really is not a great way to do it. are you positive there is no variable in the sim for this? Where have you looked?
also (>L:HDG_SET) isn't a mobiflight variable, that's setting a custom variable in the sim. There is a dedicated variable feature built in to mobiflight, you select it from the dropdown instead of Microsoft Flight Simulator as the action
I ve looked under the variables isupplied for MSATR, and also looked in Developer mode behaviours
Yes thats my goto approach, select aircraft then type ina term to search, but I think bbecause the ATR autopilot only signals states on hte top line of the PFD (no LED on autopilot) then they figure it isnt needed. I've also looked for config items which access the PFD anunciation (top line) but to no avail.
ah, I see
post a screenshot of how you have both the input and output configured. for the input, make sure you post a screenshot of both on press and on release
I will do, actually I did but decided it was unnecessary. Will post again
Input
Output
what is the on release config
What I'm finding is that the button doesnt rest on second push, and if I add an off event (0 (>L:IAS_SET) , it immediately turns LED off on release
That's because you are always setting it to 1 when you press it
I can give you code that will fix it, but... you will not be happy in the long run. I guarantee it will get out of sync with the actual state in the sim at some point.
IIRC most buttons in the ATR aircraft just set an Lvar to 1 and the aircraft model takes its cue and ressets the Lvar back to 0
The issue is knowing whether the mode is active for the autopilot, not enabling/disabling it. Per Glenn's earlier comment, it's just showing in the PFD so there may not be a variable that exposes it
yes, Jaime, I assumed that was the case.
That what I am guessing too Neil, so I looked for the PFD anunciations and no luck
I would try with the generic A variables. I don't think the ATR has a custom autopilot programming
I was going to suggest that too
I have no idea how to do that unfortunately, sorry for my ignorance, but it has been an issue i would like to have solved.
will check that out thanks Jaime
Ok, I think I already tried that... ๐ซค
The ATR has all the input code specific to ATR, no generic that I can see, but as for output only FD , AP and YD states. To see what the state of all the other autopilot buttons are, one has to look at the PFD annunciation line, which means zooming in to screen or lifting the PFD intoa separate clearer window.
There really isn't a good solution if they don't expose it. Trying to toggle something yourself outside of the sim will, eventually, be wrong. I realize it's tempting to try and fake it, but it will get out of sync eventually.
And as far as buttons go, if I use the custom variable to turn on the LED, there is no way I can see to have it turn off. The state is as Jaime says, reset by the SIM.
I think inconclusion you are very corrrect Neil. Maybe this one cant be solved....
you control it by flipping it to the opposite of what it is set to every time you press the button, you would modify your input config to do that
but it will not match the sim eventually
the AP will kick off in the sim for some reason, and boom, your LED won't match anymore
Personally I would mail whoever wrote the ATR and ask them to expose this, and then move on without doing anything but squinting at the PFD ๐ฆ
Good suggestion ๐ need a bit of luck there!
I've just built a very nice 737 autpilot with all the bells and whistles, but I like to fly ATR etc etc... b enice to have the bells and whistles all useful!
the fact that the ATR uses custom Lvars for autopilot control does not necessarily mean that they are not using the default autopilot in the background.
did you try using the generic Lvars?
pretty sure I did and found no joy, something else to try again though
ok, try this new preset... you need to update your events to get it
https://hubhop.mobiflight.com/preset/?simType=msfs2020&id=e51df1c2-25ec-4c8f-b7f8-d9a2288cc0ff
Thanks Jaime, will check that out....
Found it, trying now
Works Fine! PFD annunciator shows "HDG SEL"
Had a quick look for other specific or generic AP output but no luck (belay that- see image below)
ATR Autopilot Local Variables
Found on closer inspection-
@exotic siren is this solved?
No, those last 3 items I cannot find, I've looked high and low. Be nice to light up the APPR, ALT HLD and VS mode buttons. The ATR autopilot does not have lit buttons other than CPL AP YD, although most functions are seen on the PFD top line.
I know I am being repetitive, but did you try the generic A variables?
APPR is tricky animal as it is not a mode in itself but a combination... when should the led light up?
As it would for say the 737, when its selected. It is also armed by same button but if it signifies armed and captured LOC GS that fine.
If thats what you are asking
I did try A variables
try this and see
(A:AUTOPILOT APPROACH HOLD,Bool)
I think you already suggested that, but I will give it a try, I'm not playing with the SIM, right now.... will let you know what happens.
Well well, your suggestion for APProach does the job... thankyou... ๐
Still chasing IAS annunciation and VS
this is a new preset
(L:MSATR_FGCP_STAT_VS)
https://hubhop.mobiflight.com/preset/?simType=msfs2020&id=0eed718a-f14f-4753-a339-da46f45c1542
try it
what about IAS?