diff options
Diffstat (limited to 'src/displayapp/screens/Timer.h')
| -rw-r--r-- | src/displayapp/screens/Timer.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/displayapp/screens/Timer.h b/src/displayapp/screens/Timer.h index f4ceddef..48c4fdda 100644 --- a/src/displayapp/screens/Timer.h +++ b/src/displayapp/screens/Timer.h @@ -1,6 +1,7 @@ #pragma once #include "displayapp/screens/Screen.h" +#include "components/motor/MotorController.h" #include "systemtask/SystemTask.h" #include "displayapp/LittleVgl.h" #include "displayapp/widgets/Counter.h" @@ -14,13 +15,14 @@ namespace Pinetime::Applications { namespace Screens { class Timer : public Screen { public: - Timer(Controllers::Timer& timerController); + Timer(Controllers::Timer& timerController, Controllers::MotorController& motorController); ~Timer() override; void Refresh() override; void Reset(); void ToggleRunning(); void ButtonPressed(); void MaskReset(); + void SetTimerRinging(); private: void SetTimerRunning(); @@ -28,6 +30,7 @@ namespace Pinetime::Applications { void UpdateMask(); void DisplayTime(); Pinetime::Controllers::Timer& timer; + Pinetime::Controllers::MotorController& motorController; lv_obj_t* btnPlayPause; lv_obj_t* txtPlayPause; @@ -42,6 +45,7 @@ namespace Pinetime::Applications { Widgets::Counter secondCounter = Widgets::Counter(0, 59, jetbrains_mono_76); bool buttonPressing = false; + bool isRinging = false; lv_coord_t maskPosition = 0; TickType_t pressTime = 0; Utility::DirtyValue<std::chrono::seconds> displaySeconds; @@ -54,7 +58,7 @@ namespace Pinetime::Applications { static constexpr const char* icon = Screens::Symbols::hourGlass; static Screens::Screen* Create(AppControllers& controllers) { - return new Screens::Timer(controllers.timer); + return new Screens::Timer(controllers.timer, controllers.motorController); }; static bool IsAvailable(Pinetime::Controllers::FS& /*filesystem*/) { |
