mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +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++) {
|
for (unsigned i = 0; i < active_output_count; i++) {
|
||||||
// Offsetting the output allows for negative values despite unsigned integer to reverse the wheels
|
// Offsetting the output allows for negative values despite unsigned integer to reverse the wheels
|
||||||
static constexpr float output_offset = 100.0f;
|
static constexpr double output_offset = 100.0;
|
||||||
float scaled_output = (float)outputs[i] - output_offset;
|
double scaled_output = (double)outputs[i] - output_offset;
|
||||||
wheel_velocity_message.set_velocity(i, scaled_output);
|
wheel_velocity_message.set_velocity(i, scaled_output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user