Fix ThrottleInit (2)
This commit is contained in:
31
main.lua
31
main.lua
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user