|
|
@ -437,7 +437,6 @@ int32_t XYRobotCtrlModule::exec_move_to_zero_task() { |
|
|
|
ZLOGE(TAG, "find zero point fail"); |
|
|
|
return err::kce_y_leave_away_zero_point_fail; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (m_Ygpio->getState()) { |
|
|
@ -460,7 +459,7 @@ int32_t XYRobotCtrlModule::exec_move_to_zero_task() { |
|
|
|
return err::kce_y_leave_away_zero_point_fail; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
@ -525,11 +524,11 @@ void XYRobotCtrlModule::inverse_kinematics(int32_t m1pos, int32_t m2pos, int32_t |
|
|
|
x = m1pos + m2pos; |
|
|
|
y = m1pos - m2pos; |
|
|
|
} |
|
|
|
if (m_basecfg.x_shaft) x = -x; |
|
|
|
if (m_basecfg.y_shaft) y = -y; |
|
|
|
|
|
|
|
x += m_basecfg.shift_x; |
|
|
|
y += m_basecfg.shift_y; |
|
|
|
|
|
|
|
if (m_basecfg.x_shaft) x = -x; |
|
|
|
if (m_basecfg.y_shaft) y = -y; |
|
|
|
} |
|
|
|
void XYRobotCtrlModule::forward_kinematics(int32_t x, int32_t y, int32_t& m1pos, int32_t& m2pos) { |
|
|
|
if (m_basecfg.x_shaft) x = -x; |
|
|
|