From 2222b7c65212ee9aca5c0e6a58b6f1fb6e1533a9 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Mon, 16 Oct 2023 12:47:33 +0800 Subject: [PATCH] update --- components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp b/components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp index a052a92..cf4a648 100644 --- a/components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp +++ b/components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp @@ -566,8 +566,8 @@ void XYRobotCtrlModule::forward_kinematics(int32_t x, int32_t y, int32_t& m1pos, m1pos = ((x + y) / 2); m2pos = ((y - x) / 2); } else { - m1pos = (x - y) / 2; - m2pos = (x + y) / 2; + m1pos = (x + y) / 2; + m2pos = (x - y) / 2; } }