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 694d2db..f758b9e 100644 --- a/components/step_motor_ctrl_module/step_motor_ctrl_module.hpp +++ b/components/step_motor_ctrl_module/step_motor_ctrl_module.hpp @@ -79,6 +79,10 @@ class StepMotorCtrlModule : public ZIModule, public ZIStepMotor { virtual int32_t step_motor_active_cfg() override; virtual int32_t step_motor_read_io_state(int32_t ioindex, int32_t* state) override; + public: + IStepperMotor* getMotor() { return m_stepM1; } + config_t* getCfg() { return &m_cfg; } + private: void inter_inverse_kinematics(int32_t motor_pos, int32_t& x); void inter_forward_kinematics(int32_t x, int32_t& motor_pos); diff --git a/components/zcancmder/zcan_protocol_parser.hpp b/components/zcancmder/zcan_protocol_parser.hpp index ad2261e..4c7a4a7 100644 --- a/components/zcancmder/zcan_protocol_parser.hpp +++ b/components/zcancmder/zcan_protocol_parser.hpp @@ -39,6 +39,7 @@ class ZCanProtocolParser : public IZCanReceiverListener { void initialize(IZCanReceiver* cancmder); virtual void onRceivePacket(zcr_cmd_header_t* rxcmd, uint8_t* data, int32_t len); void registerModule(ZIModule* module); + ZIModule* getModule(int id) { return m_modulers[id]; } private: void _registerModule(uint16_t id, ZIModule* module);