Skip to content

remote_window: add version compatible with Loop next-dev#80

Open
bjorkert wants to merge 1 commit into
mainfrom
nextdev_remote_window
Open

remote_window: add version compatible with Loop next-dev#80
bjorkert wants to merge 1 commit into
mainfrom
nextdev_remote_window

Conversation

@bjorkert

Copy link
Copy Markdown
Member

The existing remote_window patches do not apply to the Loop next-dev branch, so the customization shows as incompatible.

On next-dev the remote-command and dosing path was restructured (async/await delivery, the dosing delegate moved from DeviceDataManager to LoopAppManager, and several store APIs changed), so the original ~1700-line patch no longer applies. This version reproduces the customization's two behaviors with a smaller, retargeted change (14 files across the Loop, LoopKit, and NightscoutService submodules):

  • Widened remote window — the OTP acceptance window and the notification expiration are extended to 10 minutes, so a remote command stays valid longer.
  • Double-bolus / conflicting-treatment protection — a remote bolus has any bolus delivered within 10 minutes of the command's send time subtracted from it (and is rejected if that nets to zero); remote carbs are rejected if any carb entry exists in that window. This prevents a duplicated or retried remote command from double-dosing.

Test

Requires LoopWorkspace on the Loop next-dev branch. No lnl-scripts change is needed; only PATCH_BRANCH is overridden.

reset command

This command resets the branch to default state.

git submodule foreach 'git reset --hard; git clean -fd;'

apply

export PATCH_BRANCH="nextdev_remote_window"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/loopandlearn/lnl-scripts/main/CustomizationSelect.sh)" \
    remote_window
unset PATCH_BRANCH

Suggested checks (Nightscout + pump simulator, Remote Commands enabled): a single remote bolus; the same command sent twice (rejected as duplicate); a second command within 10 minutes covered by a prior bolus (reduced or refused); an OTP older than 10 minutes (expired); remote carbs with a recent carb entry (rejected).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant