From 6167c264481c13e5a960a84c7321670a49654c06 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Fri, 29 Sep 2023 15:56:37 +0800 Subject: [PATCH] update --- .../step_motor_ctrl_module.hpp | 38 -------------------- .../xy_robot_ctrl_module/xy_robot_ctrl_module.hpp | 42 ---------------------- 2 files changed, 80 deletions(-) diff --git a/components/step_motor_ctrl_module/step_motor_ctrl_module.hpp b/components/step_motor_ctrl_module/step_motor_ctrl_module.hpp index 39c8c36..d277dee 100644 --- a/components/step_motor_ctrl_module/step_motor_ctrl_module.hpp +++ b/components/step_motor_ctrl_module/step_motor_ctrl_module.hpp @@ -46,44 +46,6 @@ class StepMotorCtrlModule : public I_StepMotorCtrlModule { public: void initialize(int id, IStepperMotor* stepM, ZGPIO* zero_gpio, ZGPIO* end_gpio); -#if 0 - int32_t set_current_pos(int32_t pos); - int32_t set_distance_scale(float distance_scale); - int32_t set_ihold_irun_iholddelay(uint8_t ihold, uint8_t irun, uint16_t iholddelay); - int32_t set_acc(int32_t acc); - int32_t set_dec(int32_t dec); - int32_t set_speed(int32_t speed); - int32_t set_shaft(bool shaft); - int32_t set_runtozero_max_distance(int32_t distance); - int32_t set_runtozero_speed(int32_t speed); - int32_t set_runtozero_dec(int32_t dec); - int32_t set_runtozero_leave_away_zero_distance(int32_t distance); - int32_t set_zero_shift(int32_t shift); - int32_t set_break_dec(int32_t dec); - - void dumpcfg(const char* tag); - - int32_t enable(bool venable); - int32_t stop(); - int32_t brake(); - - /******************************************************************************* - * ACTION * - *******************************************************************************/ - int32_t move_to(int32_t pos, function status_cb); - int32_t move_by(int32_t dpos, function status_cb); - int32_t move_to_zero(function status_cb); - int32_t move_to_zero_with_calibrate(int32_t nowpos, function status_cb); - // int32_t rotate(uint8_t direction, int32_t velocity, int32_t acc); - - /******************************************************************************* - * READ * - *******************************************************************************/ - - int32_t read_status(uint8_t* module_statu, int32_t* pos, int32_t* velocity); - int32_t read_gpio_status(bool* zeroio, bool* endio); - int32_t get_zero_shift(int32_t* pos); -#endif virtual int32_t move_to(int32_t x, function status_cb) override; virtual int32_t move_by(int32_t dx, function status_cb) override; diff --git a/components/xy_robot_ctrl_module/xy_robot_ctrl_module.hpp b/components/xy_robot_ctrl_module/xy_robot_ctrl_module.hpp index 8e89222..8542565 100644 --- a/components/xy_robot_ctrl_module/xy_robot_ctrl_module.hpp +++ b/components/xy_robot_ctrl_module/xy_robot_ctrl_module.hpp @@ -83,48 +83,6 @@ class XYRobotCtrlModule : public I_XYRobotCtrlModule { int32_t set_run_param( run_param_t& param); int32_t set_run_to_zero_param( run_to_zero_param_t& param); int32_t set_warning_limit_param( warning_limit_param_t& param); -#if 0 - int32_t set_acc(int32_t acc); - int32_t set_dec(int32_t dec); - int32_t set_speed(int32_t speed); - int32_t set_zero_robottype(RobotType_t robot_type); - int32_t set_shaft(bool x_shaft, bool y_shaft); - int32_t set_zero_shift(int32_t x, int32_t y); - int32_t set_runtozero_max_distance(int32_t maxX, int32_t maxY); - int32_t set_runtozero_speed(int32_t speed); - int32_t set_runtozero_dec(int32_t dec); - int32_t set_runtozero_leave_away_zero_distance(int32_t maxXY); - int32_t set_distance_scale(float distance_scale); - int32_t set_current_pos(int32_t x, int32_t y); - int32_t set_ihold_irun_iholddelay(uint8_t ihold, uint8_t irun, uint16_t iholddelay); - - void read_version(kcmd_xy_robot_ctrl_read_version_cmd_t* cmd, kcmd_xy_robot_ctrl_read_version_ack_t* ack); - void read_status(kcmd_xy_robot_ctrl_read_status_cmd_t* cmd, kcmd_xy_robot_ctrl_read_status_ack_t* ack); - void read_debug_info(kcmd_xy_robot_ctrl_read_debug_info_cmd_t* cmd, kcmd_xy_robot_ctrl_read_debug_info_ack_t* ack); - void set_run_param(kcmd_xy_robot_ctrl_set_run_param_cmd_t* cmd, kcmd_xy_robot_ctrl_set_run_param_ack_t* ack); - void set_warning_limit_param(kcmd_xy_robot_ctrl_set_warning_limit_param_cmd_t* cmd, kcmd_xy_robot_ctrl_set_warning_limit_param_ack_t* ack); - void set_run_to_zero_param(kcmd_xy_robot_ctrl_set_run_to_zero_param_cmd_t* cmd, kcmd_xy_robot_ctrl_set_run_to_zero_param_ack_t* ack); - - void dumpcfg(const char* tag); - - int32_t enable(bool venable); - int32_t stop(); - - /******************************************************************************* - * ACTION * - *******************************************************************************/ - int32_t move_to(int32_t x, int32_t y, function status_cb); - int32_t move_by(int32_t dx, int32_t dy, function status_cb); - int32_t move_to_zero(function status_cb); - int32_t move_to_zero_with_calibrate(int32_t x, int32_t y, function status_cb); - - /******************************************************************************* - * READ * - *******************************************************************************/ - - int32_t read_status(uint8_t* module_statu, int32_t* x, int32_t* y); - int32_t get_zero_shift(int32_t* x, int32_t* y); -#endif void loop();