Skip to content

Display CGM Data in mmol vs. mg/dL #87

Closed

Description

@apabari

Was able to pull some CGM data from Dexcom Share. As a Canadian user I am displaying data in mmol; however, data is only being displayed in mg/DL in loop.

Could this be a configurable item for the CGM data graph?

Activity

  1. loudnate commented on Jul 24, 2016

    @loudnate
    Collaborator

    Absolutely, though no setting is necessary because the setting exists in HealthKit.
    LoopKit/LoopKit#27 is a pre-requisite here.

    Please don't hesitate to file any additional issues you encounter with units.

  2. apabari commented on Jul 27, 2016

    @apabari
    ContributorAuthor

    Is a code change required to enable this? My settings in HealthKit are in mmol. Interestingly, the Glucose value listed in loop (at the bottom of the app) is displayed in mmol. But the graph view is displaying in mg/DL.

  3. loudnate commented on Jul 27, 2016

    @loudnate
    Collaborator

    Yes, this is something I plan to fix. If you'd like to just quickly change your code in the meantime, you'll find two "TODO" items in this file.

    https://github.com/loudnate/Loop/blob/master/Loop/Managers/StatusChartManager.swift

  4. apabari commented on Aug 2, 2016

    @apabari
    ContributorAuthor

    I just tried modifying the code, but I noticed that the glucose predictions are not being displayed properly when I change the units. The graph is also showing from 0 to 50 units, which makes the line almost flat regardless. I'm not sure how to change that -- my own lack of knowledge of this software language, I'm sure. If you have a chance to direct me at which lines I need to modify, in the meantime, that would be great.

    Thanks!

  5. scottleibrand commented on Aug 2, 2016

    @scottleibrand

    I believe that scale is logarithmic, not linear, so even if it goes to 50 it should still show temps.

  6. beached commented on Aug 3, 2016

    @beached
    Contributor

    I changed line 258 to adjust the scale. The segments where set to 25 units of whatever and a max of 4 of them. I changed it to 5 units per segment with a max of 5.

  7. added this to the 0.10.0 milestone on Aug 6, 2016
  8. self-assigned this
    on Aug 6, 2016
  9. added 2 commits that reference this issue on Aug 7, 2016
    535e944
    3ff93e9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions