mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 07:23:34 +08:00
ESC command transfer priority assigned a high value. This change is not directly related to the current PR, but this change seems minor enough to be pulled in with it.
This commit is contained in:
committed by
Lorenz Meier
parent
1a64b5fa01
commit
11a31d5ecb
@@ -49,6 +49,8 @@ UavcanEscController::UavcanEscController(uavcan::INode &node) :
|
|||||||
_uavcan_sub_status(node),
|
_uavcan_sub_status(node),
|
||||||
_orb_timer(node)
|
_orb_timer(node)
|
||||||
{
|
{
|
||||||
|
_uavcan_pub_raw_cmd.setPriority(UAVCAN_COMMAND_TRANSFER_PRIORITY);
|
||||||
|
|
||||||
if (_perfcnt_invalid_input == nullptr) {
|
if (_perfcnt_invalid_input == nullptr) {
|
||||||
errx(1, "uavcan: couldn't allocate _perfcnt_invalid_input");
|
errx(1, "uavcan: couldn't allocate _perfcnt_invalid_input");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ private:
|
|||||||
|
|
||||||
static constexpr unsigned MAX_RATE_HZ = 200; ///< XXX make this configurable
|
static constexpr unsigned MAX_RATE_HZ = 200; ///< XXX make this configurable
|
||||||
static constexpr unsigned ESC_STATUS_UPDATE_RATE_HZ = 10;
|
static constexpr unsigned ESC_STATUS_UPDATE_RATE_HZ = 10;
|
||||||
|
static constexpr unsigned UAVCAN_COMMAND_TRANSFER_PRIORITY = 5; ///< 0..31, inclusive, 0 - highest, 31 - lowest
|
||||||
|
|
||||||
typedef uavcan::MethodBinder<UavcanEscController *,
|
typedef uavcan::MethodBinder<UavcanEscController *,
|
||||||
void (UavcanEscController::*)(const uavcan::ReceivedDataStructure<uavcan::equipment::esc::Status>&)>
|
void (UavcanEscController::*)(const uavcan::ReceivedDataStructure<uavcan::equipment::esc::Status>&)>
|
||||||
|
|||||||
Reference in New Issue
Block a user