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

#1455: Don’t cancel a <10m old high temp due to lack of BG data #1456

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

scottleibrand
Copy link
Contributor

#1455

When running offline with multiple rigs, the rig with connected CGM will set a high temp, and the other without CGM data will immediately cancel it.

Let's not cancel a high temp due to lack of BG data if the temp has been running for less than 10m.

@scottleibrand
Copy link
Contributor Author

Testing with oref0-ns-loop purposefully broken:

No deliverAt found.
{"reason":"If current system time Sat Aug 19 2023 19:51:30 GMT-0700 (PDT) is correct, then BG data is too old. The last BG data was read 19.7m ago at Sat Aug 19 2023 19:31:49 GMT-0700 (PDT)lastTempAge of 0 < 10m; doing nothing. "}
Couldn't smb_verify_suggested
oref0-pump-loop failed. Waiting up to 4 minutes for new BG: .......

Will add a , but there.

@scottleibrand
Copy link
Contributor Author

scottleibrand commented Aug 20, 2023

Looking good now in testing:

Temp refreshed: monitor/temp_basal.json: {"duration":51,"temp":"absolute","rate":0}
Autotune exists! Hoorah! You can use microbolus-related features.
{"iob":0.295,"activity":0.0075,"basaliob":-0.095,"bolusiob":0.389,"netbasalinsulin":-2.5,"bolusinsulin":5.9,"time":"2023-08-20T04:39:38.000Z","iobWithZeroTemp":{"iob":0.295,"activity":0.0075,"basaliob":-0.095,"bolusiob":0.389,"netbasalinsulin":-2.5,"bolusinsulin":5.9,"time":"2023-08-20T04:39:38.000Z"},"lastBolusTime":1692497386000,"lastTemp":{"rate":0,"timestamp":"2023-08-19T21:29:15-07:00","started_at":"2023-08-20T04:29:15.000Z","date":1692505755000,"duration":0.03}}
{"delta":-1,"glucose":152,"noise":null,"short_avgdelta":-0.17,"long_avgdelta":3.46,"date":1692504407000,"last_cal":0,"device":"share2"}
null
No deliverAt found.
{"reason":"If current system time Sat Aug 19 2023 21:40:28 GMT-0700 (PDT) is correct, then BG data is too old. The last BG data was read 33.7m ago at Sat Aug 19 2023 21:06:47 GMT-0700 (PDT), but lastTempAge of 9 < 10m; doing nothing. "}
Couldn't smb_verify_suggested

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

Successfully merging this pull request may close these issues.

1 participant