From fe8e0d0c96635e8f86678a91f676764e4835202e Mon Sep 17 00:00:00 2001 From: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com> Date: Fri, 22 Nov 2024 08:44:55 -0700 Subject: [PATCH] AP_Soaring: Use constexpr instead of define for constants Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com> --- libraries/AP_Soaring/AP_Soaring.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_Soaring/AP_Soaring.h b/libraries/AP_Soaring/AP_Soaring.h index 4d13ef8e79..f9dd8b17c8 100644 --- a/libraries/AP_Soaring/AP_Soaring.h +++ b/libraries/AP_Soaring/AP_Soaring.h @@ -23,10 +23,10 @@ #include "Variometer.h" #include "SpeedToFly.h" -#define INITIAL_THERMAL_RADIUS 80.0 -#define INITIAL_STRENGTH_COVARIANCE 0.0049 -#define INITIAL_RADIUS_COVARIANCE 400.0 -#define INITIAL_POSITION_COVARIANCE 400.0 +static constexpr float INITIAL_THERMAL_RADIUS = 80.0; +static constexpr float INITIAL_STRENGTH_COVARIANCE = 0.0049; +static constexpr float INITIAL_RADIUS_COVARIANCE = 400.0; +static constexpr float INITIAL_POSITION_COVARIANCE = 400.0; class SoaringController {