mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
simulation/gz_bridge: eliminate implicit float conversion
This commit is contained in:
parent
b508df39a2
commit
eb59bb9de9
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user