PX4 Firmware
PX4 Autopilot Software http://px4.io
|
The UavcanHardpointController class. More...
#include <hardpoint.hpp>
Public Member Functions | |
UavcanHardpointController (uavcan::INode &node) | |
~UavcanHardpointController () | |
int | init () |
void | set_command (uint8_t hardpoint_id, uint16_t command) |
Private Types | |
typedef uavcan::MethodBinder< UavcanHardpointController *, void(UavcanHardpointController::*)(const uavcan::TimerEvent &)> | TimerCbBinder |
Private Member Functions | |
void | periodic_update (const uavcan::TimerEvent &) |
Private Attributes | |
uavcan::equipment::hardpoint::Command | _cmd |
pthread_mutex_t | _node_mutex |
uavcan::INode & | _node |
uavcan::Publisher< uavcan::equipment::hardpoint::Command > | _uavcan_pub_raw_cmd |
uavcan::TimerEventForwarder< TimerCbBinder > | _timer |
Static Private Attributes | |
static constexpr unsigned | MAX_RATE_HZ = 1 |
XXX make this configurable. More... | |
The UavcanHardpointController class.
Definition at line 51 of file hardpoint.hpp.
|
private |
Definition at line 79 of file hardpoint.hpp.
UavcanHardpointController::UavcanHardpointController | ( | uavcan::INode & | node | ) |
Definition at line 43 of file hardpoint.cpp.
References _uavcan_pub_raw_cmd.
UavcanHardpointController::~UavcanHardpointController | ( | ) |
Definition at line 51 of file hardpoint.cpp.
int UavcanHardpointController::init | ( | ) |
Definition at line 57 of file hardpoint.cpp.
References _timer, and periodic_update().
Referenced by UavcanNode::init().
|
private |
Definition at line 87 of file hardpoint.cpp.
References _cmd, and _uavcan_pub_raw_cmd.
Referenced by init().
void UavcanHardpointController::set_command | ( | uint8_t | hardpoint_id, |
uint16_t | command | ||
) |
Definition at line 67 of file hardpoint.cpp.
References _cmd, _timer, _uavcan_pub_raw_cmd, command, and MAX_RATE_HZ.
Referenced by UavcanNode::hardpoint_controller_set(), and UavcanNode::ioctl().
|
private |
Definition at line 74 of file hardpoint.hpp.
Referenced by periodic_update(), and set_command().
|
private |
Definition at line 85 of file hardpoint.hpp.
|
private |
Definition at line 81 of file hardpoint.hpp.
|
private |
Definition at line 87 of file hardpoint.hpp.
Referenced by init(), and set_command().
|
private |
Definition at line 86 of file hardpoint.hpp.
Referenced by periodic_update(), set_command(), and UavcanHardpointController().
|
staticprivate |
XXX make this configurable.
Definition at line 72 of file hardpoint.hpp.
Referenced by set_command().