#Preset for Terr OnND FO

1 messages · Page 1 of 1 (latest)

vital shuttle
#

What preset should I use for this button?

dreamy grail
#

i've assumed fenix a320 with that

vital shuttle
dreamy grail
#

ahh looks like the handling of that has changed at some point. is your button momentary or latching?

vital shuttle
#

Momentary

dreamy grail
#

ok assign this for both on press and on release (L:S_MIP_GPWS_TERRAIN_ON_ND_FO) ++ (>L:S_MIP_GPWS_TERRAIN_ON_ND_FO)

vital shuttle
#

does not work

dreamy grail
#

you need the ++ between the lvars

vital shuttle
#

Thanks, bro, it's working now.

dreamy grail
#

no worries

vital shuttle
foggy mesa
#

I think we need to change this code. If we use the same code for both press and release, the button will go out of sync with Auto-Retrigger.
Maybe add 2 instead of 1 and only use press.
Alternatively, check in the on release if the value of the Lvar is odd and only execute the code when true.

vital shuttle
#

🤔

foggy mesa
#

it will work ok, but if you use auto-retrigger the button will be pressed because that is what the code is telling the sim to do.

vital shuttle
#

Okay, we need to experiment, it's already late at night, my head stops working.. I'm going to sleep it off

foggy mesa
#

I would suggest something like this modification for the on release event...
(L:S_MIP_GPWS_TERRAIN_ON_ND_FO) 2 % 1 == if{ (L:S_MIP_GPWS_TERRAIN_ON_ND_FO) ++ (>L:S_MIP_GPWS_TERRAIN_ON_ND_FO) }

#

so the button release code is executed ONLY if the value of the variable is odd, which means the on press event was executed first.

vital shuttle
#

Or in the Press section?

foggy mesa
#

only on the on release event (as I indicated)

#

when auto-retrigger tries to execute the on release event, the value of the Lvar is even, so nothing is executed.

vital shuttle
#

ok assign this for both on press and on release (L:S_MIP_GPWS_TERRAIN_ON_ND_FO) ++ (>L:S_MIP_GPWS_TERRAIN_ON_ND_FO) And leave it in the Press section, right?

foggy mesa
#

Assign that ONLY to the on press. It makes it very confusing what you mean when you don't edit the original text.