mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
add configurable rtps rate parameter
This commit is contained in:
committed by
Nuno Marques
parent
133fe0cfb1
commit
dce067df83
@@ -122,7 +122,17 @@ static int parse_options(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'm': _options.datarate = strtoul(myoptarg, nullptr, 10); break;
|
case 'm': {
|
||||||
|
int datarate = 0;
|
||||||
|
|
||||||
|
if (px4_get_parameter_value(myoptarg, datarate) != 0) {
|
||||||
|
PX4_ERR("datarate parsing failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
_options.datarate = datarate;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case 'p': _options.poll_ms = strtoul(myoptarg, nullptr, 10); break;
|
case 'p': _options.poll_ms = strtoul(myoptarg, nullptr, 10); break;
|
||||||
|
|
||||||
|
|||||||
@@ -3,15 +3,36 @@ serial_config:
|
|||||||
- command: |
|
- command: |
|
||||||
protocol_splitter start ${SERIAL_DEV}
|
protocol_splitter start ${SERIAL_DEV}
|
||||||
mavlink start -d /dev/mavlink -b p:${BAUD_PARAM} -m onboard -r 5000 -x
|
mavlink start -d /dev/mavlink -b p:${BAUD_PARAM} -m onboard -r 5000 -x
|
||||||
micrortps_client start -d /dev/rtps -b p:${BAUD_PARAM} -l -1
|
micrortps_client start -d /dev/rtps -b p:${BAUD_PARAM} -m p:RTPS_RATE -l -1
|
||||||
port_config_param:
|
port_config_param:
|
||||||
name: RTPS_MAV_CONFIG
|
name: RTPS_MAV_CONFIG
|
||||||
group: RTPS
|
group: RTPS
|
||||||
label: MAVLink + FastRTPS
|
label: MAVLink + FastRTPS
|
||||||
- command: |
|
- command: |
|
||||||
micrortps_client start -d ${SERIAL_DEV} -b p:${BAUD_PARAM} -l -1
|
micrortps_client start -d ${SERIAL_DEV} -b p:${BAUD_PARAM} -m p:RTPS_RATE -l -1
|
||||||
port_config_param:
|
port_config_param:
|
||||||
name: RTPS_CONFIG
|
name: RTPS_CONFIG
|
||||||
group: RTPS
|
group: RTPS
|
||||||
label: FastRTPS
|
label: FastRTPS
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
- group: RTPS
|
||||||
|
definitions:
|
||||||
|
RTPS_RATE:
|
||||||
|
description:
|
||||||
|
short: Maximum RTPS data rate
|
||||||
|
long: |
|
||||||
|
Configure the maximum sending rate for the RTPS streams in Bytes/sec.
|
||||||
|
If the configured streams exceed the maximum rate, the sending rate of
|
||||||
|
each stream is automatically decreased.
|
||||||
|
|
||||||
|
0 is unlimited. Note this can cause reliability issues
|
||||||
|
if enough RTPS topics are selected that exceed the
|
||||||
|
serial bus limit.
|
||||||
|
|
||||||
|
type: int32
|
||||||
|
min: 0
|
||||||
|
unit: B/s
|
||||||
|
reboot_required: true
|
||||||
|
default: 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user