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() function ThrottleInit()
Throttles = {}
local sides = { local sides = {
"top", "top",
"bottom", "bottom",
@@ -734,35 +736,6 @@ function collectSensorData()
return data return data
end 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) function displayAutopilotControls(monitor)
if not monitor or not monitor.peripheral then return end if not monitor or not monitor.peripheral then return end