aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/StopWatch.h
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2023-01-02 10:34:50 +0200
committerRiku Isokoski <riksu9000@gmail.com>2023-02-01 09:52:04 +0200
commit822f857d9e3bdc38985286652bec0d9cce89297d (patch)
tree0771115c87f6189d5bea634273013034302a5b96 /src/displayapp/screens/StopWatch.h
parent81bc16fd92901aa6f1f16af2f66bf5296e5dd185 (diff)
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.
Diffstat (limited to 'src/displayapp/screens/StopWatch.h')
-rw-r--r--src/displayapp/screens/StopWatch.h11
1 files changed, 8 insertions, 3 deletions
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;