Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ 增加海康机器人 RS-232 光源控制库,目前仅支持 LEAD 型号 #198

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

zhaoxi-scut
Copy link
Member

Pull Request 合并请求准备清单

详情参见此处

  • 我同意在 Apache 2 开源许可下为本项目做贡献
  • 此 pull request 是在正确的分支上提出的
  • 此 pull request 有对应的错误报告或其他待改进的内容
  • 我本地的 RMVL 进行了单元测试、性能测试,有对应的测试数据
  • 我提交的 feature 有很好的文档记录,并且可以使用 CMake 项目构建示例代码

具体内容

  • 增加海康机器人 RS-232 光源控制库 hik_light_control

本地测试

C++ 简易测试代码

#include <rmvl/light/hik_light_control.h>

int main()
{
    rm::LightConfig cfg{};
    cfg.handle_mode = rm::LightHandleMode::Serial;
    rm::HikLightController lc(cfg, rm::HikProductID::LEAD, "/dev/ttyUSB0");

    if (!lc.set(1, 50))
        ERROR_("set failed");
}

Python 简易测试代码

import rm

cfg = rm.LightConfig()
cfg.handle_mode = rm.LightHandleMode.Serial
lc = rm.HikLightController(cfg, rm.HikProductID.LEAD, "/dev/ttyUSB0")

if not lc.set(1, 50)
    print("set failed");

@zhaoxi-scut zhaoxi-scut added the feature 新特性、新功能 label Nov 26, 2024
@zhaoxi-scut zhaoxi-scut added this to the 2.2.0 milestone Nov 26, 2024
@TooPretty0108 TooPretty0108 merged commit 0699b58 into cv-rmvl:2.x Nov 26, 2024
6 checks passed
@zhaoxi-scut zhaoxi-scut deleted the hik-light-control-support branch November 26, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 新特性、新功能
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants