Repository navigation
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.