From 8d59e6fa48d31045adc37468d224647d7ad4a5b2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 18 Nov 2021 19:02:26 +1100 Subject: [PATCH] Plane: fixed variable name thanks to Peter for noticing --- ArduPlane/quadplane.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ArduPlane/quadplane.cpp b/ArduPlane/quadplane.cpp index 2c57141527..a3548e2b28 100644 --- a/ArduPlane/quadplane.cpp +++ b/ArduPlane/quadplane.cpp @@ -2485,10 +2485,10 @@ void QuadPlane::vtol_position_controller(void) } } #if AP_TERRAIN_AVAILABLE - float terrain_altitude_offset_cm; - if (plane.next_WP_loc.terrain_alt && plane.terrain.height_terrain_difference_home(terrain_altitude_offset_cm, true)) { + float terrain_altitude_offset; + if (plane.next_WP_loc.terrain_alt && plane.terrain.height_terrain_difference_home(terrain_altitude_offset, true)) { // Climb if current terrain is above home, target_altitude_cm is reltive to home - target_altitude_cm += MAX(terrain_altitude_offset_cm*100,0); + target_altitude_cm += MAX(terrain_altitude_offset*100,0); } #endif float zero = 0;