mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-11 20:23:34 +08:00
* [feat] allowed to assign up to 16 ESC CAN * Update EscStatus.msg lowered down to 12 motors, hardware tested * Update module.yaml lowered down to 12 motors, hardware tested --------- Co-authored-by: klelkov <kon.lelkov@yandex.ru> Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
101 lines
2.9 KiB
YAML
101 lines
2.9 KiB
YAML
__max_num_uavcan_lights: &max_num_uavcan_lights 2 # NOTE: This value must match MAX_NUM_UAVCAN_LIGHTS in rgbled.hpp
|
|
|
|
|
|
module_name: UAVCAN
|
|
parameters:
|
|
- group: UAVCAN
|
|
definitions:
|
|
UAVCAN_ESC_IFACE:
|
|
description:
|
|
short: Which CAN interfaces to output ESC messages on.
|
|
long: |
|
|
Since ESC messages are high priority and sent at a high rate, it is
|
|
recommended to only enable the interfaces that are actually used.
|
|
Otherwise, the ESC messages will arbitrate lower priority messages and
|
|
starve other nodes on the bus.
|
|
type: bitmask
|
|
bit:
|
|
0: CAN1
|
|
1: CAN2
|
|
2: CAN3
|
|
3: CAN4
|
|
4: CAN5
|
|
5: CAN6
|
|
6: CAN7
|
|
7: CAN8
|
|
default: 255
|
|
min: 1
|
|
max: 255
|
|
reboot_required: true
|
|
UAVCAN_LGT_NUM:
|
|
description:
|
|
short: Number of UAVCAN lights to configure
|
|
long: |
|
|
Number of lights to control via UAVCAN LightsCommand messages.
|
|
Set to 0 to disable UAVCAN light control.
|
|
Each light uses two parameters: LGT_IDx for the light_id and LGT_FNx for the function.
|
|
type: int32
|
|
min: 0
|
|
max: *max_num_uavcan_lights
|
|
default: 1
|
|
reboot_required: true
|
|
UAVCAN_LGT_ID${i}:
|
|
description:
|
|
short: Light ${i} ID
|
|
long: |
|
|
specifies the light_id value for light ${i} in UAVCAN LightsCommand messages.
|
|
This determines which physical LED responds to commands for this light slot.
|
|
type: int32
|
|
num_instances: *max_num_uavcan_lights
|
|
instance_start: 0
|
|
min: 0
|
|
max: 255
|
|
default: 0
|
|
UAVCAN_LGT_FN${i}:
|
|
description:
|
|
short: Light ${i} function
|
|
long: |
|
|
Function for light ${i}.
|
|
UAVCAN_LGT_MODE determines when the first option or second option is active Off/On.
|
|
type: enum
|
|
num_instances: *max_num_uavcan_lights
|
|
instance_start: 0
|
|
min: 0
|
|
max: 9
|
|
default: 0
|
|
values:
|
|
0: Status/Status
|
|
1: Off/White
|
|
2: Off/Red
|
|
3: Off/Green
|
|
4: Status/White
|
|
5: Status/Red
|
|
6: Status/Green
|
|
7: Status/Off
|
|
actuator_output:
|
|
show_subgroups_if: 'UAVCAN_ENABLE>=3'
|
|
config_parameters:
|
|
- param: 'UAVCAN_ENABLE'
|
|
label: 'Configure'
|
|
function: 'enable'
|
|
- param: 'UAVCAN_BITRATE'
|
|
label: 'Bitrate'
|
|
output_groups:
|
|
- param_prefix: UAVCAN_EC
|
|
group_label: 'ESCs'
|
|
channel_label: 'ESC'
|
|
standard_params:
|
|
min: { min: 0, max: 8191, default: 1 }
|
|
max: { min: 0, max: 8191, default: 8191 }
|
|
failsafe: { min: 0, max: 8191 }
|
|
num_channels: 12
|
|
- param_prefix: UAVCAN_SV
|
|
group_label: 'Servos'
|
|
channel_label: 'Servo'
|
|
standard_params:
|
|
disarmed: { min: 0, max: 1000, default: 500 }
|
|
min: { min: 0, max: 1000, default: 0 }
|
|
max: { min: 0, max: 1000, default: 1000 }
|
|
failsafe: { min: 0, max: 1000 }
|
|
num_channels: 8
|