Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement customizable BG speech alerts based on user-defined conditions #276

Merged
merged 9 commits into from
Apr 3, 2024

Conversation

bjorkert
Copy link
Contributor

@bjorkert bjorkert commented Mar 31, 2024

Advanced Customization in Speech Announcements for BG Levels

This PR enhances the speech announcement functionality for monitoring blood glucose (BG) levels with advanced customization options, giving users precise control over the conditions that trigger verbal alerts. These improvements aim to support diverse user needs for BG monitoring and alerts.

Enhancements include:

  • Always Speak: Ensures continuous verbal updates of BG levels at every data refresh, ideal for constant monitoring.

  • Low BG Alert: Triggers announcements for BG levels at or below the user-defined alertLowBG threshold, including a confirmation announcement when levels return to normal, enhancing user reassurance during hypoglycemic events.

  • Proactive Low BG Alert: A significant update providing early warnings for potential low BG scenarios:

    • Announces if the immediate next predicted BG value is at or below the alertLowBG threshold, offering a predictive alert to preemptively manage potential lows.
    • Includes alerts for rapid BG decreases towards the low threshold, even if current levels are within range, helping users anticipate and mitigate rapid declines in BG.
    • Ensures announcements when transitioning from low conditions back to normal levels, providing a clear update on BG status.
  • High BG Alert: Informs users when BG levels reach or surpass the alertHighBG threshold, with an additional alert when returning to the desired range, aiding in high BG level management.

Implementation Details:

The evaluateSpeakConditions function centralizes the logic for these enhancements, checking against user preferences and current BG conditions to determine the necessity and type of announcement. This approach ensures a modular and easily adaptable system for future refinements or additions to speech alerts.

These updates aim to empower users with more nuanced control over BG alerts, supporting proactive management of glucose levels with timely and relevant information.

@bjorkert bjorkert marked this pull request as draft March 31, 2024 13:17
@bjorkert bjorkert marked this pull request as ready for review March 31, 2024 19:22
@bjorkert bjorkert requested a review from marionbarker March 31, 2024 19:24
@marionbarker
Copy link
Collaborator

Tested using mg/dL.

Enable Always: the speak BG low and high limits can be modified
Disable Always: additional settings are available

  • Low and High, speaks when exceeds that range
  • Predictive Low, speaks when either low level is tripped or fast drop limit is exceeded

I see the words above: "announcements when transitioning from low/high conditions back to normal levels,"

I was thinking that was a logic error when I was testing - but it sounds like that is by design.

@marionbarker
Copy link
Collaborator

Going to merge to dev to make it easy for people to build and test. We made a new PR for further improvements.

@marionbarker marionbarker merged commit ad546ff into dev Apr 3, 2024
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