Skip to content

Commit

Permalink
Plane: Use AIRSPEED_STALL for roll stall prevent.
Browse files Browse the repository at this point in the history
Similarly to how it's done in the TECS stall prevention, used
AIRSPEED_STALL (if available) in the stall prevention calculations.
  • Loading branch information
rubenp02 committed Jan 20, 2025
1 parent 94301f5 commit 4167ec1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ArduPlane/Attitude.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,11 @@ void Plane::update_load_factor(void)
}
#endif

float max_load_factor = sq(smoothed_airspeed / MAX(aparm.airspeed_min, 1));
float airspeed_stall = is_positive(aparm.airspeed_stall)
? aparm.airspeed_stall
: aparm.airspeed_min;

float max_load_factor = sq(smoothed_airspeed / MAX(airspeed_stall, 1));
if (max_load_factor <= 1) {
// our airspeed is below the minimum airspeed. Limit roll to
// 25 degrees
Expand Down

0 comments on commit 4167ec1

Please sign in to comment.