|
@ -22,8 +22,10 @@ void ZCANXYRobotCtrlModule::onRceivePacket(CanPacketRxBuffer* rxcmd) { |
|
|
END_PROCESS_PACKET(); |
|
|
END_PROCESS_PACKET(); |
|
|
PROCESS_PACKET(kcmd_xy_robot_ctrl_move_to_zero, m_id) { //
|
|
|
PROCESS_PACKET(kcmd_xy_robot_ctrl_move_to_zero, m_id) { //
|
|
|
errorcode = m_xyRobotCtrlModule->move_to_zero([this, cmdheader](int32_t exec_status, int32_t dx, int32_t dy) { |
|
|
errorcode = m_xyRobotCtrlModule->move_to_zero([this, cmdheader](int32_t exec_status, int32_t dx, int32_t dy) { |
|
|
|
|
|
osDelay(5); // 用来保证回执消息在前面
|
|
|
ZLOGI(TAG, "kcmd_xy_robot_ctrl_move_to_zero exec_status:%d dx:%d dy:%d", exec_status, dx, dy); |
|
|
ZLOGI(TAG, "kcmd_xy_robot_ctrl_move_to_zero exec_status:%d dx:%d dy:%d", exec_status, dx, dy); |
|
|
kcmd_xy_robot_ctrl_move_to_zero_status_report_t report; |
|
|
|
|
|
|
|
|
kcmd_xy_robot_ctrl_move_to_zero_status_report_t report = {0}; |
|
|
|
|
|
|
|
|
report.id = m_id; |
|
|
report.id = m_id; |
|
|
report.exec_status = exec_status; |
|
|
report.exec_status = exec_status; |
|
|
report.dx = dx; |
|
|
report.dx = dx; |
|
@ -35,8 +37,10 @@ void ZCANXYRobotCtrlModule::onRceivePacket(CanPacketRxBuffer* rxcmd) { |
|
|
PROCESS_PACKET(kcmd_xy_robot_ctrl_move_to_zero_with_calibrate, m_id) { //
|
|
|
PROCESS_PACKET(kcmd_xy_robot_ctrl_move_to_zero_with_calibrate, m_id) { //
|
|
|
errorcode = |
|
|
errorcode = |
|
|
m_xyRobotCtrlModule->move_to_zero_with_calibrate(cmd->x, cmd->y, [this, cmdheader](int32_t exec_status, int32_t zero_shift_x, int32_t zero_shift_y) { |
|
|
m_xyRobotCtrlModule->move_to_zero_with_calibrate(cmd->x, cmd->y, [this, cmdheader](int32_t exec_status, int32_t zero_shift_x, int32_t zero_shift_y) { |
|
|
|
|
|
osDelay(5); // 用来保证回执消息在前面
|
|
|
ZLOGI(TAG, "kcmd_xy_robot_ctrl_move_to_zero_with_calibrate exec_status:%d zero_shift_x:%d zero_shift_y:%d", exec_status, zero_shift_x, zero_shift_y); |
|
|
ZLOGI(TAG, "kcmd_xy_robot_ctrl_move_to_zero_with_calibrate exec_status:%d zero_shift_x:%d zero_shift_y:%d", exec_status, zero_shift_x, zero_shift_y); |
|
|
kcmd_xy_robot_ctrl_move_to_zero_with_calibrate_status_report_t report; |
|
|
|
|
|
|
|
|
kcmd_xy_robot_ctrl_move_to_zero_with_calibrate_status_report_t report = {0}; |
|
|
|
|
|
|
|
|
report.id = m_id; |
|
|
report.id = m_id; |
|
|
report.exec_status = exec_status; |
|
|
report.exec_status = exec_status; |
|
|
report.zero_shift_x = zero_shift_x; |
|
|
report.zero_shift_x = zero_shift_x; |
|
@ -47,8 +51,10 @@ void ZCANXYRobotCtrlModule::onRceivePacket(CanPacketRxBuffer* rxcmd) { |
|
|
END_PROCESS_PACKET(); |
|
|
END_PROCESS_PACKET(); |
|
|
PROCESS_PACKET(kcmd_xy_robot_ctrl_move_to, m_id) { //
|
|
|
PROCESS_PACKET(kcmd_xy_robot_ctrl_move_to, m_id) { //
|
|
|
errorcode = m_xyRobotCtrlModule->move_to(cmd->x, cmd->y, [this, cmdheader](int32_t exec_status, int32_t tox, int32_t toy) { |
|
|
errorcode = m_xyRobotCtrlModule->move_to(cmd->x, cmd->y, [this, cmdheader](int32_t exec_status, int32_t tox, int32_t toy) { |
|
|
|
|
|
osDelay(5); // 用来保证回执消息在前面
|
|
|
ZLOGI(TAG, "kcmd_xy_robot_ctrl_move_to exec_status:%d tox:%d toy:%d", exec_status, tox, toy); |
|
|
ZLOGI(TAG, "kcmd_xy_robot_ctrl_move_to exec_status:%d tox:%d toy:%d", exec_status, tox, toy); |
|
|
kcmd_xy_robot_ctrl_move_to_status_report_t report; |
|
|
|
|
|
|
|
|
kcmd_xy_robot_ctrl_move_to_status_report_t report = {0}; |
|
|
|
|
|
|
|
|
report.id = m_id; |
|
|
report.id = m_id; |
|
|
report.exec_status = exec_status; |
|
|
report.exec_status = exec_status; |
|
|
report.tox = tox; |
|
|
report.tox = tox; |
|
@ -60,7 +66,8 @@ void ZCANXYRobotCtrlModule::onRceivePacket(CanPacketRxBuffer* rxcmd) { |
|
|
PROCESS_PACKET(kcmd_xy_robot_ctrl_move_by, m_id) { //
|
|
|
PROCESS_PACKET(kcmd_xy_robot_ctrl_move_by, m_id) { //
|
|
|
errorcode = m_xyRobotCtrlModule->move_by(cmd->dx, cmd->dy, [this, cmdheader](int32_t exec_status, int32_t tox, int32_t toy) { |
|
|
errorcode = m_xyRobotCtrlModule->move_by(cmd->dx, cmd->dy, [this, cmdheader](int32_t exec_status, int32_t tox, int32_t toy) { |
|
|
ZLOGI(TAG, "kcmd_xy_robot_ctrl_move_by exec_status:%d tox:%d toy:%d", exec_status, tox, toy); |
|
|
ZLOGI(TAG, "kcmd_xy_robot_ctrl_move_by exec_status:%d tox:%d toy:%d", exec_status, tox, toy); |
|
|
kcmd_xy_robot_ctrl_move_by_status_report_t report; |
|
|
|
|
|
|
|
|
kcmd_xy_robot_ctrl_move_by_status_report_t report = {0}; |
|
|
|
|
|
|
|
|
report.id = m_id; |
|
|
report.id = m_id; |
|
|
report.exec_status = exec_status; |
|
|
report.exec_status = exec_status; |
|
|
report.tox = tox; |
|
|
report.tox = tox; |
|
|