Browse Source

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.

sbg
Pavel Kirienko 9 years ago committed by Lorenz Meier
parent
commit
11a31d5ecb
  1. 2
      src/modules/uavcan/actuators/esc.cpp
  2. 1
      src/modules/uavcan/actuators/esc.hpp

2
src/modules/uavcan/actuators/esc.cpp

@ -49,6 +49,8 @@ UavcanEscController::UavcanEscController(uavcan::INode &node) : @@ -49,6 +49,8 @@ UavcanEscController::UavcanEscController(uavcan::INode &node) :
_uavcan_sub_status(node),
_orb_timer(node)
{
_uavcan_pub_raw_cmd.setPriority(UAVCAN_COMMAND_TRANSFER_PRIORITY);
if (_perfcnt_invalid_input == nullptr) {
errx(1, "uavcan: couldn't allocate _perfcnt_invalid_input");
}

1
src/modules/uavcan/actuators/esc.hpp

@ -78,6 +78,7 @@ private: @@ -78,6 +78,7 @@ private:
static constexpr unsigned MAX_RATE_HZ = 200; ///< XXX make this configurable
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 *,
void (UavcanEscController::*)(const uavcan::ReceivedDataStructure<uavcan::equipment::esc::Status>&)>

Loading…
Cancel
Save