nightscout / Trio

MIT License
45 stars 125 forks source link

NS Settings Import: Set median of lower and upper correction range bound when importing Loop settings #252

Closed dnzxy closed 3 weeks ago

dnzxy commented 1 month ago

Is your feature request related to a problem? Please describe.

When importing settings from NS that were uploaded to NS from Loop, there are upper and lower correction range limits stored in NS. This is downloaded to Trio, but the lower end is set as target, as Trio does not have a correction or target range.

Describe the solution you'd like

Do not set the lower bound of the correction range as target, but the median of upper and lower.

Additional context

This came up when testing PR #249 which solves issue #245

User Impact

Ensures a safer Trio target, as Loop already aims to get to "center" of correction range; thus this is the target new Trio users will want to use upon importing their settings.

Sjoerd-Bo3 commented 1 month ago

@kskandis This is the one I was talking about. All yours if you want to!