Skip to content

Fix Missed Bolus alarm never firing - #769

Open
bjorkert wants to merge 1 commit into
devfrom
fix/missed-bolus-alarm
Open

bjorkert wants to merge 1 commit into
devfrom
fix/missed-bolus-alarm

Conversation

@bjorkert

@bjorkert bjorkert commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

MissedBolusCondition is now registered in AlarmManager, so the Missed Bolus alarm gets evaluated. The alarm fires with its default settings, the optional BG limit is handled by the shared BG limit check like other alarms, and a future-dated carb entry no longer hides an earlier one that had no bolus. Added unit tests for the condition and checked it in the simulator against a mocked Nightscout with a 30 g carb entry and no bolus.

missed-bolus-alarm

MissedBolusCondition was not in the AlarmManager evaluator list, so the
alarm could be created but was never checked. The condition also required
the optional BG limit to be set, which it is not by default, and only
looked at the last carb entry, which can be a future-dated one. The BG
limit is now handled by the shared BG limit check like other alarms, and
the most recent carb entry that is not in the future is used.

@codebymini codebymini left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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