Skip to content
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

Conversion of rT variables in oref #29

Open
mountrcg opened this issue Jun 20, 2024 · 1 comment
Open

Conversion of rT variables in oref #29

mountrcg opened this issue Jun 20, 2024 · 1 comment

Comments

@mountrcg
Copy link
Contributor

Describe the bug
in determine-basal starting at

rT.COB=meal_data.mealCOB;
several rT.variables are converted into the users choice of glucose unit. Due to this ISF e.g. will only be updated in Trio to the new unit after a new loop, as it is converted in oref and not in Trio.

Expected behavior
All oref results should be passed in mg/dL and only the rT.reason should contain converted glucose related variables. In Trio those values would be saved in mg/dL and the conversion if needed would be done in Trio. Therefore no additional Loop is needed after changing glucose unit.

Additional context
fix would need an oref and trio PR for:

  1. ISF
  2. deviation
  3. BGI

I am not sure though whether 2 & 3 are needed in Trio.

@mountrcg
Copy link
Contributor Author

PR #30 and nightscout/Trio#327 addressed that issue and I tested that fix successfully!

As Trio does not show ISF anywhere on UI, only watch can be used to review the changes.
Old sitiuation - ISF is only shown converted after a new loop

original state ISF after unit change, no new loop after new loop
Simulator Screenshot - Dev 13 mini - 2024-06-24 at 09 27 37 Simulator Screenshot - Dev 13 mini - 2024-06-24 at 09 27 59 Simulator Screenshot - Dev 13 mini - 2024-06-24 at 09 32 58
Simulator Screenshot - Apple Watch Series 7 (45mm) - 2024-06-24 at 09 27 39 Simulator Screenshot - Apple Watch Series 7 (45mm) - 2024-06-24 at 09 28 01 Simulator Screenshot - Apple Watch Series 7 (45mm) - 2024-06-24 at 09 32 52

After change, ISF is immediatly converted after changing units on phone. As it can be seen the popup still shows units from last loop, watch already has ISF converted.

original state ISF after unit change, no new loop
Simulator Screenshot - Dev 13 mini - 2024-06-24 at 08 57 34 Simulator Screenshot - Dev 13 mini - 2024-06-24 at 08 57 47
Simulator Screenshot - Apple Watch Series 7 (45mm) - 2024-06-24 at 08 57 35 Simulator Screenshot - Apple Watch Series 7 (45mm) - 2024-06-24 at 08 57 49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant