CSSTUDIO-3620 Linear Meter Bugfix: Fix setting of range when no range has been specified #3689
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request implements a bugfix for the Linear Meter widget: before this pull request, when no range was specified by the user and the PV values don't contain information about the range to display, the Linear Meter would erratically switch between the default range of
[0.0, 100.0]and a dynamically computed range based on observed values. The reason was a missing check for whether values had been observed yet or not by the Linear Meter upon which to compute a scale.This pull request fixes the erratic switching of the range by only using setting the range to the default range
[0.0, 100.0]if there are no observed values to base the range on. (If there are observed values to base the range on, the range is set to[observedMin - 1, obeservedMax + 1].)I have tested the bugfix manually.
Checklist
Testing:
Documentation: