simulation/gz_bridge: eliminate implicit float conversion

This commit is contained in:
Daniel Agar
2024-04-22 13:29:01 -04:00
parent b508df39a2
commit eb59bb9de9

View File

@@ -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);
}