mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 23:03:34 +08:00
MAVLink app: Rely on booted state, not on timeout for parameters. This fixes any param timing issues for good.
This commit is contained in:
@@ -115,6 +115,8 @@ extern mavlink_system_t mavlink_system;
|
||||
|
||||
static void usage(void);
|
||||
|
||||
bool Mavlink::_boot_complete = false;
|
||||
|
||||
Mavlink::Mavlink() :
|
||||
_device_name(DEFAULT_DEVICE_NAME),
|
||||
_task_should_exit(false),
|
||||
@@ -1909,6 +1911,10 @@ int mavlink_main(int argc, char *argv[])
|
||||
} else if (!strcmp(argv[1], "stream")) {
|
||||
return Mavlink::stream_command(argc, argv);
|
||||
|
||||
} else if (!strcmp(argv[1], "boot_complete")) {
|
||||
Mavlink::set_boot_complete();
|
||||
return 0;
|
||||
|
||||
} else {
|
||||
usage();
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user