mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 02:33:34 +08:00
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:
@@ -43,6 +43,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <uORB/uORBMessageFields.hpp>
|
||||
#include <uORB/Publication.hpp>
|
||||
@@ -1185,7 +1186,7 @@ void Logger::handle_vehicle_command_update()
|
||||
|
||||
if (command.command == vehicle_command_s::VEHICLE_CMD_LOGGING_START) {
|
||||
|
||||
if ((int)(command.param1 + 0.5f) != 0) {
|
||||
if (static_cast<int>(lroundf(command.param1)) != 0) {
|
||||
ack_vehicle_command(&command, vehicle_command_ack_s::VEHICLE_CMD_RESULT_UNSUPPORTED);
|
||||
|
||||
} else if (can_start_mavlink_log()) {
|
||||
|
||||
Reference in New Issue
Block a user