Skip to content

fix: Add tolerance buffer for gauge real-time updates with clock drift#8220

Open
harshaljanjani wants to merge 1 commit intonasa:masterfrom
harshaljanjani:fix/gauge-real-time-updates
Open

fix: Add tolerance buffer for gauge real-time updates with clock drift#8220
harshaljanjani wants to merge 1 commit intonasa:masterfrom
harshaljanjani:fix/gauge-real-time-updates

Conversation

@harshaljanjani
Copy link

@harshaljanjani harshaljanjani commented Dec 24, 2025

First contribution!

Closes #8019

Describe your changes:

→ Fixes gauge component not updating consistently in real-time mode when time bounds end is set to "now". The gauge was rejecting telemetry data with timestamps slightly in the future due to clock drift / network latency / server time differences. This fix adds a 1-second tolerance buffer to the end-of-bounds check, allowing near-future data to be accepted while still filtering out genuinely out-of-bounds telemetry.

Steps to Reproduce the Bug (Before Fix)
→ Open the tutorial in browser (https://github.com/nasa/openmct-tutorial)
→ Click "Create" → "Gauge"
→ Save the gauge in "My Items"
→ Click "Create" → "Overlay Plot"
→ Save the plot in "My Items"
→ Expand "Example Spacecraft" in the left tree
→ Drag "Generator Temperature" onto the Gauge object in the tree
→ Drag "Generator Temperature" onto the Plot object in the tree
→ Navigate to the Gauge view

Observed (Buggy) Behavior:
❌ Gauge updates sporadically (every 20-25 seconds)
❌ Plot updates smoothly and continuously
❌ Gauge and plot have inconsistent update frequencies despite receiving the same telemetry stream

Steps to Verify the Fix (After Fix)
→ Follow the same reproduction steps above
→ Navigate between Gauge and Plot views

Expected (Fixed) Behavior:
✅ Gauge updates smoothly and continuously (multiple times per second)
✅ Plot updates smoothly and continuously
✅ Both gauge and plot have consistent update frequencies
✅ Gauge shows current real-time values without delay

openmct-tutorial

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this a notable change that will require a special callout in the release notes? For example, will this break compatibility with existing APIs or projects that consume these plugins?

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?

@harshaljanjani harshaljanjani marked this pull request as ready for review December 24, 2025 01:02
@harshaljanjani
Copy link
Author

cc: @shefalijoshi @jvigliotta @akhenry

@harshaljanjani
Copy link
Author

Good day, any updates on this PR?
cc: @shefalijoshi @jvigliotta @akhenry

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.

Gauge value does not update unless the time end is set to the future some

1 participant