Skip to content

Commit

Permalink
Plane: Added flight option IMMEDIATE_DESCEND_IN_AUTO
Browse files Browse the repository at this point in the history
  • Loading branch information
Georacer committed Sep 27, 2024
1 parent e57994f commit 67c3b07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ArduPlane/altitude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ void Plane::setup_glide_slope(void)
reset_offset_altitude();
break;
}
//descend without doing glide slope if option is enabled
if (above_location_current(next_WP_loc) && plane.flight_option_enabled(FlightOptions::IMMEDIATE_DESCEND_IN_AUTO)) {
reset_offset_altitude();
break;
}

// we only do glide slide handling in AUTO when above 20m or
// when descending. The 20 meter threshold is arbitrary, and
Expand Down
1 change: 1 addition & 0 deletions ArduPlane/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ enum FlightOptions {
ENABLE_LOITER_ALT_CONTROL = (1<<12),
INDICATE_WAITING_FOR_RUDDER_NEUTRAL = (1<<13),
IMMEDIATE_CLIMB_IN_AUTO = (1<<14),
IMMEDIATE_DESCEND_IN_AUTO = (1<<15),
};

enum CrowFlapOptions {
Expand Down

0 comments on commit 67c3b07

Please sign in to comment.