Browse Source

update

master
zhaohe 2 years ago
parent
commit
84960d9e38
  1. 3
      components/step_motor_ctrl_module/step_motor_ctrl_module.cpp
  2. 3
      components/step_motor_ctrl_module/step_motor_ctrl_module.hpp
  3. 6
      components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp
  4. 2
      components/xy_robot_ctrl_module/xy_robot_ctrl_module.hpp

3
components/step_motor_ctrl_module/step_motor_ctrl_module.cpp

@ -779,6 +779,9 @@ int32_t StepMotorCtrlModule::motor_move_to_zero_backward(int32_t findzerospeed,
return move_to_zero(nullptr);
}
int32_t StepMotorCtrlModule::motor_move_to_zero_forward_and_calculated_shift(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) { return err::koperation_not_support; }
int32_t StepMotorCtrlModule::motor_move_to_zero_backward_and_calculated_shift(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) { return move_to_zero_with_calibrate(0, nullptr); }
int32_t StepMotorCtrlModule::motor_read_pos(int32_t* pos) {
int32_t xnow = 0;
getnowpos(xnow);

3
components/step_motor_ctrl_module/step_motor_ctrl_module.hpp

@ -141,6 +141,9 @@ class StepMotorCtrlModule : public I_StepMotorCtrlModule, public ZIModule, publi
virtual int32_t motor_read_pos(int32_t* pos) override;
virtual int32_t motor_move_to_zero_forward_and_calculated_shift(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) override;
virtual int32_t motor_move_to_zero_backward_and_calculated_shift(int32_t findzerospeed, int32_t findzeroedge_speed, int32_t acc, int32_t overtime) override;
private:
void active_cfg();

6
components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp

@ -694,3 +694,9 @@ int32_t XYRobotCtrlModule::xymotor_enable(int32_t varenable) {
int32_t XYRobotCtrlModule::xymotor_move_by(int32_t dx, int32_t dy, int32_t motor_velocity) { return move_by(dx, dy, motor_velocity, nullptr); }
int32_t XYRobotCtrlModule::xymotor_move_to(int32_t x, int32_t y, int32_t motor_velocity) { return move_to(x, y, motor_velocity, nullptr); }
int32_t XYRobotCtrlModule::xymotor_move_to_zero() { return move_to_zero(nullptr); }
int32_t XYRobotCtrlModule::xymotor_move_to_zero_and_calculated_shift() { return move_to_zero_with_calibrate(0, 0, nullptr); }
int32_t XYRobotCtrlModule::xymotor_read_pos(int32_t* x, int32_t* y) {
getnowpos(*x, *y);
return 0;
}

2
components/xy_robot_ctrl_module/xy_robot_ctrl_module.hpp

@ -90,6 +90,8 @@ class XYRobotCtrlModule : public I_XYRobotCtrlModule, public ZIXYMotor, public Z
virtual int32_t xymotor_move_by(int32_t dx, int32_t dy, int32_t motor_velocity);
virtual int32_t xymotor_move_to(int32_t x, int32_t y, int32_t motor_velocity);
virtual int32_t xymotor_move_to_zero();
virtual int32_t xymotor_move_to_zero_and_calculated_shift() { return err::koperation_not_support; }
virtual int32_t xymotor_read_pos(int32_t* x, int32_t* y) { return err::koperation_not_support; }
private:
virtual int32_t _module_set_or_get_param(bool set, int32_t param_id, int32_t& param_value);

Loading…
Cancel
Save