From 7bcabcbbe6c789c01e06a8d1dc0f9cd0375beeb9 Mon Sep 17 00:00:00 2001 From: templeofshadow Date: Mon, 29 Jun 2026 23:42:58 -0500 Subject: [PATCH] edit debug prints and add new ones --- main.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.lua b/main.lua index f52c873..82ceaec 100644 --- a/main.lua +++ b/main.lua @@ -963,13 +963,16 @@ function UpdateGlobalThrust() end local AltitudeRateOutput = PIDs.VerticalRatePID:update(Config.Autopilot.AutopilotDesiredAltitude, SensorData.Altitude.Altitude, dt) - local throttleOutput = PIDs.AltitudePID:update(AltitudeRateOutput, SensorData.Altitude.VerticalSpeed, 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