From 918981e4b998fa87b498ea06a1d4ac6c37d372c1 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Thu, 1 Aug 2024 12:49:44 +0800 Subject: [PATCH] update --- api/apibasic/errorcode.cpp | 3 +++ api/apibasic/errorcode.hpp | 2 ++ api/apibasic/reg_index.cpp | 2 ++ api/apibasic/reg_index.hpp | 2 ++ api/zi_motor.hpp | 1 + 5 files changed, 10 insertions(+) diff --git a/api/apibasic/errorcode.cpp b/api/apibasic/errorcode.cpp index 216d74b..86d3255 100644 --- a/api/apibasic/errorcode.cpp +++ b/api/apibasic/errorcode.cpp @@ -36,6 +36,8 @@ static ecode_table_item_t table[] = { ERR_ITERM(kxymotor_y_find_zero_edge_fail), ERR_ITERM(kxymotor_not_enable), ERR_ITERM(kxymotor_target_pos_outof_range), + ERR_ITERM(kxymotor_not_move_to_zero), + ERR_ITERM(kpipette_error_NoError), ERR_ITERM(kpipette_error_InitFail), ERR_ITERM(kpipette_error_InvalidCmd), @@ -74,6 +76,7 @@ static ecode_table_item_t table[] = { ERR_ITERM(kstep_motor_uv_cp), ERR_ITERM(kstep_motor_not_found_point_edge), ERR_ITERM(kstep_motor_lost_step), + ERR_ITERM(kstep_motor_not_move_to_zero), ERR_ITERM(kmini_servo_not_enable), ERR_ITERM(kmini_servo_mode_not_support), ERR_ITERM(kfan_hardware_fault), diff --git a/api/apibasic/errorcode.hpp b/api/apibasic/errorcode.hpp index 605477a..e96ac5e 100644 --- a/api/apibasic/errorcode.hpp +++ b/api/apibasic/errorcode.hpp @@ -35,6 +35,7 @@ typedef enum { kxymotor_y_find_zero_edge_fail = 1307, kxymotor_not_enable = 1308, kxymotor_target_pos_outof_range = 1309, + kxymotor_not_move_to_zero = 1310, kpipette_error_NoError = 1400, kpipette_error_InitFail = 1401, @@ -76,6 +77,7 @@ typedef enum { kstep_motor_uv_cp = 1609, kstep_motor_not_found_point_edge = 1610, kstep_motor_lost_step = 1611, + kstep_motor_not_move_to_zero = 1612, kmini_servo_not_enable = 1700, kmini_servo_mode_not_support = 1701, diff --git a/api/apibasic/reg_index.cpp b/api/apibasic/reg_index.cpp index e89ebdd..a9526cf 100644 --- a/api/apibasic/reg_index.cpp +++ b/api/apibasic/reg_index.cpp @@ -59,6 +59,7 @@ static reginfo_t table[] = { REG_ITERM(kreg_xyrobot_io_state), REG_ITERM(kreg_xyrobot_is_enable), + REG_ITERM(kreg_xyrobot_has_move_to_zero), REG_ITERM(kreg_xyrobot_robot_type), REG_ITERM(kreg_xyrobot_one_circle_pulse), REG_ITERM(kreg_xyrobot_one_circle_pulse_denominator), @@ -93,6 +94,7 @@ static reginfo_t table[] = { REG_ITERM(kreg_step_motor_pos), REG_ITERM(kreg_step_motor_is_enable), REG_ITERM(kreg_step_motor_dpos), + REG_ITERM(kreg_step_motor_has_move_zero), REG_ITERM(kreg_step_motor_shift), REG_ITERM(kreg_step_motor_shaft), REG_ITERM(kreg_step_motor_one_circle_pulse), diff --git a/api/apibasic/reg_index.hpp b/api/apibasic/reg_index.hpp index aed0cc5..7a313a4 100644 --- a/api/apibasic/reg_index.hpp +++ b/api/apibasic/reg_index.hpp @@ -90,6 +90,7 @@ typedef enum { kreg_xyrobot_io_state = 9900, // kreg_xyrobot_is_enable = 9901, // + kreg_xyrobot_has_move_to_zero = 9902, // kreg_xyrobot_robot_type = 9950, // kreg_xyrobot_one_circle_pulse = 9951, // kreg_xyrobot_one_circle_pulse_denominator = 9952, // @@ -128,6 +129,7 @@ typedef enum { kreg_step_motor_pos = 10101, // 机器人x坐标 kreg_step_motor_is_enable = 10102, // 步进电机是否使能 kreg_step_motor_dpos = 10103, // 执行完上一条指令后的相对位移 + kreg_step_motor_has_move_zero = 10104, // 是否回零 kreg_step_motor_shift = 10150, // x偏移 kreg_step_motor_shaft = 10151, // x轴是否反转 kreg_step_motor_one_circle_pulse = 10152, // x轴一圈脉冲数 diff --git a/api/zi_motor.hpp b/api/zi_motor.hpp index 3eaa615..ba83fc7 100644 --- a/api/zi_motor.hpp +++ b/api/zi_motor.hpp @@ -143,6 +143,7 @@ class ZIStepMotor { virtual int32_t step_motor_easy_reciprocating_motion(int32_t startpos, int32_t endpos, int32_t times) = 0; + /*********************************************************************************************************************** * DEBUG * ***********************************************************************************************************************/