Skip to content

Upload isCharging in uploader device status#26

Merged
ps2 merged 1 commit into
LoopKit:devfrom
bjorkert:add-uploader-ischarging
Jun 26, 2026
Merged

Upload isCharging in uploader device status#26
ps2 merged 1 commit into
LoopKit:devfrom
bjorkert:add-uploader-ischarging

Conversation

@bjorkert

@bjorkert bjorkert commented Jun 25, 2026

Copy link
Copy Markdown

Populates the isCharging flag on the uploader section of the Nightscout device status from the device's battery state, so consumers (e.g. LoopFollow) can show whether the uploading device is currently on power.

A full battery counts as charging, matching iOS battery state semantics: a plugged-in device at 100% reports .full rather than .charging. The flag is only set when battery monitoring is enabled; otherwise it is omitted. The key name isCharging matches the field already produced by Trio and consumed by LoopFollow.

Depends on LoopKit/NightscoutKit#2, which adds isCharging to UploaderStatus.

Populate the new UploaderStatus.isCharging flag from the device battery state so the Nightscout device status reflects whether the uploading device is on power. A full battery counts as charging, matching iOS battery state semantics where a plugged-in device at 100% reports .full rather than .charging.
@bjorkert bjorkert marked this pull request as draft June 25, 2026 20:11
@bjorkert bjorkert marked this pull request as ready for review June 25, 2026 20:46
@ps2 ps2 merged commit 4f89c9a into LoopKit:dev Jun 26, 2026
@ps2

ps2 commented Jun 26, 2026

Copy link
Copy Markdown

Thanks!

@bjorkert bjorkert deleted the add-uploader-ischarging branch June 26, 2026 18:01
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.

2 participants