mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
uavcan_v1: add dynamic mixing support
This commit is contained in:
parent
ae15ad14a8
commit
0871b7974d
@ -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
|
||||
|
||||
@ -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()
|
||||
_sub_manager.updateParams();
|
||||
|
||||
_mixing_output.updateParams();
|
||||
|
||||
_mixing_output.mixingOutput().updateSubscriptions(false, false);
|
||||
}
|
||||
|
||||
perf_begin(_cycle_perf);
|
||||
@ -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
Normal file
11
src/drivers/uavcan_v1/module.yaml
Normal file
@ -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…
x
Reference in New Issue
Block a user