diff --git a/main.lua b/main.lua index ebb2472..f62bf79 100644 --- a/main.lua +++ b/main.lua @@ -564,7 +564,21 @@ function UpdateGlobalThrust() end function Init() + + -- Initialize monitors - identify which monitor is for which type + if Config.Monitors.InstrumentPanelMonitor == nil then + print("Identifying instrument panel monitor...") + Config.Monitors.InstrumentPanelMonitor = identifyMonitor("instrument panel") + end + + if Config.Monitors.AutopilotControlMonitor == nil then + print("Identifying autopilot control monitor...") + Config.Monitors.AutopilotControlMonitor = identifyMonitor("autopilot control") + end + + ThrottleInit() + Thrusters = {} local configFile = io.open(Config.ConfigPath, "r") @@ -597,17 +611,6 @@ function Init() end end - -- Initialize monitors - identify which monitor is for which type - if Config.Monitors.InstrumentPanelMonitor == nil then - print("Identifying instrument panel monitor...") - Config.Monitors.InstrumentPanelMonitor = identifyMonitor("instrument panel") - end - - if Config.Monitors.AutopilotControlMonitor == nil then - print("Identifying autopilot control monitor...") - Config.Monitors.AutopilotControlMonitor = identifyMonitor("autopilot control") - end - -- If we're here, the config loaded successfully and the initialization is done. end