Browse Source

uavcan_v1: add dynamic mixing support

master
Beat Küng 3 years ago committed by Daniel Agar
parent
commit
0871b7974d
  1. 2
      src/drivers/uavcan_v1/CMakeLists.txt
  2. 6
      src/drivers/uavcan_v1/Uavcan.cpp
  3. 11
      src/drivers/uavcan_v1/module.yaml

2
src/drivers/uavcan_v1/CMakeLists.txt

@ -127,6 +127,8 @@ px4_add_module( @@ -127,6 +127,8 @@ px4_add_module(
o1heap/o1heap.h
${LIBCANARD_DIR}/libcanard/canard.c
${LIBCANARD_DIR}/libcanard/canard.h
MODULE_CONFIG
module.yaml
DEPENDS
git_libcanard
git_public_regulated_data_types

6
src/drivers/uavcan_v1/Uavcan.cpp

@ -115,8 +115,6 @@ UavcanNode::UavcanNode(CanardInterface *interface, uint32_t node_id) : @@ -115,8 +115,6 @@ UavcanNode::UavcanNode(CanardInterface *interface, uint32_t node_id) :
_pub_manager.updateParams();
_sub_manager.subscribe();
_mixing_output.mixingOutput().updateSubscriptions(false, false);
}
UavcanNode::~UavcanNode()
@ -218,8 +216,6 @@ void UavcanNode::Run() @@ -218,8 +216,6 @@ void UavcanNode::Run()
_sub_manager.updateParams();
_mixing_output.updateParams();
_mixing_output.mixingOutput().updateSubscriptions(false, false);
}
perf_begin(_cycle_perf);
@ -521,6 +517,6 @@ void UavcanMixingInterface::Run() @@ -521,6 +517,6 @@ void UavcanMixingInterface::Run()
{
pthread_mutex_lock(&_node_mutex);
_mixing_output.update();
_mixing_output.updateSubscriptions(false, false);
_mixing_output.updateSubscriptions();
pthread_mutex_unlock(&_node_mutex);
}

11
src/drivers/uavcan_v1/module.yaml

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
module_name: UAVCANv1
actuator_output:
output_groups:
- param_prefix: UCAN1_ESC
channel_label: 'UAVCAN ESC'
standard_params:
min: { min: 0, max: 8191, default: 1 }
max: { min: 0, max: 8191, default: 8191 }
failsafe: { min: 0, max: 8191 }
num_channels: 16
Loading…
Cancel
Save