-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Limit high blood glucose values shown on the graph to 400 mg/dL #2652
Limit high blood glucose values shown on the graph to 400 mg/dL #2652
Conversation
Instead of doing it conditionally like this use |
@tzachi-dar I have made the change that jamorham suggested. |
You can do the math.min before the unitized I think to avoid doing additional conversions where one will be discarded. |
Generally looks good.
|
@tzachi-dar @jamorham I now do Math.min first to pick one of the two candidates. Then, I run unitized only once on the result. This was caught by jamorham and thanks for catching it. With respect to your suggestion, I can add a constant if necessary. Is it? But, are you OK with the overall concept? This affects Libre raw. Are you OK with us limiting what is shown on screen to 400 in that case? |
yes, we should not have values on the screen higher than 400. In most times this is just noise, and the 'damage' remains for 24 hours. |
You can use |
Replaced 400 with the existing max value constant. Compiled and is running on my phone. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it should work
This is what a user has got with show Libre trend enabled.
![326923318_582882383746798_5979460552736510366_n](https://user-images.githubusercontent.com/51497406/215301002-04a065d4-10eb-4d44-a700-bfae02921b25.jpg)
This makes the variations on the curve look nonexistent obviously due to the significant dynamic range.
We already limit readings to 400 here:
xDrip/app/src/main/java/com/eveningoutpost/dexdrip/UtilityModels/BgGraphBuilder.java
Lines 1265 to 1266 in b58ca21
But, not everywhere.
This PR does the same to other sources.
It would make xDrip's behavior consistent.
I am currently running this.