-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add recommended bolus and pump bolus increment to Nightscout devicestatus #793
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
Add recommended bolus and pump bolus increment to Nightscout devicestatus #793
Conversation
|
I made some updates to this PR, see below:
|
|
My son is using this branch, it has been running without issues. Currently developing the LoopFollow side of this. |
|
Doing some refactoring and re-implementing upload triggering from APSManager to catch situations where the upload based on data fails, but in a way that prevent duplicate uploads. Changing this PR to a draft while working/testing. |
… throttle) + APS triggers uploads
|
Pulled the Nightscout subscriber logic into BaseNightscoutManager+Subscribers.swift and added lane-based “kick” pipelines (2s throttle) to avoid double uploads. APSManager now requests uploads via requestNightscoutUpload (carbs/pumpHistory/overrides/tempTargets). I'll resume testing and will open up this for review again if/when I am happy with the tests. |
dnzxy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll approve this based on in-vivo testing on my end and in-vivo testing with LFxTrio on @bjorkert 's end with his son's setup.
Jonas and I have discussed this PR extensively via DM over the last ~2 weeks.
Are we okay with the naming and changes here? Functionality-wise it's okay, but it is a bigger change, so asking you folks, too, @marv-out @kingst .
kingst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this LGTM. I didn't test it, my review is just from reading the code. I have one optional suggestion and one question but in general this PR is ready to go.
Trio/Sources/Services/Network/Nightscout/BaseNightscoutManager+Subscribers.swift
Outdated
Show resolved
Hide resolved
|
[bjorkert] I wanted to thank you for this feature, which thanks to you, hundreds of people are using for their children. It works great with precise advice. I also thank all the other developers who make life easier for all of us. Thank you... |
|
How are 100s of users using a feature that has not been merged to either LoopFollow or Trio, @salguccio ? |
|
If @kingst is fine with these changes, so am I. LGTM! |
kingst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes lgtm, ship it!
I help so many people who personally ask me for help... and I apply the patch because I know it works without any problems... in fact I can't wait for you to publish the dev version applying everything natively... if you want I can have you write to the people who are using it for their children personally... I created a chat on WhatsApp of all of us users I'll send you the screenshot of how many we are... Anyway thanks guys... you are precious for us dysbetics and for the parents THANK YOU....!!!! |
Please don’t do that @salguccio . The whole point of a pull request is for developers (read: people who understand the changes and possible side effects) to have the chance to review the code, test it, if necessary ask for adjustments, and once approved, have it merged. Unless you are specifically asked to build a pull request to test it, you DO NOT just apply it and you absolutely DO NOT ship an unfinished pull request to other users who run Trio ON THEIR CHILDREN. I am AMAZED I need to put this in writing. |


This PR adds two fields to the Nightscout upload so clients like LoopFollow can display a correction recommendation and respect the pump’s bolus step:
• openaps.recommendedBolus — the treatment view equivalent recommended correction bolus, for no new carbs.
• pump.bolusIncrement — the smallest supported bolus volume from the active pump.