This PR fixes #353 by adding a message receipt timer to the Driver::Serial::Backend::Backend class with a timeout of 500 ms and using it to set a boolean flag in the store about whether the connection is active, and by adding a Driver::Serial::Backend::AlarmsService class to update the events log on rising and falling edges for that flag.
This PR also lightly refactors the various AlarmsService classes by taking the responsibility for updating store.active_log_events() out of their transform methods; instead, main.cpp calls alarms_manager.transform(store.active_log_events()) once during every iteration of the main loop.
Finally, this PR changes the behavior of the Nucleo's LED LD1 so that it blinks slowly when running normally and is solid-on when an alarm is active. This allows some visibility into the state of alarms on the Nucleo board when it's not connected to the frontend.
For records-keeping:
This project is licensed under Apache License v2.0 for any software, and Solderpad Hardware License v2.1 for any hardware - do you agree that your contributions to this project will be under these licenses, too? Yes
Were any of these contributions also part of work you did for an employer or a client? No
Does this work include, or is it based on, any third-party work which you did not create? No
This PR fixes #353 by adding a message receipt timer to the
Driver::Serial::Backend::Backend
class with a timeout of 500 ms and using it to set a boolean flag in the store about whether the connection is active, and by adding aDriver::Serial::Backend::AlarmsService
class to update the events log on rising and falling edges for that flag.This PR also lightly refactors the various
AlarmsService
classes by taking the responsibility for updatingstore.active_log_events()
out of their transform methods; instead,main.cpp
callsalarms_manager.transform(store.active_log_events())
once during every iteration of the main loop.Finally, this PR changes the behavior of the Nucleo's LED LD1 so that it blinks slowly when running normally and is solid-on when an alarm is active. This allows some visibility into the state of alarms on the Nucleo board when it's not connected to the frontend.
For records-keeping: