From 54deea9dc2cfbc2727163898e423bce5520ea289 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Mon, 23 Sep 2024 13:49:05 +0100 Subject: [PATCH] AC_AttitudeControl: raise a config error if rate_controller_run_dt() is called by accident --- libraries/AC_AttitudeControl/AC_AttitudeControl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/AC_AttitudeControl/AC_AttitudeControl.h b/libraries/AC_AttitudeControl/AC_AttitudeControl.h index ecac8aa720f8df..2c53f9957b7262 100644 --- a/libraries/AC_AttitudeControl/AC_AttitudeControl.h +++ b/libraries/AC_AttitudeControl/AC_AttitudeControl.h @@ -11,6 +11,7 @@ #include #include #include +#include #define AC_ATTITUDE_CONTROL_ANGLE_P 4.5f // default angle P gain for roll, pitch and yaw @@ -244,7 +245,7 @@ class AC_AttitudeControl { virtual void rate_controller_target_reset() {} // optional variant to allow running with different dt - virtual void rate_controller_run_dt(float dt, const Vector3f& gyro) {} + virtual void rate_controller_run_dt(float dt, const Vector3f& gyro) { AP_BoardConfig::config_error("rate_controller_run_dt() must be defined"); }; // Convert a 321-intrinsic euler angle derivative to an angular velocity vector void euler_rate_to_ang_vel(const Quaternion& att, const Vector3f& euler_rate_rads, Vector3f& ang_vel_rads);