From b18da48f3965f7a19ea5d15814e5d2fde910f48f Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Fri, 10 Sep 2021 00:19:49 +0100 Subject: [PATCH] Plane: remove AUTO_FBW_STEER --- ArduPlane/ArduPlane.cpp | 9 ++------- ArduPlane/Attitude.cpp | 3 +-- ArduPlane/Parameters.cpp | 7 ------- ArduPlane/Parameters.h | 4 +--- ArduPlane/servos.cpp | 5 ----- 5 files changed, 4 insertions(+), 24 deletions(-) diff --git a/ArduPlane/ArduPlane.cpp b/ArduPlane/ArduPlane.cpp index ba942a140c..66e3e6fe74 100644 --- a/ArduPlane/ArduPlane.cpp +++ b/ArduPlane/ArduPlane.cpp @@ -419,12 +419,7 @@ void Plane::update_GPS_10Hz(void) */ void Plane::update_control_mode(void) { - Mode *effective_mode = control_mode; - if (control_mode == &mode_auto && g.auto_fbw_steer == 42) { - effective_mode = &mode_fbwa; - } - - if (effective_mode != &mode_auto) { + if (control_mode != &mode_auto) { // hold_course is only used in takeoff and landing steer_state.hold_course_cd = -1; } @@ -444,7 +439,7 @@ void Plane::update_control_mode(void) ahrs.set_fly_forward(true); } - effective_mode->update(); + control_mode->update(); } /* diff --git a/ArduPlane/Attitude.cpp b/ArduPlane/Attitude.cpp index 9938277738..cfa0515323 100644 --- a/ArduPlane/Attitude.cpp +++ b/ArduPlane/Attitude.cpp @@ -226,8 +226,7 @@ void Plane::stabilize_stick_mixing_fbw() control_mode == &mode_qrtl || control_mode == &mode_qacro || control_mode == &mode_training || - control_mode == &mode_qautotune || - (control_mode == &mode_auto && g.auto_fbw_steer == 42)) { + control_mode == &mode_qautotune) { return; } // do FBW style stick mixing. We don't treat it linearly diff --git a/ArduPlane/Parameters.cpp b/ArduPlane/Parameters.cpp index d4c8b5701d..bf8cbd6bed 100644 --- a/ArduPlane/Parameters.cpp +++ b/ArduPlane/Parameters.cpp @@ -110,13 +110,6 @@ const AP_Param::Info Plane::var_info[] = { // @User: Advanced GSCALAR(stick_mixing, "STICK_MIXING", STICK_MIXING_FBW), - // @Param: AUTO_FBW_STEER - // @DisplayName: Use FBWA steering in AUTO - // @Description: When enabled this option gives FBWA navigation and steering in AUTO mode. This can be used to allow manual stabilised piloting with waypoint logic for triggering payloads. With this enabled the pilot has the same control over the plane as in FBWA mode, and the normal AUTO navigation is completely disabled. THIS OPTION IS NOT RECOMMENDED FOR NORMAL USE. - // @Values: 0:Disabled,42:Enabled - // @User: Advanced - GSCALAR(auto_fbw_steer, "AUTO_FBW_STEER", 0), - // @Param: TKOFF_THR_MINSPD // @DisplayName: Takeoff throttle min speed // @Description: Minimum GPS ground speed in m/s used by the speed check that un-suppresses throttle in auto-takeoff. This can be be used for catapult launches where you want the motor to engage only after the plane leaves the catapult, but it is preferable to use the TKOFF_THR_MINACC and TKOFF_THR_DELAY parameters for catapult launches due to the errors associated with GPS measurements. For hand launches with a pusher prop it is strongly advised that this parameter be set to a value no less than 4 m/s to provide additional protection against premature motor start. Note that the GPS velocity will lag the real velocity by about 0.5 seconds. The ground speed check is delayed by the TKOFF_THR_DELAY parameter. diff --git a/ArduPlane/Parameters.h b/ArduPlane/Parameters.h index 63b4be8463..0faec5fb6e 100644 --- a/ArduPlane/Parameters.h +++ b/ArduPlane/Parameters.h @@ -89,7 +89,7 @@ public: k_param_relay, k_param_takeoff_throttle_delay, k_param_mode_takeoff, // was skip_gyro_cal - k_param_auto_fbw_steer, + k_param_auto_fbw_steer, // unused k_param_waypoint_max_radius, k_param_ground_steer_alt, k_param_ground_steer_dps, @@ -377,8 +377,6 @@ public: // speed used for speed scaling AP_Float scaling_speed; - AP_Int8 auto_fbw_steer; - // Waypoints // AP_Int16 waypoint_radius; diff --git a/ArduPlane/servos.cpp b/ArduPlane/servos.cpp index 1ccab9369e..5aa093290b 100644 --- a/ArduPlane/servos.cpp +++ b/ArduPlane/servos.cpp @@ -80,11 +80,6 @@ bool Plane::suppress_throttle(void) return false; } - if (control_mode == &mode_auto && g.auto_fbw_steer == 42) { - // user has throttle control - return false; - } - bool gps_movement = (gps.status() >= AP_GPS::GPS_OK_FIX_2D && gps.ground_speed() >= 5); if ((control_mode == &mode_auto &&