Skip to content

Commit

Permalink
simulation/gz_bridge: eliminate implicit float conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Apr 24, 2024
1 parent b508df3 commit eb59bb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/simulation/gz_bridge/GZMixingInterfaceWheel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit eb59bb9

Please sign in to comment.