From 4a4dc21cfebde12f3973b42a34aaa89286c98668 Mon Sep 17 00:00:00 2001 From: Bartok9 Date: Wed, 29 Jul 2026 05:23:20 -0400 Subject: [PATCH] fix(simple_flight): protect Params kMinThrottle from Windows min macros Parenthesize std::min so windows.h min macros cannot break VelocityPid constant initialization (matches other simple_flight clamps). --- .../multirotor/firmwares/simple_flight/firmware/Params.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/Params.hpp b/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/Params.hpp index 3612b207aa..c7b5d0b81b 100644 --- a/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/Params.hpp +++ b/AirLib/include/vehicles/multirotor/firmwares/simple_flight/firmware/Params.hpp @@ -100,7 +100,7 @@ struct Params struct VelocityPid { - const float kMinThrottle = std::min(1.0f, Params::min_armed_throttle() * 3.0f); + const float kMinThrottle = (std::min)(1.0f, Params::min_armed_throttle() * 3.0f); const float kMaxLimit = 6.0f; // m/s const float kP = 0.2f; const float kI = 2.0f;