|
|
@ -513,6 +513,7 @@ void XYRobotCtrlModule::moveTo(int32_t t_x, int32_t t_y, int32_t v) { |
|
|
|
trysyncpos(); |
|
|
|
int32_t target_m1pos, target_m2pos; |
|
|
|
forward_kinematics(t_x, t_y, target_m1pos, target_m2pos); |
|
|
|
ZLOGI(TAG, "moveTo x:%d y:%d m1:%d m2:%d v:%d", t_x, t_y, target_m1pos, target_m2pos, v); |
|
|
|
m_stepM1->moveTo(target_m1pos, v); |
|
|
|
m_stepM2->moveTo(target_m2pos, v); |
|
|
|
} |
|
|
@ -532,3 +533,4 @@ int32_t XYRobotCtrlModule::xymotor_read_inio_index_in_stm32(int32_t ioindex, int |
|
|
|
*val = m_gpiotable[ioindex].getPin(); |
|
|
|
return 0; |
|
|
|
} |
|
|
|
int32_t XYRobotCtrlModule::xymotor_set_pos(int32_t x, int32_t y) { setnowpos(x, y); } |