Skip to content

Commit

Permalink
Copter: remove unused #if around rangefinder
Browse files Browse the repository at this point in the history
the contents of this entire file are removed when AP_RANGEFINDER_ENABLED is false
  • Loading branch information
peterbarker committed Jul 7, 2024
1 parent 8be0a64 commit 992857f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions ArduCopter/surface_tracking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// level measured using the range finder.
void Copter::SurfaceTracking::update_surface_offset()
{
#if AP_RANGEFINDER_ENABLED
// check for timeout
const uint32_t now_ms = millis();
const bool timeout = (now_ms - last_update_ms) > SURFACE_TRACKING_TIMEOUT_MS;
Expand Down Expand Up @@ -43,10 +42,6 @@ void Copter::SurfaceTracking::update_surface_offset()
reset_target = true;
}
}
#else
copter.pos_control->set_pos_offset_z_cm(0);
copter.pos_control->set_pos_offset_target_z_cm(0);
#endif
}


Expand Down

0 comments on commit 992857f

Please sign in to comment.