Skip to content

Fix calibration decoding, and lagged backfill processing #35

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

Merged
merged 1 commit into from
Apr 17, 2025
Merged

Conversation

ps2
Copy link
Contributor

@ps2 ps2 commented Apr 14, 2025

Calibration flag was not being decoded correctly, and all readings were marked as non-calibration. This fixes that.

If iOS drops the backfillFinished message, the backfill buffer might contain old messages, and get flushed at a much later time improperly. If the flushing happens after a new sensor is paired, the timestamp interpretation can be very off (by applying the large backfill offsets to the new sensor start date) See LoopKit/Loop#2291. This change flushes the backfill buffer on sensor disconnect, if there is anything in it.

@ps2
Copy link
Contributor Author

ps2 commented Apr 14, 2025

Fixes LoopKit/Loop#2291

Copy link
Contributor

@marionbarker marionbarker left a comment

Choose a reason for hiding this comment

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

Code review looks reasonable (not an expert).

I will build and get this on Katie's phone - she does a lot of calibrations.

Copy link
Contributor

@marionbarker marionbarker left a comment

Choose a reason for hiding this comment

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

This has run successfully for several days for two people (smoke test only).

I also ran the Tests and the new additions passed, as did all the other tests in LoopWorkspace dev.

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.

2 participants