#ATR Autopilot Local Variables

1 messages ยท Page 1 of 1 (latest)

exotic siren
#

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.

rotund ruin
#

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

exotic siren
#

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??

rotund ruin
#

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

exotic siren
#

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.

rotund ruin
#

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

exotic siren
#

I will do, actually I did but decided it was unnecessary. Will post again

#

Output

rotund ruin
exotic siren
#

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

rotund ruin
#

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.

frank canyon
#

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

rotund ruin
exotic siren
#

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

frank canyon
#

I would try with the generic A variables. I don't think the ATR has a custom autopilot programming

rotund ruin
#

I was going to suggest that too

exotic siren
#

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.

exotic siren
#

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.

rotund ruin
#

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.

exotic siren
#

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....

rotund ruin
#

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

exotic siren
#

Yes, I get that...

#

I've noticed that issue before myself....

rotund ruin
#

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 ๐Ÿ˜ฆ

exotic siren
#

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!

frank canyon
#

did you try using the generic Lvars?

exotic siren
#

pretty sure I did and found no joy, something else to try again though

frank canyon
exotic siren
#

Thanks Jaime, will check that out....

#

Found it, trying now

#

Works Fine! PFD annunciator shows "HDG SEL"

exotic siren
#

Had a quick look for other specific or generic AP output but no luck (belay that- see image below)

frank canyon
#

ATR Autopilot Local Variables

exotic siren
#

Found on closer inspection-

wraith anvil
#

@exotic siren is this solved?

exotic siren
#

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.

frank canyon
#

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?

exotic siren
#

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

frank canyon
#

try this and see
(A:AUTOPILOT APPROACH HOLD,Bool)

exotic siren
#

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.

exotic siren
#

Well well, your suggestion for APProach does the job... thankyou... ๐Ÿ˜Š

exotic siren
#

Still chasing IAS annunciation and VS

frank canyon
#

try it

frank canyon
#

what about IAS?