nightscout / nightscout/AndroidAPS
Dynamic MAXSMB
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 1.2k
- Forks
- 6.4k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 19
Description
Sharing ideias... Dynamic MAXSMB. It means dynamic MaxSMB. Not fixed one based on preferences. It means flexibility to limit SMB size. This code is based on BG and delta maxSMB is the preferences value: //Dynamic Max SMB
DynMaxSmb = (((bg / 200) * (bg / 100)) + (delta / 2)).toDouble()
val MaxlimitSMB = maxSMB * 1.15
if (DynMaxSmb < 0.1) {
DynMaxSmb = 0.1
} else if (DynMaxSmb < maxSMB) {
DynMaxSmb = DynMaxSmb
} else if (DynMaxSmb > maxSMB && bg > 149 && delta >= 3) {
DynMaxSmb = MaxlimitSMB
} else {
DynMaxSmb = maxSMB.toDouble()
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by locating the existing maxSMB preference and the code that calculates or applies the SMB limit, then compare that flow with the proposed Kotlin formula. Done means the limit is calculated dynamically from bg and delta rather than fixed solely by preferences, while respecting the bounds shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100