Skip to content

Conversation

belkinirena
Copy link
Contributor

@belkinirena belkinirena commented Jun 25, 2018

The method for calculating the float value that is passed from the realsense_viewer controls slider has been changed. We calculate the left and right offset between the received slider input and the next step and set the value that is closer.
For example: for slider input: 0.4 and step: 0.25 the nearest value will be 0.5.
Tracked on: DSO-9736

@belkinirena belkinirena changed the title Fixed bug is setting Depth Units in realsense_viewer Fixed bug - Setting Depth Units in realsense_viewer fails Jun 25, 2018
if (ImGui::SliderFloat(id.c_str(), &value,
range.min, range.max, "%.4f"))
{
auto loffset = fmod(value, range.step);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, please verify that this hold for negative values as well

@dorodnic dorodnic merged commit 75b0fc0 into IntelRealSense:development Jul 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants