diff --git a/components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp b/components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp index 05e04b0..49fd8cd 100644 --- a/components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp +++ b/components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp @@ -9,8 +9,7 @@ using namespace std; void XYRobotCtrlModule::initialize(IStepperMotor* stepM1, // IStepperMotor* stepM2, // ZGPIO* Xgpio, // - ZGPIO* Ygpio, // - float scale) { + ZGPIO* Ygpio) { m_stepM1 = stepM1; m_stepM2 = stepM2; m_Xgpio = Xgpio; @@ -19,9 +18,10 @@ void XYRobotCtrlModule::initialize(IStepperMotor* stepM1, // ZASSERT(m_stepM2); ZASSERT(m_Xgpio); ZASSERT(m_Ygpio); - m_stepM1->setScale(scale); - m_stepM2->setScale(scale); + m_lock.init(); + create_default_cfg(m_cfg); + set_base_param(m_cfg); // m_statu_lock.init(); m_thread.init("XYRobotCtrlModule", 1024, osPriorityNormal); } 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 c48593c..43912a3 100644 --- a/components/xy_robot_ctrl_module/xy_robot_ctrl_module.hpp +++ b/components/xy_robot_ctrl_module/xy_robot_ctrl_module.hpp @@ -32,10 +32,9 @@ class XYRobotCtrlModule : public I_XYRobotCtrlModule { public: void initialize(IStepperMotor* stepM1, // - IStepperMotor* stepM2, // - ZGPIO* Xgpio, // - ZGPIO* Ygpio, // - float scale); + IStepperMotor* stepM2, // + ZGPIO* Xgpio, // + ZGPIO* Ygpio); virtual int32_t move_to(int32_t x, int32_t y, int speed, action_cb_status_t status_cb) override; virtual int32_t move_by(int32_t dx, int32_t dy, action_cb_status_t status_cb) override;