Closed yodax closed 2 years ago
Hi. I have refactored the loop routine, but applied your change in this commit https://github.com/ivalkou/freeaps/commit/26cf2796915578a67c6e11a8304c7c97b078d314
Thanks for the quick fix/refactor! I've just installed it on my kids phone, the Nightscout upload is working properly 👍 It seems to diverge a bit from my change, but it seems to be more inline with what Nightscout wants. I see two device status records per BG, the suggested and enacted. That makes sense to me. Great work 😄
It also means that one should regularly delete device status from mongo as it quickly fills the database. I think in AAPS is a setting now to delete device status older than 3 months from mongo db.
Hi,
We've started trying out FreeAPS last Friday. So far it's been amazing. Thanks for the effort in building this! 👍
I noticed that in Nightscout we had 2 device status records for every loop, one enacted and one not. This caused the prediction lines and the pill to randomly disappear. I started tracing the code and found that self.enactSuggested() already does an upload. So I've moved the Nightscout.uploadStatus to the open loop section.
This doesn't completely fix the predictions disappearing, they now only show when the loop is enacted, but I think this is a nightscout problem. I'm looking into that as well. Someone using AndroidAPS mentioned that it happens there too. At least the device status records are populated correctly in Mongo.
My experience with the codebase is obviously very limited since I only started tinkering 2 days ago. So if this is not the right location to fix this, let me know and I'll try to fix it/help.