nightscout / Trio

MIT License
46 stars 130 forks source link

Unable to log glucose entry > 14mmol/L #339

Open dsut4392 opened 6 days ago

dsut4392 commented 6 days ago

Describe the bug

When logging finger stick glucose entries with the app set to use mmol/L as units, values greater than 14mmol/L cannot be saved.

Attach a Log

*Tap the Trio settings icon at the bottom of the screen, then tap 'Share logs' on the bottom of the list

To Reproduce

Steps to reproduce the behavior:

  1. Set units preference to mmol/L
  2. *Click on on centre of chart, then Glucose tab
  3. Click on “Log Glucose +”
  4. Enter any value greater than “14” and the “Save” button is greyed out, the entry cannot be saved

Expected behavior

Screenshots

If applicable, add screenshots to help explain your problem. ![Uploading image.png…]()

Setup Information (please complete the following information):

Dev aa26049

Smartphone:

Pump:

CGM:

Trio Version:

Technical Details

If applicable, provide any technical details that might help in diagnosing the problem. This could include logs, error messages, or relevant configuration details.

Additional context

*switching app to mg/dL allows entry of BG values up to 720. Should this limit be lowered to reduce safety risks? Which BG meters even report a value this high?

marionbarker commented 6 days ago

I confirmed this issue.

I used the same SHA (which is the most recent dev version). The dev code is identical to the most recent alpha branch. (The SHA is different, but code is the same).

MikePlante1 commented 4 days ago

I found the offending line in DataTableRootView.swift:

Looks like post https://github.com/nightscout/Trio/pull/140 : 0.8-14 mmol/L and 40-720 mg/dL Pre-PR140 it was 2.2-21 mmol/L & 40-380 mg/dL

If we base it on the range of blood sugar meters, the popular Contour Next reads 20-600 mg/dL & 0.6-33.3 mmol/L. Strange that it can read significantly lower in mmol/L than mg/dL.

marionbarker commented 3 days ago

Are you going to do the PR or do you need me to do it?