|
|
|
@ -35,9 +35,8 @@ int16_t AP_DAL_RangeFinder::ground_clearance_cm_orient(enum Rotation orientation
@@ -35,9 +35,8 @@ int16_t AP_DAL_RangeFinder::ground_clearance_cm_orient(enum Rotation orientation
|
|
|
|
|
int16_t AP_DAL_RangeFinder::max_distance_cm_orient(enum Rotation orientation) const |
|
|
|
|
{ |
|
|
|
|
#if !APM_BUILD_TYPE(APM_BUILD_AP_DAL_Standalone) |
|
|
|
|
const auto *rangefinder = AP::rangefinder(); |
|
|
|
|
|
|
|
|
|
if (orientation != ROTATION_PITCH_270) { |
|
|
|
|
const auto *rangefinder = AP::rangefinder(); |
|
|
|
|
// the EKF only asks for this from a specific orientation. Thankfully.
|
|
|
|
|
INTERNAL_ERROR(AP_InternalError::error_t::flow_of_control); |
|
|
|
|
return rangefinder->ground_clearance_cm_orient(orientation); |
|
|
|
@ -54,8 +53,9 @@ void AP_DAL_RangeFinder::start_frame()
@@ -54,8 +53,9 @@ void AP_DAL_RangeFinder::start_frame()
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// EKF only asks for this *down*.
|
|
|
|
|
const log_RRNH old = _RRNH; |
|
|
|
|
|
|
|
|
|
// EKF only asks for this *down*.
|
|
|
|
|
_RRNH.ground_clearance_cm = rangefinder->ground_clearance_cm_orient(ROTATION_PITCH_270); |
|
|
|
|
_RRNH.max_distance_cm = rangefinder->max_distance_cm_orient(ROTATION_PITCH_270); |
|
|
|
|
_RRNH.backend_mask = 0; |
|
|
|
|