nightscout / AndroidAPS

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

[3.1.0.3-dev-b] NSClient Statistics line with zeros | Force recalculation #2122

Closed szantos closed 1 year ago

szantos commented 2 years ago

image

image

NSClient Statistics is sometimes unable to calculate and saves a line with zeros (and 0,1s). This compromises statistics 7 days long, until it disappears.

Reproduction: After switching on wifi on the NSClient-phone in the morning data gets loaded and processed. If statistics are calculated during this period, it fails. Maybe it can fail other times, too.

Workaround: Adding an ability to force recalculation? Maybe with an additional button?

Build: c3ed8233db

MilosKozak commented 2 years ago

adding data to that days should cause recalculation

szantos commented 2 years ago

All data was there later that day, too. And it is still there in history browser. Waiting for history browser to fully load and opening Statistics after that, changed nothing.

MilosKozak commented 2 years ago

add a history microbolus for example

szantos commented 2 years ago

With NSClient there is no ability to add historical insulin

I've tried in NSClient with 1g carb:

After that 0,1U in AAPS master has been added:

Are you sure there is a recalculation for past days, too? Results seem to be cached.

MilosKozak commented 2 years ago

found a bug https://github.com/nightscout/AndroidAPS/commit/d6e3fa9a7510e3c6f29cb91a2dcd86c41ee2a4cb fix is in dev

szantos commented 2 years ago

Thanks!

MilosKozak commented 1 year ago

https://github.com/nightscout/AndroidAPS/commit/0ff8161cda29477d2c179332702d6d28948febf0