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

Calibration Assistant Function #386

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

paulplant
Copy link
Collaborator

This PR introduces a calibration assistant function to xdripswift.

When the user clicks calibrate, the previous x minutes of BG data is analysed (delta change, std deviation and current BG level), weightings are applied to the deviations calculated from the programmed limits and a result is output.

Based upon this result to user is allowed to calibrate normally or they are asked to consider waiting, or they are told directly to not calibrate.

A debug option is in developer settings to show the calculations in the UIAlert to allow troubleshooting. The results and recommendation are also logged to the trace file.

The user can enable a visual assistant that will change the calibration icon colour (every time a new BG is processed) to indicate if it is a good time to calibrate or not.

EN and ES translations are included

Example screenshot:

3451DF4F-4657-465F-A150-6F816B2DB3DE_1_105_c

@paulplant paulplant added the enhancement New feature or request label Sep 22, 2022
@paulplant
Copy link
Collaborator Author

Don't merge yet. I will make changes first.

This commit introduces a calibration assistant function to xdripswift.
When the user clicks calibrate, the previous x minutes of BG data is analysed (delta change, std deviation and current BG level), weightings are applied to the deviations calculated from the programmed limits and a result is output. Based upon this result to user is allowed to calibrate normally or they are asked to consider waiting, or they are told directly to not calibrate.
A debug option is in developer settings to show the calculations in the UIAlert to allow troubleshooting.
The results and recommendation are also logged to the trace file.
The user can enable a visual assistant that will change the calibration icon colour (every time a new BG is processed) to indicate if it is a good time to calibrate or not.
EN and ES translations are included
- low both long and short-term stability are considered in an effort to detect when there is outliers/noise in the last 90 minutes (configurable) or situations that indicate that either carbs or insulin would have been used recently that could mean the BG is about the change
- variable/constants renamed for clarity
- alert logic changed. If the user is informed that their BG has been rising/falling, there is no need to inform that that their BG is also unstable
- in the long term instability message, the number of minutes are added so that the user understands that it's a historical issue, not just with current BG values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant