From 9e3cd439f02a4df8c4dc703f955dbb2f5a76b4bd Mon Sep 17 00:00:00 2001 From: LLida <3199335945@qq.com> Date: Fri, 5 Dec 2025 14:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MindVisionMain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MindVisionMain.cpp b/src/MindVisionMain.cpp index 6722737..a887852 100644 --- a/src/MindVisionMain.cpp +++ b/src/MindVisionMain.cpp @@ -82,12 +82,12 @@ void output_control_data(const cv::Point2f* ballistic_point, // Convert PID outputs to the expected format // The PID output might be large, so we might need to scale it - int ballistic_offset_yaw = static_cast(pid_yaw_output); - int ballistic_offset_pitch = static_cast(pid_pitch_output); + int ballistic_offset_yaw = 1.9*-static_cast(pid_yaw_output); + int ballistic_offset_pitch = 1.9*-static_cast(pid_pitch_output); // Apply same limits as before if (abs(ballistic_offset_yaw) > 320) { - ballistic_offset_yaw = (ballistic_offset_yaw / abs(ballistic_offset_yaw)) * 220; // Keep the scale factor + ballistic_offset_yaw = (ballistic_offset_yaw / abs(ballistic_offset_yaw)) * 220*1.9; // Keep the scale factor } if (abs(ballistic_offset_pitch) > 180) { // Use the same scale factor as before