Skip to content

Commit ef21eef

Browse files
Constify
Co-authored-by: Sai Kishor Kothakota <[email protected]>
1 parent ef5eab5 commit ef21eef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

example_14/hardware/rrbot_sensor_for_position_feedback.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@ hardware_interface::return_type RRBotSensorPositionFeedback::read(
252252
}
253253

254254
// integrate velocity to position
255-
auto name = info_.joints[0].name + "/" + hardware_interface::HW_IF_POSITION;
256-
auto new_value = get_state(name) + (last_measured_velocity_ * duration.seconds()) / hw_slowdown_;
255+
const auto name = info_.joints[0].name + "/" + hardware_interface::HW_IF_POSITION;
256+
const auto new_value = get_state(name) + (last_measured_velocity_ * duration.seconds()) / hw_slowdown_;
257257
set_state(name, new_value);
258258

259259
ss << std::fixed << std::setprecision(2);

0 commit comments

Comments
 (0)