Calling an LVar only once will always output 0. It seems we have to include the LVar call within a loop (i.e. while True:
as in the example) in order to fill up a stack and obtain the wanted output, but this is not practical in many cases.
Not sure if I might be doing something wrong but I need to be able to do the following:
from simconnect_mobiflight import SimConnectMobiFlight
from mobiflight_variable_requests import MobiFlightVariableRequests
sm = SimConnectMobiFlight()
vr = MobiFlightVariableRequests(sm)
vr.clear_sim_variables()
ap1 = vr.get("(L:A32NX_AUTOPILOT_1_ACTIVE)")
print(ap1)
And obtain as output 1 or 0.