Skip to content

Commit

Permalink
AP_Quicktune: Remove the two if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleRos committed Aug 27, 2024
1 parent a839230 commit b112520
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions libraries/AP_Quicktune/AP_Quicktune.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,10 @@ void AP_Quicktune::update(bool mode_supports_quicktune)
reset_axes_done();
return;
}
if (sw_pos == sw_pos_save) {
// Save all params
if (need_restore) {
need_restore = false;
save_all_params();
GCS_SEND_TEXT(MAV_SEVERITY_NOTICE, "Tuning: Saved");
}
if (sw_pos == sw_pos_save && need_restore) {
need_restore = false;
save_all_params();
GCS_SEND_TEXT(MAV_SEVERITY_NOTICE, "Tuning: Saved");
}
if (sw_pos != sw_pos_tune) {
return;
Expand Down

0 comments on commit b112520

Please sign in to comment.