Skip to content

Fix/emergency alert persistence#6

Merged
Zeek-Master merged 2 commits into
productionfrom
fix/emergency-alert-persistence
May 13, 2026
Merged

Fix/emergency alert persistence#6
Zeek-Master merged 2 commits into
productionfrom
fix/emergency-alert-persistence

Conversation

@DI0027
Copy link
Copy Markdown
Collaborator

@DI0027 DI0027 commented May 13, 2026

No description provided.

DI0027 and others added 2 commits May 14, 2026 03:16
- 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>
@Zeek-Master Zeek-Master merged commit e343a00 into production May 13, 2026
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