CI: enable clang-tidy bugprone-incorrect-roundings (#26574)

switched to lroundf and included cmath in all



removed std namespace - quick tested

Signed-off-by: kuralme <kuralme@protonmail.com>
This commit is contained in:
Ege Kural
2026-02-24 17:16:33 -05:00
committed by GitHub
parent 4a0e257fc9
commit a5c67b90a9
16 changed files with 44 additions and 36 deletions
@@ -33,6 +33,7 @@
#include "FixedWingModeManager.hpp"
#include <cmath>
#include <px4_platform_common/events.h>
#include <uORB/topics/longitudinal_control_configuration.h>
@@ -139,7 +140,7 @@ FixedWingModeManager::vehicle_command_poll()
} else if (vehicle_command.command == vehicle_command_s::VEHICLE_CMD_DO_CHANGE_SPEED) {
if ((static_cast<uint8_t>(vehicle_command.param1 + .5f) == vehicle_command_s::SPEED_TYPE_AIRSPEED)) {
if ((static_cast<uint8_t>(lroundf(vehicle_command.param1)) == vehicle_command_s::SPEED_TYPE_AIRSPEED)) {
if (vehicle_command.param2 > FLT_EPSILON) { // param2 is an equivalent airspeed setpoint
if (_control_mode_current == FW_POSCTRL_MODE_AUTO) {
_pos_sp_triplet.current.cruising_speed = vehicle_command.param2;