Comments (5)
I'll try to sum up my understanding.
Alarms have:
- a trigger predicate: it can depend on various parameters, and may need an internal counter of the number of cycles in a row the predicate was true along with a threshold that will raise an alarm when exceeded
- an error code (unique)
- a severity: low, medium, high
When an alarm is triggered it has effects depending on its severity:
- buzzer (already implemented)
- LEDs
- display error codes on the third line of the LCD screen (using horizontal auto-scrolling?)
When several alarms are triggered at the same time, only the alarms of the higher triggered severity have effects.
If a user press the alarm OFF button, it snoozes the buzzer for 2 minutes. If an alarm of higher severity is then triggered, snoozing is interrupted and buzzer rings.
If an alarm's predicate becomes false, it is not to be considered active anymore. Effects can continue to happen according to the higher severity of the remaining active alarms, or stop if there are no remaining active alarms.
I believe we need some kind of alarm controller (singleton?) that could:
- be called if the predicate of an alarm is true (this might trigger effects)
- be called if the predicate of an alarm is false (this might stop effects)
It would then keep track and handle:
- inner state of alarms (number of cycles in a row it was triggered)
- active alarms
- snooze status (if snoozed, we need to keep track of the timing and the severity that was snoozed)
- LEDs effects
- LCD display
from makair.
When an alarm is triggered, the alarms number will be displayed on the third line of the screen:
from makair.
from makair.
due to #120, we need to store the cycle number for each alarm triggered to be able to send the new alarms (ie triggered in the last complete cycle)
from makair.
Alarms should trigger telemetry events, so should the user actions.
And any parameter involved in an alarm should also be reported via the telemetry.
from makair.
Related Issues (20)
- State management - reset & initialize HOT 1
- Buzzer code review
- Bill of materials HOT 3
- ESD protection
- Where I can find SCH and PCB files ?
- Feronyl - Spécialiste en injection de pièces plastiques techniques / Specialist in injection moulding of technical parts in plastic
- Makair MotherBoard
- Use of pneumatic air line to replace the blower. HOT 11
- Initial contribution of a system design HOT 4
- Motherboard of makers for life ventilator
- Move the sonarcloud directory in a sub directory, or hide it?
- PCB ?
- Control: Graph rendering issues HOT 2
- Question about UI design HOT 2
- BLDC for Blower
- Request to join "Makers For Life"
- MassFlow using DP and Venturi
- medical standard compliance for alarms (60601-1-8)
- Create a CODE_OF_COUNDUCT.md and a CONTRIBUTING.md HOT 2
- Blower motor details HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from makair.