mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Introduces async callback support for command execution in spawn methods, adds registration/unregistration for update and startup callbacks, and improves logging and signal handling. Adds a new Kronos module and main entry point for initializing and running the API with Kronos integration. Refactors example scripts and updates VSCode launch configurations for new entry points.
20 lines
641 B
Python
20 lines
641 B
Python
from api import API
|
|
from kronos.kronos import Kronos
|
|
|
|
##############################################################################################
|
|
# Main entry point for the script. It registers the callbacks and starts the API.
|
|
##############################################################################################
|
|
if __name__ == "__main__":
|
|
# Initialize the API
|
|
api = API()
|
|
|
|
# Initialize Kronos with the API
|
|
kronos = Kronos(api)
|
|
|
|
# Register the callbacks
|
|
api.register_on_startup_callback(kronos.on_startup)
|
|
|
|
# Start the API, this will run forever until stopped
|
|
api.run()
|
|
|
|
|