Skip to content

Crash in dev when using mmol/L #311

Closed

Description

@ps2

When mmol/L units are selected as the default unit for blood glucose measurements in HealthKit, loop crashes on startup.

Activity

  1. ps2 commented on Dec 11, 2016

    @ps2
    CollaboratorAuthor

    @bharat It looks like we can't construct a mmol/L HKUnit from string directly.

    http://stackoverflow.com/questions/30177741/how-do-i-construct-a-healthkit-hkunit-for-mmol-l-millimoles-per-liter-for-bloo

    We do have a helper for constructing this unit: https://github.com/LoopKit/LoopKit/blob/master/LoopKit/HKUnit.swift#L17

    I'm not entirely sure how this used to work; it looks like the unit was passed in to these functions, before, and now it's a string passed in.

  2. bharat commented on Dec 11, 2016

    @bharat

    I have an idea what's going on here. Will work on it today (have a window in a couple of hours)

  3. bharat commented on Dec 11, 2016

    @bharat

    I've reproduced the issue - working on a fix now.

  4. added a commit that references this issue on Dec 11, 2016
    5838f6d
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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions