Plane: fix compile error for RANGEFINDER_ENABLED
Plane: #define check for rangefinder enabled in relative_ground_altitude()
This commit is contained in:
parent
fb73d9e5fc
commit
f05c698176
@ -139,9 +139,11 @@ int32_t Plane::relative_altitude_abs_cm(void)
|
||||
*/
|
||||
float Plane::relative_ground_altitude(bool use_rangefinder_if_available)
|
||||
{
|
||||
if (use_rangefinder_if_available && rangefinder_state.in_range) {
|
||||
#if RANGEFINDER_ENABLED == ENABLED
|
||||
if (use_rangefinder_if_available && rangefinder_state.in_range) {
|
||||
return rangefinder_state.height_estimate;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if AP_TERRAIN_AVAILABLE
|
||||
float altitude;
|
||||
|
Loading…
Reference in New Issue
Block a user