-
Notifications
You must be signed in to change notification settings - Fork 71.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing mmol unit conversion for lastEnacted.bg in openaps.js #8234
Conversation
The fix was confirmed to be working here, also using iAPS. Thanks @dsnallfot! |
@bewest , this PR solves a problem for mmol users. I have tested it for some time now, and it works as expected here. Perhaps consider merging this? Thanks! |
Closing PR due to no interest in this fix |
@bewest @sulkaharo is there interest for this PR to be re-opened, actually looked at and possibly accepted? |
Reopened by request from @bjornoleh |
@bewest , could you please have a look at this? The changes has been well tested for months. |
Does this fix the issue of duplicate messages in OpenAPS-log also? Or is that an AAPS-issue solely? See issue: nightscout/AndroidAPS#3571 |
This is an important fix. Thanks for @bjornoleh's additional efforts to bring this to my attention. There is a unit test for this which fails. I'm altering the code slightly in order to allow the tests to pass that makes it similar to code nearby and it allows the tests to pass. It would be a huge help to consider augmenting the openaps test to test for the mmol detection. |
Issue:
The OpenAPS pill always shows enacted bg in mg/dl and does not convert units to mmol/l when mmol/l is the chosen user setting.
After some troubleshooting together with @bjornoleh and @JeremyStorring today we found out that there currently is no mmol units conversion in the code for prop.lastEnacted.bg. All other bg conversions in openaps.js works as expected.
Solution:
This PR adds the units conversion for prop.lastEnacted.bg, and resolves the issue.
Testing
The issue was identified while using iAPS as devicestatus uploader, and the code change have been tested to work with iAPS as uploader, but are most likely relevant for openAPS uploads in general (not tested).
Please review when suitable for you, and get back with any questions @sulkaharo @bewest