From f5c68d54cba5bf4d423a4fef9c084b27f8579ca3 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Sun, 8 Aug 2021 18:07:54 +0100 Subject: [PATCH] Copter: flowhold: use correct angle max --- ArduCopter/mode_flowhold.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduCopter/mode_flowhold.cpp b/ArduCopter/mode_flowhold.cpp index 3baa62a57e..6ff4ae2bba 100644 --- a/ArduCopter/mode_flowhold.cpp +++ b/ArduCopter/mode_flowhold.cpp @@ -313,7 +313,7 @@ void ModeFlowHold::run() // calculate alt-hold angles int16_t roll_in = copter.channel_roll->get_control_in(); int16_t pitch_in = copter.channel_pitch->get_control_in(); - float angle_max = copter.attitude_control->get_althold_lean_angle_max(); + float angle_max = copter.aparm.angle_max; get_pilot_desired_lean_angles(bf_angles.x, bf_angles.y, angle_max, attitude_control->get_althold_lean_angle_max()); if (quality_filtered >= flow_min_quality &&