Fix ThrottleInit (2)

This commit is contained in:
2026-06-25 06:22:27 -05:00
parent 1f487a98c4
commit e1e996e50f

View File

@@ -133,6 +133,8 @@ Throttles = {
}
function ThrottleInit()
Throttles = {}
local sides = {
"top",
"bottom",
@@ -734,35 +736,6 @@ function collectSensorData()
return data
end
function Main()
Init()
while true do
local sensorData = collectSensorData()
-- Update monitor displays
if Config.Monitors.InstrumentPanelMonitor then
displayInstrumentPanel(Config.Monitors.InstrumentPanelMonitor, sensorData)
end
if Config.Monitors.AutopilotControlMonitor then
displayAutopilotControls(Config.Monitors.AutopilotControlMonitor, sensorData)
end
local unindexedThrusters = checkIfThrusterIsIndexed()
if unindexedThrusters ~= nil then
partiallyUpdateThrusters(unindexedThrusters)
end
PollSensors()
UpdateGlobalThrust()
UpdateStabilization()
-- Add a small delay to avoid overloading the system
os.sleep(0.1)
end
end
function displayAutopilotControls(monitor)
if not monitor or not monitor.peripheral then return end