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 c19af66..98b3244 100644 --- a/components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp +++ b/components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp @@ -525,8 +525,10 @@ void XYRobotCtrlModule::moveBy(int32_t dx, int32_t dy, int32_t v) { int32_t XYRobotCtrlModule::xymotor_read_inio(int32_t ioindex, int32_t* val) { if (ioindex < 0 || ioindex >= m_ngpio) return err::kparam_out_of_range; *val = m_gpiotable[ioindex].getState(); + return 0; } int32_t XYRobotCtrlModule::xymotor_read_inio_index_in_stm32(int32_t ioindex, int32_t* val) { if (ioindex < 0 || ioindex >= m_ngpio) return err::kparam_out_of_range; *val = m_gpiotable[ioindex].getPin(); + return 0; }