Skip to content

Commit fc2621f

Browse files
committed
fix(sensor_airspeed_sim): match SimulatorMavlink rounding
1 parent e341e8f commit fc2621f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modules/simulation/sensor_airspeed_sim/SensorAirspeedSim.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ void SensorAirspeedSim::check_failure_injection()
184184
bool handled = false;
185185
bool supported = false;
186186

187-
const int failure_unit = round(vehicle_command.param1);
188-
const int failure_type = round(vehicle_command.param2);
187+
const int failure_unit = static_cast<int>(std::lround(vehicle_command.param1));
188+
const int failure_type = static_cast<int>(std::lround(vehicle_command.param2));
189189

190190
if (failure_unit == vehicle_command_s::FAILURE_UNIT_SENSOR_AIRSPEED) {
191191

0 commit comments

Comments
 (0)