Fix/emergency alert persistence#6
Merged
Merged
Conversation
- Raise MQ9_DANGER_THRESHOLD from 2000 to 3500 - Increase DANGER_MULTIPLIER from 1.4x to 2.0x for more headroom - Gate CO audio alerts behind SENSOR_FULLY_PREHEATED flag - Require digital pin (mq9_digital) confirmation before playing alert - Remove forced-static-threshold calibration shortcut for MQ-9 - Add serial warmup warning when digital pin is high during preheat The MQ-9 requires 48 hours of continuous power to stabilize. Until SENSOR_FULLY_PREHEATED is set to true, the helmet will log but not audio-alert on CO readings, preventing false alarms from sensor drift. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add localStorage-based emergency acknowledgment tracking - Emergency modal only shows once per emergency; acknowledged ones are stored in localStorage and never re-trigger on page refresh - Acknowledging an alert now sets emergencyActive=false, hiding both the modal AND the persistent red badge/banner permanently - AdminDashboard: add 5-minute cooldown for emergency incident creation (was missing, causing potential incident spam) - On page load, both dashboards now query the most recent emergency row specifically (not just the latest row) so alerts aren't missed when newer non-emergency rows have arrived - SupervisorDashboard: acknowledged-list guard added to realtime handler so acknowledged emergencies from other tabs don't re-alert Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
No description provided.