xDrip-Experimental icon indicating copy to clipboard operation
xDrip-Experimental copied to clipboard

Only show two decimal places on mmol/l when delta is below 0.1 mmol

Open jamorham opened this issue 9 years ago • 4 comments

BG values in mmol/l are normally only expressed to a single decimal place by glucose meters etc. The only time I feel two decimal places would be useful is when it would otherwise display 0.0 and then the additional accuracy could be useful to see exactly how "flat" a slope really is.

Prior to this patch, displaying two decimal places I think reduces the speed at which someone can read the display as they have to mentally examine the extra digit and reduces the "at a glance" value of the delta display.

Should I be submitting patches to master or the beta-2 branch? I am not clear which is the most appropriate channel.

jamorham avatar Sep 18 '15 09:09 jamorham

Are there any conflicts with: https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/pull/154 ?

AdrianLxM avatar Sep 18 '15 10:09 AdrianLxM

I think this will break on the pebble, no?

I am pretty sure that the current pebble implementation asks for the low resolution number without units (mg/dl or mmol) and uses the decimal point to determine which it is and then formats this on the watch face itself.

The not yet released watch face from @jstevensog (which has the associated pull request 154) requests the fully formatted delta string including high resolution number and the units and then just prints these without attempting to interpret them so that the display of the delta is unified between all the interfaces.

Assuming this is correct then the pebble will work identically to how it works right now until the new watch face is released and then it will print 1 or 2 decimal places for mmol in the same way as the widget and home screen do. My patch doesn't do anything regarding mg/dl.

If it helps, I am running the current watch face on pebble classic with this patch and all is good.

jamorham avatar Sep 18 '15 13:09 jamorham

Actually, to be clear, the new "dumb" watch face does not request anything. The old watch face EXPECTS a Delta with a period decimal place in it, and only two decimal places in mmol/l, and no unit string attached. All because it does some funky "convert to integer, look for a decimal point, and if there is one there it is mmol) kind of crap coding. Likely because of what it could get out of NS at the time it was written.

The new one just accepts a string (even one too large and trims it) for everything but time stamps. Still have to work on the bridge/phone battery string, as it expects only digits there, but that is not as important as the Delta showing everything as xDrip does.

I would recommend pushing the new watch face to the Pebble store a few days before a release with this and #154 merged in. The dumb watch face will handle an xDrip without the merges, except it will only show the delta without the units (I mean, seriously, you should know what your units are, it's only aesthetic) until the xDrip with merges is installed on the phone.

But since this merge limits the decimal places for mmol, I will test if the units being attached causes an issue. Gimme a couple of days, the weather is good and the misses has a list ;) Cheers

On Fri, Sep 18, 2015 at 11:45 PM, Jamorham [email protected] wrote:

I am pretty sure that the current pebble implementation asks for the low resolution number without units (mg/dl or mmol) and uses the decimal point to determine which it is and then formats this on the watch face itself.

The not yet released watch face from @jstevensog https://github.com/jstevensog (which has the associated pull request 154) requests the fully formatted delta string including high resolution number and the units and then just prints these without attempting to interpret them so that the display of the delta is unified between all the interfaces.

Assuming this is correct then the pebble will work identically to how it works right now until the new watch face is released and then it will print 1 or 2 decimal places for mmol in the same way as the widget and home screen do. My patch doesn't do anything regarding mg/dl.

If it helps, I am running the current watch face on pebble classic with this patch and all is good.

— Reply to this email directly or view it on GitHub https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/pull/155#issuecomment-141455574 .

John Stevens "You are how you live, not what you have."

jstevensog avatar Sep 18 '15 20:09 jstevensog