mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-26 09:26:25 +08:00
mavlink: Added MAV_{i}_HL_FREQ parameter
This commit is contained in:
@@ -2037,15 +2037,17 @@ Mavlink::task_main(int argc, char *argv[])
|
||||
if (px4_get_parameter_value(myoptarg, freq) != 0) {
|
||||
PX4_ERR("iridium mode frequency parsing failed");
|
||||
err_flag = true;
|
||||
}
|
||||
else {
|
||||
if (freq >= 0) {
|
||||
|
||||
} else {
|
||||
if (freq >= 0.f) {
|
||||
_high_latency_freq = freq;
|
||||
|
||||
} else {
|
||||
PX4_ERR("Invalid value for iridium mode frequency.");
|
||||
err_flag = true;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2922,9 +2924,11 @@ Mavlink::display_status()
|
||||
_ftp_on ? "YES" : "NO",
|
||||
_transmitting_enabled ? "YES" : "NO");
|
||||
printf("\tmode: %s\n", mavlink_mode_str(_mode));
|
||||
|
||||
if (_mode == MAVLINK_MODE_IRIDIUM) {
|
||||
printf("\t iridium tx freq: %.3f\n", (double)(_high_latency_freq));
|
||||
}
|
||||
|
||||
printf("\tForwarding: %s\n", get_forwarding_on() ? "On" : "Off");
|
||||
printf("\tMAVLink version: %" PRId32 "\n", _protocol_version);
|
||||
|
||||
|
||||
@@ -32,6 +32,10 @@ serial_config:
|
||||
then
|
||||
set MAV_ARGS "${MAV_ARGS} -z"
|
||||
fi
|
||||
if param compare MAV_${i}_MODE 6
|
||||
then
|
||||
set MAV_ARGS "${MAV_ARGS} -F p:MAV_${i}_HL_FREQ"
|
||||
fi
|
||||
mavlink start ${MAV_ARGS} -x
|
||||
port_config_param:
|
||||
name: MAV_${i}_CONFIG
|
||||
@@ -178,3 +182,22 @@ parameters:
|
||||
num_instances: *max_num_config_instances
|
||||
default: [2, 2, 2]
|
||||
reboot_required: true
|
||||
|
||||
MAV_${i}_HL_FREQ:
|
||||
description:
|
||||
short: Configures the frequency of HIGH_LATENCY2 stream for instance ${i}
|
||||
long: |
|
||||
Positive real value that configures the transmission frequency of the
|
||||
HIGH_LATENCY2 stream for instance ${i}, configured in iridium mode.
|
||||
This parameter has no effect if the instance mode is different from iridium.
|
||||
|
||||
type: float
|
||||
decimal: 3
|
||||
increment: 0.001
|
||||
unit: Hz
|
||||
min: 0.0
|
||||
max: 50.0
|
||||
num_instances: *max_num_config_instances
|
||||
default: [0.015, 0.015, 0.015]
|
||||
reboot_required: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user