nightscout / AndroidAPS

Opensource automated insulin delivery system (closed loop)
https://wiki.aaps.app
GNU Affero General Public License v3.0
695 stars 1.7k forks source link

3.0.0.2-dev-l: mmol/l / mg/dl bug #1805

Closed diabetesdiyaps closed 2 years ago

diabetesdiyaps commented 2 years ago

Build version: 3.0.0.2-dev-l

Yesterday setup a test environment for dynISF using my phone and personal accounts (Nightscout, Heroku, xDrip) for it. All have the same version as my girlfriend. My T1D girlfriend is using the production environment ;-)

Found a bug in dev-l in conversion mmol/l and mg/dl:

See screenshots for a deep dive:

treatments With dev-l in main window when I switch units it goes wrong:

overview mmoll Set AndroidAPS units in mmol/l

overview mgdl Set AndroidAPS units in mg/dl

nostubs No stubs in this test-round ;)

For my the upcoming days / weeks it's possible to re-test, upload log files or build a new dev version to test. Love to help.

Dev's, great job so far !!

All the best, Peter

petervanrijt commented 2 years ago

Created this issue with my testing account (diabetesdiyaps). This response by my personal account. Performed some detail testing tonight:

AndroidAPS 3.0.0.2

  1. AndroidAPS in mmol/l, Nightscout in mmol/l. Bolus wizard BG 5.5, carbs 20g. In Nightscout report treatments: BG 5.5
  2. AndroidAPS in mmol/l, Nightscout in mg/dl . Bolus wizard BG 5.5, carbs 20g. In Nightscout report treatments: BG 5.5
  3. AndroidAPS in mg/dl , Nightscout in mmol/l. Bolus wizard BG 99, carbs 20g. In Nightscout report treatments: BG 99
  4. AndroidAPS in mg/dl , Nightscout in mg/dl . Bolus wizard BG 99, carbs 20g. In Nightscout report treatments: BG 99

AndroidAPS 3.0.0.2-dev-l

  1. AndroidAPS in mmol/l, Nightscout in mmol/l. Bolus wizard BG 5.5, carbs 40g. In Nightscout report treatments: BG 99
  2. AndroidAPS in mmol/l, Nightscout in mg/dl . Bolus wizard BG 5.5, carbs 40g. In Nightscout report treatments: BG 99
  3. AndroidAPS in mg/dl , Nightscout in mmol/l. Bolus wizard BG 99, carbs 40g. In Nightscout report treatments: BG 99
  4. AndroidAPS in mg/dl , Nightscout in mg/dl . Bolus wizard BG 99, carbs 40g. In Nightscout report treatments: BG 99

Expected in 5 and 6 is a BG in Nightscout report treatments of 5.5 instead of 99.

petervanrijt commented 2 years ago

Hi,

An update on the findings. Writing to NIghtscout still is in mg/dl instead of mmol/l. But, in a chat with another Dutch user I heard he did not have trouble with his screen "mmol/l / mg/dl stripes" to occur. So I have tested again.

I saw when the switch is "too fast" there's a screen error (see below). When I don't wait for the blue bar to completely finished to right the screen has "mmol/l mg/dl stripes". A good workaround is to Exit the app and restart, the screen will be OK after loading.

Perhaps an idea to pop-up a message after switching from mg/dl to mmol/l to wait completely for the screen to load, or to Exit the app and reboot immediately?

Thanks and all the best, Peter

171996742-5a9dfe93-8a79-453c-93d3-1525f8ef4768

MilosKozak commented 2 years ago

issue is on NS side. it doesn't convert value to units selectwed in settings. I set at least upload to units selected in AAPS https://github.com/nightscout/AndroidAPS/commit/70f365960052ec28f6844538559c8cd38bf32220 So far it was always in MGDL

petervanrijt commented 2 years ago

Thank you @MilosKozak !