odwdinc / Python-SimConnect

Python interface for MSFS2020 SimConnect.dll

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to check if seatbelts alert(or any event) is on or off?

alptugidin opened this issue · comments

I need to check boolean values of events. But i couldn't find a way.

e.g.


event_to_trigger = ae.find("CABIN_SEATBELTS_ALERT_SWITCH_TOGGLE")

if      => Seatbelts switch is on:
     do nothing
else  =>
     event_to_trigger()

Tanks.

        aq = AircraftRequests(sm, _time=10)
        event=aq.get('CABIN_SEATBELTS_ALERT_SWITCH')
        if event==True:
            print("true")

also. doing it in a loop may cause it to crash. see #94

note i used aq. not ae.

it works. thanks!