Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gauge limits - min/max do not match documentation, functionality easily broken. #7672

Open
jtrack3d opened this issue Apr 6, 2024 · 0 comments

Comments

@jtrack3d
Copy link

jtrack3d commented Apr 6, 2024

Is your feature request related to a problem? Please describe.
This could be considered a bug, but because it isn't clearly documented, I'll call it an enhancement.

I’ve been struggling with Gauge control min/max. The properties imply telemetry can provide it – “Use telemetry limits for minimum maximum ranges” property on the gauge. The API documentation states that a telemetry object’s value min/max can optionally be set for things such as gauges.

https://github.com/nasa/openmct/blob/master/API.md#values

Examining the code for the Gauge component, neither "telemetry" nor min/max values affect the gauge. In order to auto-apply ranges to gauges, you must:

  1. Have a limit provider,
  2. Limit provider must provide "getLimits",
  3. Can have any severity (CRITICAL, DISTRESS, SEVERE, WARNING, WATCH),
  4. At least one must be defined, and defined in pairs, i.e. both high and low for the same severity,
  5. It uses the most severe severity high/low as min/max (limitLow/limitHigh),
  6. If all above is met, rangeLow/rangeHigh buffer 10% padding over limitLow/limitHigh.

Code at play.

updateLimits(telemetryLimit) {

The documentation also indicates there are 5 colors to indicate limit level severity.

Describe the solution you'd like
For maximum power/flexibility, it seems implied to me the following:

  1. Min < Crit Low < Distress Low < Severe Low < Warning < Watch Low
  2. Max > Crit High > Distress High > Severe High > Warning High > Watch High

To provide the most flexible control / options, I'd like it if it:

  1. If min/max are provided, use them as rangeLow/rangeHigh, even if no limit provider. If no limit provider, they are also limitLow/LimitHigh.
  2. If a limit provider is present, and min/max were not, limitLow becomes min, limitMax becomes max. Do not assume 10%. If they want to see that range, provide a Min/Max.
  3. LimitLow = min(any provided severity, matching pairs not required).
  4. LimitHigh = max(any provided severity, matching pairs not required).

So the preference would be provide a min/max in addition to any limits you'd like to see.

For maximum capability it could use the getLimits colors for the behind coloring.

Describe alternatives you've considered
Writing my own replacement?

Additional context
N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant