mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-15 11:40:35 +08:00
Remove COM_POSCTL_NAVL
In an effort to reduce configuration space. I've not seen use for this option. If a pilot flies manually in position mode he has some visual reference of the vehicle and can do better than an autonomous mode without position reference. Also by now we have nudging in Descend mode so the pilot can still give input and the only difference is it automatically goes down instead of the pilot having to descend by stick to land.
This commit is contained in:
committed by
Silvan Fuhrer
parent
3962419669
commit
e0cdcdb436
@@ -34,9 +34,9 @@
|
||||
|
||||
#include "UserModeIntention.hpp"
|
||||
|
||||
UserModeIntention::UserModeIntention(ModuleParams *parent, const vehicle_status_s &vehicle_status,
|
||||
UserModeIntention::UserModeIntention(const vehicle_status_s &vehicle_status,
|
||||
const HealthAndArmingChecks &health_and_arming_checks, ModeChangeHandler *handler)
|
||||
: ModuleParams(parent), _vehicle_status(vehicle_status), _health_and_arming_checks(health_and_arming_checks),
|
||||
: _vehicle_status(vehicle_status), _health_and_arming_checks(health_and_arming_checks),
|
||||
_handler(handler)
|
||||
{
|
||||
}
|
||||
@@ -59,7 +59,7 @@ bool UserModeIntention::change(uint8_t user_intended_nav_state, ModeChangeSource
|
||||
allow_change = _health_and_arming_checks.canRun(user_intended_nav_state);
|
||||
|
||||
// Check fallback
|
||||
if (!allow_change && allow_fallback && _param_com_posctl_navl.get() == 0) {
|
||||
if (!allow_change && allow_fallback) {
|
||||
if (user_intended_nav_state == vehicle_status_s::NAVIGATION_STATE_POSCTL) {
|
||||
allow_change = _health_and_arming_checks.canRun(vehicle_status_s::NAVIGATION_STATE_ALTCTL);
|
||||
// We still use the original user intended mode. The failsafe state machine will then set the
|
||||
|
||||
Reference in New Issue
Block a user