-
Notifications
You must be signed in to change notification settings - Fork 3
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
duplication of SMB ratio for tags #4
Conversation
has already been added to tddReason way before
I would suspect that more of those foul easter eggs can be hidden in oref. I can't test that thoroughly as I am on a completely different oref and iAPS branch. But this bug would have been very obvious to everyone using a different SMB ratio (!=0.5) in iAPS, if that oref-release would have been used in minimized version. |
Perhaps we should look for duplicate code in determine-basal after inclusion of findings from 05a1a2e That would probably have caught this. Can someone check this? |
Here are the lines that were included from minimised files in 05a1a2e It is not exactly the same as the lines that ended up as duplicate code and suggested to be removed by @mountrcg It looks like the duplication is caused by this line, where I agree we must remove the duplicate code, while ensuring this works as expected. Perhaps @JeremyStorring could take a look here? Specifically, I wonder why the printed SMB Ratio is capped at 1 by |
I think cd1aa93 is the correct approach for now. We may also want to introduce a real limit to avoid setting smb_delivery_ratio, but I have not looked into where that should happen. Currently, any value for smb_delivery_ratio is accepted, which can let the app issue SMBs that are larger than insulinReq (SMB = insulinReq * smb_delivery_ratio, unless otherwise restricted by SMB basal minutes or max bolus). This is in no way in line with the original oref0. |
I agree, capping should be done in Settings or while applying the SMB ratio, as done for many other settings in oref. I would prefer to have that done while defining the setting. I actually know people who use SMB ratio > 1, they would be really hooped with the current implementation. |
I will drop the above commit to keep the limit for logs/output while (re-)introducing the missing max limit for smb_ratio:
Together with this, the limit of max 1 is functional: |
cd1aa93
to
975245b
Compare
After locally merging |
@JeremyStorring , I think this should be good now. Could you give a review, and then we can probably merge with dev? Thanks! |
Everything looks good here! No further changes required :) |
Some duplication that leads to a repeated tag in popup and also missaligns the popup, due to conclusion semicolon in wrong place.