Skip to content

Commit

Permalink
Plane: takeoff: use tkoff_option_is_set helper
Browse files Browse the repository at this point in the history
  • Loading branch information
IamPete1 committed Feb 2, 2025
1 parent 3e42b40 commit 98bb1a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ArduPlane/takeoff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ void Plane::takeoff_calc_throttle() {
const float current_baro_alt = barometer.get_altitude();
const bool below_lvl_alt = current_baro_alt < auto_state.baro_takeoff_alt + mode_takeoff.level_alt;
// Set the minimum throttle limit.
const bool use_throttle_range = (aparm.takeoff_options & (uint32_t)AP_FixedWing::TakeoffOption::THROTTLE_RANGE);
const bool use_throttle_range = tkoff_option_is_set(AP_FixedWing::TakeoffOption::THROTTLE_RANGE);
if (!use_throttle_range // We don't want to employ a throttle range.
|| !ahrs.using_airspeed_sensor() // We don't have an airspeed sensor.
|| below_lvl_alt // We are below TKOFF_LVL_ALT.
Expand Down

0 comments on commit 98bb1a2

Please sign in to comment.