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