From 3b147e354d59bab93f73ce91671d3363ee064877 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Wed, 26 Jun 2024 15:34:52 +0800 Subject: [PATCH] update --- components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; }