Browse Source

update

master
zhaohe 1 year ago
parent
commit
775c939fac
  1. 7
      components/step_motor_ctrl_module/step_motor_ctrl_module.cpp
  2. 2
      components/step_motor_ctrl_module/step_motor_ctrl_module.hpp

7
components/step_motor_ctrl_module/step_motor_ctrl_module.cpp

@ -210,6 +210,13 @@ int32_t StepMotorCtrlModule::step_motor_read_tmc2160_state(int32_t* status) {
return 0;
};
int32_t StepMotorCtrlModule::step_motor_read_io_index_in_stm32(int32_t ioindex, int32_t* index_in_stm32) {
if (ioindex < 0 || ioindex >= m_nio) {
return err::kstep_motor_ioindex_out_of_range;
}
return 0;
}
/***********************************************************************************************************************
* INTER *
***********************************************************************************************************************/

2
components/step_motor_ctrl_module/step_motor_ctrl_module.hpp

@ -93,6 +93,8 @@ class StepMotorCtrlModule : public ZIModule, public ZIStepMotor {
virtual int32_t step_motor_read_tmc2160_status(int32_t* status) override;
virtual int32_t step_motor_read_tmc2160_state(int32_t* status) override;
virtual int32_t step_motor_read_io_index_in_stm32(int32_t ioindex, int32_t* index_in_stm32) override;
public:
IStepperMotor* getMotor() { return m_stepM1; }
config_t* getCfg() { return &m_cfg; }

Loading…
Cancel
Save