This repo contains example code for syncing the LEDs of the VKB FMS-GA with MSFS via SimConnect.
Install Python 3.
Clone or download this repo.
Inside this repo directory create a virtual environment:
python -m venv venv
Activate the virtual environment:
.\venv\Scripts\activate
Install the dependencies
pip install -r requirements.txt
python main.py test
python main.py
The sync update loop checks the state of the sim using SimConnect.
Each LED ID has an update function that receives the instance of the SimConnect AircraftRequests with which it is responsible for setting the LED to the correct state. This results in more verbose code but more flexibility and easy readability.