mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-15 02:30:35 +08:00
Add Altitude Cruise mode
-add new NAVIGATION_STATE_ALTITUDE_VOYAGER -this mode does require manual control to enter -but you can disable the manual control loss failsafe to continue flying in case of manual control loss -for MC: in throttle and yaw are controlled like in Altitude mode, the tilt is controlled via integrated rate input (similar to Acro, but with tilt limit) Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -1953,17 +1953,12 @@ FixedWingModeManager::Run()
|
||||
|
||||
perf_begin(_loop_perf);
|
||||
|
||||
if (_vehicle_status_sub.updated()) {
|
||||
|
||||
if (_vehicle_status_sub.update(&_vehicle_status)) {
|
||||
_nav_state = _vehicle_status.nav_state;
|
||||
}
|
||||
}
|
||||
_vehicle_status_sub.update(&_vehicle_status);
|
||||
|
||||
/* only run controller if position changed and we are not running an external mode*/
|
||||
|
||||
const bool is_external_nav_state = (_nav_state >= vehicle_status_s::NAVIGATION_STATE_EXTERNAL1)
|
||||
&& (_nav_state <= vehicle_status_s::NAVIGATION_STATE_EXTERNAL8);
|
||||
const bool is_external_nav_state = (_vehicle_status.nav_state >= vehicle_status_s::NAVIGATION_STATE_EXTERNAL1)
|
||||
&& (_vehicle_status.nav_state <= vehicle_status_s::NAVIGATION_STATE_EXTERNAL8);
|
||||
|
||||
if (is_external_nav_state) {
|
||||
// this will cause the configuration handler to publish immediately the next time an internal flight
|
||||
|
||||
Reference in New Issue
Block a user