|
GKD.RoboCtrl
RoboMaster Linux 电控:异步 IO、设备驱动与机器人控制
|
开火控制 更多...
#include <shoot.h>


类 | |
| struct | info_type |
| 发射器初始化参数。 更多... | |
Public 成员函数 | |
| std::string | desc () const |
| roboctrl::awaitable< void > | task () |
| 周期更新摩擦轮和拨弹电机输出。 | |
| bool | init (const info_type &info) |
| 绑定发射器所需电机并初始化内部状态。 | |
| bool | init (const info_type &info, device::motor_base &left, device::motor_base &right, device::motor_base &trigger) |
| void | start () |
| roboctrl::awaitable< void > | update (fp32 dt) |
| void | set_enabled (bool enabled) |
| void | set_fire_permitted (bool permitted) |
| bool | fire_allowed () const |
| void | set_firing (bool state) |
| 请求开始或停止拨弹。 | |
| bool | firing () const |
| void | set_friction_enabled (bool state) |
| 请求启用或停止摩擦轮。 | |
| bool | friction_enabled () const |
| bool | friction_ready () const |
| 判断摩擦轮是否达到可发射的准备速度。 | |
Public 成员函数 继承自 roboctrl::utils::singleton_base< shoot > | |
| singleton_base (const singleton_base &)=delete | |
| singleton_base & | operator= (const singleton_base &)=delete |
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 |
额外继承的成员函数 | |
静态 Public 成员函数 继承自 roboctrl::utils::singleton_base< shoot > | |
| static shoot & | instance () |
| 获取单例实例 | |
Protected 成员函数 继承自 roboctrl::log::logable< shoot > | |
| 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日志 | |
| bool shoot::friction_ready | ( | ) | const |
| bool shoot::init | ( | const info_type & | info | ) |
| bool shoot::init | ( | const info_type & | info, |
| device::motor_base & | left, | ||
| device::motor_base & | right, | ||
| device::motor_base & | trigger | ||
| ) |
| void shoot::set_enabled | ( | bool | enabled | ) |
Robot owns this gate; only these bound actuators are enabled.
引用了 roboctrl::utils::ramp< T >::reset() , 以及 roboctrl::async::shutdown_requested().
| roboctrl::awaitable< void > shoot::task | ( | ) |
| roboctrl::awaitable< void > shoot::update | ( | fp32 | dt | ) |
One nonblocking control cycle, also usable by hardware-free simulation.
引用了 friction_ready(), roboctrl::log::logable< shoot >::log_warn(), roboctrl::device::device_base::offline(), roboctrl::utils::ramp< T >::reset(), roboctrl::device::motor_base::rpm(), roboctrl::device::motor_base::set(), roboctrl::device::motor_base::set_angle_speed(), roboctrl::utils::ramp< T >::state() , 以及 roboctrl::utils::ramp< T >::update().
被这些函数引用 task().