Closed kskandis closed 3 weeks ago
I think perhaps AAPS targets should be handled the same way as Trio targets, using only / mainly the lower target, instead of the median of lower/upper target range, as seems to be the case in this PR currently. We use the same algorithm, and I would expect the same behaviour regarding targets.
From https://androidaps.readthedocs.io/en/latest/Configuration/Config-Builder.html#closed-loop: Please note: In closed loop mode a single target instead of target range (i.e. 5,5 mmol or 100 mg/dl instead of 5,0 - 7,0 mmol or 90 - 125 mg/dl) is recommended.
@marionbarker or @bjorkert – could you please test this, and if good, give your approval please?
Success: This PR worked as expected.
I applied this patch to dev (commit 4d6e102a).
After applying the patch and building again, I imported my settings again.
Merging with two approvals
Resolves NS Settings Import: Set median of lower and upper correction range bound when importing Loop settings by:
Sets Trio's target correction low and high to median of lower and upper target range when NS profile's enteredBy is Loop. Rounds median value to 0 or 1 significant digits depending on Glucose unit (0 for mg/dL, 1 for mmol/L).
EDIT: This issue probably applies to AAPS, too, since it also uses a low and high target. examples.json shows its
profileJson
withtarget_low
andtarget_high
. I cannot test it w/out having an actual "openaps://AndroidAPS" profile though.I think merged PR, Remove unused Import Settings in JSON that cause errors decoding JSON #249, also applies to AAPS.