Minor enhancements for the countdown face (#177)

* minor enhancements for the countdown face

* Changed usage of countdown timer.

- Long button presses have been removed.

- The light button is used to restore the last countdown as well as enter setting mode when pressed again.

- The visual state has been removed from the display.

- The internal states have been renamed to reflect the new logic.

* restore time when countdown finished.

* support for fast forward on long press (untested).

* support for beeps similar to stop watch

* fixed bug wiht display when fast forwarding
This commit is contained in:
Konrad Rieck
2023-01-23 21:18:28 +01:00
committed by GitHub
parent 3cd8e5c47e
commit b5f191a1b7
2 changed files with 105 additions and 27 deletions

View File

@@ -40,9 +40,10 @@ movement_schedule_background_task() while the timer is running.
typedef enum {
cd_waiting,
cd_paused,
cd_running,
cd_setting
cd_setting,
cd_reset
} countdown_mode_t;
typedef struct {
@@ -51,6 +52,9 @@ typedef struct {
uint8_t hours;
uint8_t minutes;
uint8_t seconds;
uint8_t set_hours;
uint8_t set_minutes;
uint8_t set_seconds;
uint8_t selection;
countdown_mode_t mode;
} countdown_state_t;