From 822f857d9e3bdc38985286652bec0d9cce89297d Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Mon, 2 Jan 2023 10:34:50 +0200 Subject: stopwatch: Update UI The time used to be yellow while paused. Changing it to white made the paused state less distinct. Blinking the time while paused makes the state distinct again. --- src/displayapp/screens/StopWatch.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/displayapp/screens/StopWatch.h') diff --git a/src/displayapp/screens/StopWatch.h b/src/displayapp/screens/StopWatch.h index f2f57110..ce9d0fea 100644 --- a/src/displayapp/screens/StopWatch.h +++ b/src/displayapp/screens/StopWatch.h @@ -24,19 +24,24 @@ namespace Pinetime::Applications::Screens { ~StopWatch() override; void Refresh() override; - void playPauseBtnEventHandler(lv_event_t event); - void stopLapBtnEventHandler(lv_event_t event); + void playPauseBtnEventHandler(); + void stopLapBtnEventHandler(); bool OnButtonPushed() override; + private: + void SetInterfacePaused(); + void SetInterfaceRunning(); + void SetInterfaceStopped(); + void Reset(); void Start(); void Pause(); - private: Pinetime::System::SystemTask& systemTask; States currentState = States::Init; TickType_t startTime; TickType_t oldTimeElapsed = 0; + TickType_t blinkTime = 0; static constexpr int maxLapCount = 20; TickType_t laps[maxLapCount + 1]; static constexpr int displayedLaps = 2; -- cgit v1.2.3-70-g09d2