diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-08-22 15:55:25 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-08-22 15:55:25 +1000 |
| commit | ee949829d98c3b8df685319559a5798aad74bf13 (patch) | |
| tree | 68cbf80bdc61a2bdb7572d33e47c7f6230555406 /src/system_fsm/include | |
| parent | 9c105cf613fb849268d619dc887dc2b54dcd4ec6 (diff) | |
| download | tangara-fw-ee949829d98c3b8df685319559a5798aad74bf13.tar.gz | |
Add battery % with change events
Diffstat (limited to 'src/system_fsm/include')
| -rw-r--r-- | src/system_fsm/include/system_events.hpp | 3 | ||||
| -rw-r--r-- | src/system_fsm/include/system_fsm.hpp | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/system_fsm/include/system_events.hpp b/src/system_fsm/include/system_events.hpp index f62da801..8a3ba5ec 100644 --- a/src/system_fsm/include/system_events.hpp +++ b/src/system_fsm/include/system_events.hpp @@ -53,6 +53,7 @@ struct HasPhonesChanged : tinyfsm::Event { }; struct ChargingStatusChanged : tinyfsm::Event {}; +struct BatteryPercentChanged : tinyfsm::Event {}; namespace internal { @@ -61,6 +62,8 @@ struct SamdInterrupt : tinyfsm::Event {}; struct IdleTimeout : tinyfsm::Event {}; +struct BatteryTimerFired : tinyfsm::Event {}; + } // namespace internal } // namespace system_fsm diff --git a/src/system_fsm/include/system_fsm.hpp b/src/system_fsm/include/system_fsm.hpp index 0698be9b..6baceca1 100644 --- a/src/system_fsm/include/system_fsm.hpp +++ b/src/system_fsm/include/system_fsm.hpp @@ -47,6 +47,7 @@ class SystemState : public tinyfsm::Fsm<SystemState> { void react(const FatalError&); void react(const internal::GpioInterrupt&); void react(const internal::SamdInterrupt&); + void react(const internal::BatteryTimerFired&); virtual void react(const DisplayReady&) {} virtual void react(const BootComplete&) {} |
