Skip to content

Restore pump status in Nightscout device status uploads#2

Closed
bjorkert wants to merge 1 commit into
loopkitdev:next-devfrom
bjorkert:restore-pump-devicestatus
Closed

Restore pump status in Nightscout device status uploads#2
bjorkert wants to merge 1 commit into
loopkitdev:next-devfrom
bjorkert:restore-pump-devicestatus

Conversation

@bjorkert

Copy link
Copy Markdown

The next-dev rewrite of LoopDataManager dropped the code that attached device status to the dosing decisions Nightscout uploads. As a result devicestatus is missing its entire pump object — clock, reservoir, model, and so on — which downstream tools (Nightscout, LoopFollow) rely on. On current dev these fields were populated in update(for:).

NightscoutServiceKit's StoredDosingDecision.pumpStatus returns nil unless pumpManagerStatus is set, so with these fields unset the whole pump block is omitted from every upload.

This restores the same fields dev set, on the decisions NightscoutService actually uploads:

  • updateRemoteRecommendation (routine): pumpManagerStatus, pumpStatusHighlight, cgmManagerStatus, lastReservoirValue
  • manual bolus decisions: pumpManagerStatus, cgmManagerStatus (lastReservoirValue was already set)

DeliveryDelegate gains pumpManagerStatus, pumpStatusHighlight, and cgmManagerStatus; DeviceDataManager already provides all three.

Populate pumpManagerStatus, pumpStatusHighlight, cgmManagerStatus, and lastReservoirValue on the dosing decisions NightscoutService uploads, so the devicestatus pump object (clock, reservoir, model, ...) is no longer omitted.
@bjorkert

Copy link
Copy Markdown
Author

Moving this to LoopKit#2460, since LoopKit/Loop is now the next-dev source.

@bjorkert bjorkert closed this Jul 18, 2026
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