edit debug prints and add new ones

This commit is contained in:
2026-06-29 23:42:58 -05:00
parent 1aa391f56c
commit 7bcabcbbe6

View File

@@ -964,12 +964,15 @@ function UpdateGlobalThrust()
local AltitudeRateOutput = PIDs.VerticalRatePID:update(Config.Autopilot.AutopilotDesiredAltitude, SensorData.Altitude.Altitude, dt)
local throttleOutput = PIDs.AltitudePID:update(AltitudeRateOutput, SensorData.Altitude.VerticalSpeed, dt)
if Config.Debug then print("DEBUG: Throttle Output: "..throttleOutput) end
local pitchOutput = PIDs.PitchAttitudePID:update(0, SensorData.Gimbal.Angles.xAngle, dt)
local pitchRateOutput = PIDs.PitchRatePID:update(pitchOutput, SensorData.Gimbal.AngularRates.wx or 0, dt)
if Config.Debug then print("DEBUG: Pitch Output: "..pitchRateOutput) end
local rollOutput = PIDs.RollAttitudePID:update(0, SensorData.Gimbal.Angles.zAngle, dt)
local rollRateOutput = PIDs.RollRatePID:update(rollOutput, SensorData.Gimbal.AngularRates.wz or 0, dt)
if Config.Debug then print("DEBUG: Roll Output: "..rollRateOutput) end
local yawOutput = 5
if Config.Autopilot.AutopilotDesiredHeading ~= nil then yawOutput = PIDs.YawAttitudePID:update(Config.Autopilot.AutopilotDesiredHeading, SensorData.NavTable.Heading, dt) end