Skip to content

Commit

Permalink
Configurable DI/DO RPC Implement for ARM (#22)
Browse files Browse the repository at this point in the history
* Update build.yml

* feat:Dio features for arm

* fix:bugfix
  • Loading branch information
Cosmoflips authored Jan 11, 2023
1 parent 9b3b929 commit 58a4825
Show file tree
Hide file tree
Showing 8 changed files with 616 additions and 4 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

option(CMAKE_EXPORT_COMPILE_COMMANDS "Export compile command" TRUE)


project(lebai VERSION 1.0.12 LANGUAGES CXX)
project(lebai VERSION 1.0.13 LANGUAGES CXX)
set(PROJECT_NAMESPACE lebai)
message(STATUS "${PROJECT_NAME} version: ${PROJECT_VERSION}")
# message(STATUS "major: ${PROJECT_VERSION_MAJOR}")
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "lebai sdk"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.0.12
PROJECT_NUMBER = 1.0.13

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
28 changes: 28 additions & 0 deletions sdk/include/lebai/robot.hh
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,34 @@ namespace lebai
* @return 返回多个模拟输入数值
*/
std::vector<double> get_ais(std::string device, unsigned int pin, unsigned int num);
/**
* @brief 设置数字端口输出值
* @param pin: 端口号,从 0 开始
* @param value: 待设置的模拟输出值
* @return 若设置成功为true,若当前此端口为输入模式则为false
*/
bool set_dio(unsigned int pin, bool value);
/**
* @brief 设置数字端口模式
* @param pin: 端口号,从 0 开始
* @param value 设置的值,false为输入模式,true为输出模式
* @return 返回是否成功
*/
bool set_dio_mode(unsigned int pin, bool value);
/**
* @brief 获取数字端口输出值
* @param pin: 端口号,从 0 开始
* @param count: 查询的连续端口数
* @return 从pin开始的连续count个端口的当前值
*/
std::vector<bool> get_dios(unsigned int pin, unsigned int count);
/**
* @brief 获取数字端口模式
* @param pin: 端口号,从 0 开始
* @param count:查询的连续端口数
* @return 从pin开始的连续count个端口的当前模式
*/
std::vector<bool> get_dios_mode(unsigned int pin, unsigned int count);
/** @}*/


Expand Down
Loading

0 comments on commit 58a4825

Please sign in to comment.