Skip to content

Commit

Permalink
AP_TECS: Renamed flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Georacer committed Jun 20, 2024
1 parent 147f22a commit fa7f6d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions libraries/AP_TECS/AP_TECS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1175,16 +1175,16 @@ void AP_TECS::_initialise_states(int32_t ptchMinCO_cd, float hgt_afe)
_pitch_measured_lpf.reset(_ahrs.get_pitch());
}

if (!_reset_after_takeoff) {
if (!_flag_have_reset_after_takeoff) {
_flags.reset = true;
_reset_after_takeoff = true;
_flag_have_reset_after_takeoff = true;
}
}

if (_flight_stage != AP_FixedWing::FlightStage::TAKEOFF && _flight_stage != AP_FixedWing::FlightStage::ABORT_LANDING) {
// reset takeoff speed flag when not in takeoff
_flags.reached_speed_takeoff = false;
_reset_after_takeoff = false;
_flag_have_reset_after_takeoff = false;
}
}

Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_TECS/AP_TECS.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ class AP_TECS {
bool _need_reset;

// Checks if we reset at the beginning of takeoff.
bool _reset_after_takeoff{false};
bool _flag_have_reset_after_takeoff;

float _SKE_weighting;

Expand Down

0 comments on commit fa7f6d5

Please sign in to comment.