#include <esc.hpp>
|
void | esc_status_sub_cb (const uavcan::ReceivedDataStructure< uavcan::equipment::esc::Status > &msg) |
| ESC status message reception will be reported via this callback. More...
|
|
void | orb_pub_timer_cb (const uavcan::TimerEvent &event) |
| ESC status will be published to ORB from this callback (fixed rate). More...
|
|
uint8_t | check_escs_status () |
| Checks all the ESCs freshness based on timestamp, if an ESC exceeds the timeout then is flagged offline. More...
|
|
Definition at line 57 of file esc.hpp.
◆ StatusCbBinder
◆ TimerCbBinder
◆ UavcanEscController()
UavcanEscController::UavcanEscController |
( |
uavcan::INode & |
node | ) |
|
◆ ~UavcanEscController()
UavcanEscController::~UavcanEscController |
( |
| ) |
|
◆ check_escs_status()
uint8_t UavcanEscController::check_escs_status |
( |
| ) |
|
|
private |
◆ esc_status_sub_cb()
void UavcanEscController::esc_status_sub_cb |
( |
const uavcan::ReceivedDataStructure< uavcan::equipment::esc::Status > & |
msg | ) |
|
|
private |
◆ init()
int UavcanEscController::init |
( |
| ) |
|
◆ max_output_value()
static int UavcanEscController::max_output_value |
( |
| ) |
|
|
inlinestatic |
◆ orb_pub_timer_cb()
void UavcanEscController::orb_pub_timer_cb |
( |
const uavcan::TimerEvent & |
event | ) |
|
|
private |
ESC status will be published to ORB from this callback (fixed rate).
Definition at line 159 of file esc.cpp.
References _esc_status, _esc_status_pub, _rotor_count, check_escs_status(), esc_status_s::counter, esc_status_s::esc_connectiontype, esc_status_s::esc_count, esc_status_s::esc_online_flags, hrt_absolute_time(), uORB::PublicationMulti< T >::publish(), and esc_status_s::timestamp.
Referenced by init(), and max_output_value().
◆ set_rotor_count()
void UavcanEscController::set_rotor_count |
( |
uint8_t |
count | ) |
|
|
inline |
◆ update_outputs()
void UavcanEscController::update_outputs |
( |
bool |
stop_motors, |
|
|
uint16_t |
outputs[MAX_ACTUATORS], |
|
|
unsigned |
num_outputs |
|
) |
| |
◆ _esc_status
◆ _esc_status_pub
◆ _max_number_of_nonzero_outputs
uint8_t UavcanEscController::_max_number_of_nonzero_outputs {0} |
|
private |
◆ _node
uavcan::INode& UavcanEscController::_node |
|
private |
◆ _orb_timer
uavcan::TimerEventForwarder<TimerCbBinder> UavcanEscController::_orb_timer |
|
private |
◆ _prev_cmd_pub
uavcan::MonotonicTime UavcanEscController::_prev_cmd_pub |
|
private |
◆ _rotor_count
uint8_t UavcanEscController::_rotor_count {0} |
|
private |
◆ _uavcan_pub_raw_cmd
uavcan::Publisher<uavcan::equipment::esc::RawCommand> UavcanEscController::_uavcan_pub_raw_cmd |
|
private |
◆ _uavcan_sub_status
uavcan::Subscriber<uavcan::equipment::esc::Status, StatusCbBinder> UavcanEscController::_uavcan_sub_status |
|
private |
◆ DISARMED_OUTPUT_VALUE
constexpr uint16_t UavcanEscController::DISARMED_OUTPUT_VALUE = UINT16_MAX |
|
static |
◆ ESC_STATUS_UPDATE_RATE_HZ
constexpr unsigned UavcanEscController::ESC_STATUS_UPDATE_RATE_HZ = 10 |
|
staticprivate |
◆ MAX_ACTUATORS
constexpr int UavcanEscController::MAX_ACTUATORS = MixingOutput::MAX_ACTUATORS |
|
static |
◆ MAX_RATE_HZ
constexpr unsigned UavcanEscController::MAX_RATE_HZ = 200 |
|
static |
◆ UAVCAN_COMMAND_TRANSFER_PRIORITY
constexpr unsigned UavcanEscController::UAVCAN_COMMAND_TRANSFER_PRIORITY = 5 |
|
staticprivate |
The documentation for this class was generated from the following files:
- src/drivers/uavcan/actuators/esc.hpp
- src/drivers/uavcan/actuators/esc.cpp