Browse Source

update

master
zhaohe 1 year ago
parent
commit
3b147e354d
  1. 2
      components/xy_robot_ctrl_module/xy_robot_ctrl_module.cpp

2
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) { int32_t XYRobotCtrlModule::xymotor_read_inio(int32_t ioindex, int32_t* val) {
if (ioindex < 0 || ioindex >= m_ngpio) return err::kparam_out_of_range; if (ioindex < 0 || ioindex >= m_ngpio) return err::kparam_out_of_range;
*val = m_gpiotable[ioindex].getState(); *val = m_gpiotable[ioindex].getState();
return 0;
} }
int32_t XYRobotCtrlModule::xymotor_read_inio_index_in_stm32(int32_t ioindex, int32_t* val) { 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; if (ioindex < 0 || ioindex >= m_ngpio) return err::kparam_out_of_range;
*val = m_gpiotable[ioindex].getPin(); *val = m_gpiotable[ioindex].getPin();
return 0;
} }
Loading…
Cancel
Save