|
GKD.RoboCtrl
RoboMaster Linux 电控:异步 IO、设备驱动与机器人控制
|
遥控器设备,负责解析上报报文并发布输入状态 更多...
遥控器设备,负责解析上报报文并发布输入状态
在文件 controlpad.h 第 58 行定义.
#include <controlpad.h>


类 | |
| struct | info_type |
| 遥控器实例化参数。 更多... | |
Public 成员函数 | |
| std::string | desc () const |
| 返回遥控器及其串口名称。 | |
| control_pad (const info_type &info) | |
| 构造遥控器设备并注册串口回调。 | |
| control_pad_state | state () const noexcept |
| 获取最近一次有效报文解析出的输入快照。 | |
| fp32 | pitch_wheel () const noexcept |
| 获取云台俯仰拨轮原始值。 | |
| template<callback_fn< control_pad_state > F> | |
| void | on_update (F &&callback) |
| 注册输入更新回调。 | |
Public 成员函数 继承自 roboctrl::device::device_base | |
| device_base (const std::chrono::nanoseconds offline_timeout) | |
| bool | offline () const |
| 判断设备是否离线 | |
| void | tick () |
| 更新心跳时间 | |
| awaitable< void > | task () |
| 默认的task | |
Public 成员函数 继承自 roboctrl::utils::immovable_base | |
| immovable_base (immovable_base &&)=delete | |
| immovable_base & | operator= (immovable_base &&)=delete |
Public 成员函数 继承自 roboctrl::utils::not_copyable_base | |
| not_copyable_base (const not_copyable_base &)=delete | |
| not_copyable_base & | operator= (const not_copyable_base &)=delete |
额外继承的成员函数 | |
Protected 成员函数 继承自 roboctrl::log::logable< control_pad > | |
| void | log (log_level level, std::format_string< Args... > fmt, Args &&...args) const |
| 输出日志 | |
| void | log_debug (std::format_string< Args... > fmt, Args &&...args) const |
| 输出debug日志 | |
| void | log_info (std::format_string< Args... > fmt, Args &&...args) const |
| 输出info日志 | |
| void | log_warn (std::format_string< Args... > fmt, Args &&...args) const |
| 输出warn日志 | |
| void | log_error (std::format_string< Args... > fmt, Args &&...args) const |
| 输出error日志 | |
Protected 属性 继承自 roboctrl::device::device_base | |
| const std::chrono::nanoseconds | offline_timeout_ |
| 设备离线超时时间 | |
| std::chrono::nanoseconds | tick_time_ |
| 上次心跳时间 | |
| bool | terminated_ = false |
| control_pad::control_pad | ( | const info_type & | info | ) |
构造遥控器设备并注册串口回调。
在文件 controlpad.cpp 第 38 行定义.
引用了 roboctrl::log::logable< control_pad >::log_warn(), state() , 以及 roboctrl::device::device_base::tick().
|
inline |
返回遥控器及其串口名称。
在文件 controlpad.h 第 72 行定义.
|
inline |
注册输入更新回调。
在文件 controlpad.h 第 87 行定义.
|
inlinenoexcept |
获取云台俯仰拨轮原始值。
在文件 controlpad.h 第 83 行定义.
|
inlinenoexcept |