mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
RTPS client get baudrate parameter if requested, and mark the device baud rate parameter as used so it shows up in QGC
This commit is contained in:
parent
2492fb35e4
commit
76e15b4a21
@ -96,7 +96,21 @@ static int parse_options(int argc, char *argv[])
|
||||
|
||||
case 'w': _options.sleep_ms = strtoul(myoptarg, nullptr, 10); break;
|
||||
|
||||
case 'b': _options.baudrate = strtoul(myoptarg, nullptr, 10); break;
|
||||
case 'b':
|
||||
{
|
||||
int baudrate = 0;
|
||||
if (px4_get_parameter_value(myoptarg, baudrate) != 0) {
|
||||
PX4_ERR("baudrate parsing failed");
|
||||
}
|
||||
|
||||
if (baudrate < 9600 || baudrate > 3000000) {
|
||||
PX4_ERR("invalid baud rate '%s'", myoptarg);
|
||||
}
|
||||
|
||||
_options.baudrate = baudrate;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case 'r': _options.recv_port = strtoul(myoptarg, nullptr, 10); break;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user