mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 10:26:52 +08:00
Hotfix: Ensured there are never two filters running at the same time if auto-magic happens via USB link
This commit is contained in:
@@ -22,9 +22,16 @@ commander start
|
|||||||
sh /etc/init.d/rc.sensors
|
sh /etc/init.d/rc.sensors
|
||||||
|
|
||||||
# Start one of the estimators
|
# Start one of the estimators
|
||||||
if attitude_estimator_ekf start
|
if attitude_estimator_ekf status
|
||||||
then
|
then
|
||||||
echo "estimating attitude"
|
echo "multicopter att filter running"
|
||||||
|
else
|
||||||
|
if att_pos_estimator_ekf status
|
||||||
|
then
|
||||||
|
echo "fixedwing att filter running"
|
||||||
|
else
|
||||||
|
attitude_estimator_ekf start
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start GPS
|
# Start GPS
|
||||||
|
|||||||
@@ -121,12 +121,13 @@ int att_pos_estimator_ekf_main(int argc, char *argv[])
|
|||||||
if (!strcmp(argv[1], "status")) {
|
if (!strcmp(argv[1], "status")) {
|
||||||
if (thread_running) {
|
if (thread_running) {
|
||||||
warnx("is running\n");
|
warnx("is running\n");
|
||||||
|
exit(0);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
warnx("not started\n");
|
warnx("not started\n");
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
usage("unrecognized command");
|
usage("unrecognized command");
|
||||||
|
|||||||
@@ -139,10 +139,12 @@ int attitude_estimator_ekf_main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!strcmp(argv[1], "status")) {
|
if (!strcmp(argv[1], "status")) {
|
||||||
if (thread_running) {
|
if (thread_running) {
|
||||||
printf("\tattitude_estimator_ekf app is running\n");
|
warnx("running");
|
||||||
|
exit(0);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
printf("\tattitude_estimator_ekf app not started\n");
|
warnx("not started");
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|||||||
@@ -139,10 +139,12 @@ int attitude_estimator_so3_comp_main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!strcmp(argv[1], "status")) {
|
if (!strcmp(argv[1], "status")) {
|
||||||
if (thread_running) {
|
if (thread_running) {
|
||||||
printf("\tattitude_estimator_so3_comp app is running\n");
|
warnx("running");
|
||||||
|
exit(0);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
printf("\tattitude_estimator_so3_comp app not started\n");
|
warnx("not started");
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user