From 911d75e578cc20ea44a893b752c7f57979d1e32e Mon Sep 17 00:00:00 2001 From: Roman Bapst Date: Tue, 13 May 2025 17:48:28 +0300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: KonradRudin <98741601+KonradRudin@users.noreply.github.com> --- msg/FixedWingLateralGuidanceStatus.msg | 2 +- msg/FixedWingLateralStatus.msg | 2 +- .../FwLateralLongitudinalControl.hpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/msg/FixedWingLateralGuidanceStatus.msg b/msg/FixedWingLateralGuidanceStatus.msg index a2e3f5f951..fc8e009c57 100644 --- a/msg/FixedWingLateralGuidanceStatus.msg +++ b/msg/FixedWingLateralGuidanceStatus.msg @@ -10,4 +10,4 @@ float32 bearing_feas_on_track # [0,1] on-track bearing feasibility float32 signed_track_error # [m] signed track error float32 track_error_bound # [m] track error bound float32 adapted_period # [s] adapted period (if auto-tuning enabled) -uint8 wind_est_valid # (boolean) true = wind estimate is valid and/or being used by controller (also indicates if wind est usage is disabled despite being valid) +uint8 wind_est_valid # (boolean) true = wind estimate is valid and/or being used by controller (also indicates if wind estimate usage is disabled despite being valid) diff --git a/msg/FixedWingLateralStatus.msg b/msg/FixedWingLateralStatus.msg index 607729fa47..ac5f267137 100644 --- a/msg/FixedWingLateralStatus.msg +++ b/msg/FixedWingLateralStatus.msg @@ -4,4 +4,4 @@ uint64 timestamp # time since system start (microseconds) float32 lateral_acceleration_setpoint # [m/s^2] [FRD] resultant lateral acceleration setpoint -float32 can_run_factor # [0, 1] estimate of certainty of the correct functionality of the npfg roll setpoint in +float32 can_run_factor # [0, 1] estimate of certainty of the correct functionality of the npfg roll setpoint diff --git a/src/modules/fw_lateral_longitudinal_control/FwLateralLongitudinalControl.hpp b/src/modules/fw_lateral_longitudinal_control/FwLateralLongitudinalControl.hpp index 5f47a28ce9..80b79b9224 100644 --- a/src/modules/fw_lateral_longitudinal_control/FwLateralLongitudinalControl.hpp +++ b/src/modules/fw_lateral_longitudinal_control/FwLateralLongitudinalControl.hpp @@ -172,8 +172,8 @@ private: ) hrt_abstime _last_time_loop_ran{}; - uint8_t _z_reset_counter{0}; - uint64_t _time_airspeed_last_valid{0}; + uint8_t _z_reset_counter{UINT8_C(0)}; + uint64_t _time_airspeed_last_valid{UINT64_C(0)}; float _air_density{atmosphere::kAirDensitySeaLevelStandardAtmos}; // Smooths changes in the altitude tracking error time constant value SlewRate _tecs_alt_time_const_slew_rate;