Skip to content

Display of mmol/L units  #159

Closed
Closed

Description

@beached

It looks like Loop is trying to display too many digits for mmol/L. Only 3 are ever needed at most. Actually , when the pump reports a bg <=99mg/dl only 2 are needed( so <=5.5mmol/L) but for consistency 3 is usually fine.

As one can see, this causes formatting bugs
bg display

Seeing as the data from the pump expresses the info in mg/dl and generally has 3 significant digits this could be accomplished with a formatting flag of %.1f

Activity

  1. beached commented on Sep 5, 2016

    @beached
    ContributorAuthor

    I am testing the use of

    numberFormatter.usesSignificantDigits = true
    numberFormatter.minimumSignificantDigits = 2
    numberFormatter.maximumSignificantDigits = 3
    

    To format the glucose hud display.

  2. loudnate commented on Sep 5, 2016

    @loudnate
    Collaborator

    Thanks – the NSNumberFormatter significant digits setting is exactly how I planned to fix these cases.

    The screenshots are really helpful. Please add any more where things aren't correct to this ticket!

  3. beached commented on Sep 5, 2016

    @beached
    ContributorAuthor

    I was thinking that maybe, excuse my swift, but a member of the HKUnit that formats blood glocose or a subtype of sorts that does it. then any string for a glucose uses that.

  4. loudnate commented on Sep 5, 2016

    @loudnate
    Collaborator
  5. beached commented on Sep 6, 2016

    @beached
    ContributorAuthor

    So that fixed the issue in issue in the glucosehud. Not the graphs or other areas.
    fixed

  6. beached commented on Sep 16, 2016

    @beached
    ContributorAuthor

    Looks like the retrospective correction screen is hardwired to mg/dl
    image

  7. beached commented on Sep 16, 2016

    @beached
    ContributorAuthor

    Actually, I am wrong, it does eventually but the scale is off
    image

  8. beached commented on Sep 16, 2016

    @beached
    ContributorAuthor

    The units updated after checking/unchecking

  9. added this to the 1.0 milestone on Sep 17, 2016
  10. added 2 commits that reference this issue on Sep 29, 2016
    b07de8a
    339625b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions