Artificial-Pancreas / iAPS

MIT License
178 stars 722 forks source link

Displayed IOB is sometimes wrong #885

Open dreksten opened 1 month ago

dreksten commented 1 month ago

In some instances the IOB displayed in iAPS is wrong. Sample timeline:

08:11 - Starting point COB = 0, IOB = 0.317 08:14 - Carbs entered. COB = 15, IOB = 0.357 08:15 - Manual bolus = 2.0 U 08:21 - SMB 1.1 U 08:26 - SMB 1.4 U

08:27 Displayed IOB = 3.28 Should be IOB = ~4.8

IMG_4923

IMG_4925

08:31 - SMB 0.5

08:35 Displayed IOB = 4.57 Should be IOB = 0.357+2+1.1+1.4+0.5 = ~5.3 (give or take) forced a loop Displayed IOB = 4.98, as expected

IMG_4929

IMG_4928

IMG_4930

Reproduced with 5.0.3 and earlier.

dreksten commented 1 month ago

relevant_log.txt

dreksten commented 1 month ago

One more occurrance two days later. From the log:

2024-09-27T07:46:01+0200 "IOB": -0.077 ... 2024-09-27T07:46:03+0200 [ApsManager] APSManager.swift - enactBolus(units:automatic:) - 1367 - DEV: Bolus succeeded: 1.5 ... 2024-09-27T07:51:06+0200 [ApsManager] APSManager.swift - enactBolus(units:automatic:) - 1367 - DEV: Bolus succeeded: 1.5

At 07:53, iAPS is showing IOB as 1.37, even though 3 U has been given on top of a starting point of -0.077:

IMG_4969

IMG_4970

relevant_log_20240927.txt

dreksten commented 1 month ago

iPhone 15 Pro + iOS 17.7