Giter Site home page Giter Site logo

Comments (5)

dsferruzza avatar dsferruzza commented on August 24, 2024

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.

RomainBlanc avatar RomainBlanc commented on August 24, 2024

When an alarm is triggered, the alarms number will be displayed on the third line of the screen:

image

from makair.

RomainBlanc avatar RomainBlanc commented on August 24, 2024

image
French version

from makair.

Mefl avatar Mefl commented on August 24, 2024

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.

hbs avatar hbs commented on August 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.