mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2025-12-13 18:56:02 +08:00
simulation/gz_bridge: eliminate implicit float conversion
This commit is contained in:
@@ -78,8 +78,8 @@ bool GZMixingInterfaceWheel::updateOutputs(bool stop_wheels, uint16_t outputs[MA
|
||||
|
||||
for (unsigned i = 0; i < active_output_count; i++) {
|
||||
// Offsetting the output allows for negative values despite unsigned integer to reverse the wheels
|
||||
static constexpr float output_offset = 100.0f;
|
||||
float scaled_output = (float)outputs[i] - output_offset;
|
||||
static constexpr double output_offset = 100.0;
|
||||
double scaled_output = (double)outputs[i] - output_offset;
|
||||
wheel_velocity_message.set_velocity(i, scaled_output);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user