{"action":"created","issue":{"url":"https://api.github.com/repos/openaps/openaps/issues/53","labels_url":"https://api.github.com/repos/openaps/openaps/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/openaps/openaps/issues/53/comments","events_url":"https://api.github.com/repos/openaps/openaps/issues/53/events","html_url":"https://github.com/openaps/openaps/pull/53","id":108566011,"number":53,"title":"Make read_bg_targets only ever return data in mg/dL, not mmol/L","user":{"login":"oskarpearson","id":129002,"avatar_url":"https://avatars.githubusercontent.com/u/129002?v=3","gravatar_id":"","url":"https://api.github.com/users/oskarpearson","html_url":"https://github.com/oskarpearson","followers_url":"https://api.github.com/users/oskarpearson/followers","following_url":"https://api.github.com/users/oskarpearson/following{/other_user}","gists_url":"https://api.github.com/users/oskarpearson/gists{/gist_id}","starred_url":"https://api.github.com/users/oskarpearson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oskarpearson/subscriptions","organizations_url":"https://api.github.com/users/oskarpearson/orgs","repos_url":"https://api.github.com/users/oskarpearson/repos","events_url":"https://api.github.com/users/oskarpearson/events{/privacy}","received_events_url":"https://api.github.com/users/oskarpearson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-09-27T22:58:02Z","updated_at":"2015-10-17T05:21:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openaps/openaps/pulls/53","html_url":"https://github.com/openaps/openaps/pull/53","diff_url":"https://github.com/openaps/openaps/pull/53.diff","patch_url":"https://github.com/openaps/openaps/pull/53.patch"},"body":"The OpenAPS system universally uses mg/dL for data. This helps ensure user\r\nsafety by ensuring we never mix up mg/dL and mmol/L.\r\n\r\nHowever, the read_bg_targets code would return the values in the user-selected\r\nmeasurement unit.\r\n\r\nThis patch makes the openaps system only ever write mg/dL to the read_bg_targets\r\nfile, and then stores the user-preferred value into the file.\r\n\r\nAdditionally, this change includes features to:\r\n* Convert from mg/dL to mmol/L and vs versa\r\n* Functions to support uniform display of mg/dL and mmol/L (by handling rounding\r\n  appropriately, since the significant digit 6 in '5.6mmol/l' is significant,\r\n  while the 6 in 100.6mg/dL is not signficant)\r\n\r\nThis change also introduces a testing framework into the repository, so that we\r\ncan test these functions."},"comment":{"url":"https://api.github.com/repos/openaps/openaps/issues/comments/148886687","html_url":"https://github.com/openaps/openaps/pull/53#issuecomment-148886687","issue_url":"https://api.github.com/repos/openaps/openaps/issues/53","id":148886687,"user":{"login":"oskarpearson","id":129002,"avatar_url":"https://avatars.githubusercontent.com/u/129002?v=3","gravatar_id":"","url":"https://api.github.com/users/oskarpearson","html_url":"https://github.com/oskarpearson","followers_url":"https://api.github.com/users/oskarpearson/followers","following_url":"https://api.github.com/users/oskarpearson/following{/other_user}","gists_url":"https://api.github.com/users/oskarpearson/gists{/gist_id}","starred_url":"https://api.github.com/users/oskarpearson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oskarpearson/subscriptions","organizations_url":"https://api.github.com/users/oskarpearson/orgs","repos_url":"https://api.github.com/users/oskarpearson/repos","events_url":"https://api.github.com/users/oskarpearson/events{/privacy}","received_events_url":"https://api.github.com/users/oskarpearson/received_events","type":"User","site_admin":false},"created_at":"2015-10-17T05:21:01Z","updated_at":"2015-10-17T05:21:01Z","body":"Closing this as it's resolved by https://github.com/openaps/openaps/pull/62 "}}