Skip to content

Commit 7d6ba8d

Browse files
committed
Show alarm controller state in status icon
1 parent a544da9 commit 7d6ba8d

File tree

14 files changed

+49
-9
lines changed

14 files changed

+49
-9
lines changed

src/displayapp/DisplayApp.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
431431
settingsController,
432432
batteryController,
433433
bleController,
434+
alarmController,
434435
dateTimeController,
435436
filesystem,
436437
std::move(apps));
@@ -439,6 +440,7 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
439440
currentScreen = std::make_unique<Screens::Clock>(dateTimeController,
440441
batteryController,
441442
bleController,
443+
alarmController,
442444
notificationManager,
443445
settingsController,
444446
heartRateController,
@@ -484,7 +486,8 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
484486
brightnessController,
485487
motorController,
486488
settingsController,
487-
bleController);
489+
bleController,
490+
alarmController);
488491
break;
489492
case Apps::Settings:
490493
currentScreen = std::make_unique<Screens::Settings>(this, settingsController);
@@ -542,6 +545,7 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
542545
currentScreen = std::make_unique<Screens::Clock>(dateTimeController,
543546
batteryController,
544547
bleController,
548+
alarmController,
545549
notificationManager,
546550
settingsController,
547551
heartRateController,

src/displayapp/screens/ApplicationList.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ ApplicationList::ApplicationList(DisplayApp* app,
2121
Pinetime::Controllers::Settings& settingsController,
2222
const Pinetime::Controllers::Battery& batteryController,
2323
const Pinetime::Controllers::Ble& bleController,
24+
const Pinetime::Controllers::AlarmController& alarmController,
2425
Controllers::DateTime& dateTimeController,
2526
Pinetime::Controllers::FS& filesystem,
2627
std::array<Tile::Applications, UserAppTypes::Count>&& apps)
2728
: app {app},
2829
settingsController {settingsController},
2930
batteryController {batteryController},
3031
bleController {bleController},
32+
alarmController {alarmController},
3133
dateTimeController {dateTimeController},
3234
filesystem {filesystem},
3335
apps {std::move(apps)},
@@ -59,6 +61,7 @@ std::unique_ptr<Screen> ApplicationList::CreateScreen(unsigned int screenNum) co
5961
settingsController,
6062
batteryController,
6163
bleController,
64+
alarmController,
6265
dateTimeController,
6366
pageApps);
6467
}

src/displayapp/screens/ApplicationList.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ namespace Pinetime {
1818
Pinetime::Controllers::Settings& settingsController,
1919
const Pinetime::Controllers::Battery& batteryController,
2020
const Pinetime::Controllers::Ble& bleController,
21+
const Pinetime::Controllers::AlarmController& alarmController,
2122
Controllers::DateTime& dateTimeController,
2223
Pinetime::Controllers::FS& filesystem,
2324
std::array<Tile::Applications, UserAppTypes::Count>&& apps);
@@ -32,6 +33,7 @@ namespace Pinetime {
3233
Controllers::Settings& settingsController;
3334
const Pinetime::Controllers::Battery& batteryController;
3435
const Pinetime::Controllers::Ble& bleController;
36+
const Pinetime::Controllers::AlarmController& alarmController;
3537
Controllers::DateTime& dateTimeController;
3638
Pinetime::Controllers::FS& filesystem;
3739
std::array<Tile::Applications, UserAppTypes::Count> apps;

src/displayapp/screens/Clock.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ using namespace Pinetime::Applications;
2020
Clock::Clock(Controllers::DateTime& dateTimeController,
2121
const Controllers::Battery& batteryController,
2222
const Controllers::Ble& bleController,
23+
const Controllers::AlarmController& alarmController,
2324
Controllers::NotificationManager& notificationManager,
2425
Controllers::Settings& settingsController,
2526
Controllers::HeartRateController& heartRateController,
@@ -29,6 +30,7 @@ Clock::Clock(Controllers::DateTime& dateTimeController,
2930
: dateTimeController {dateTimeController},
3031
batteryController {batteryController},
3132
bleController {bleController},
33+
alarmController {alarmController},
3234
notificationManager {notificationManager},
3335
settingsController {settingsController},
3436
heartRateController {heartRateController},
@@ -77,6 +79,7 @@ std::unique_ptr<Screen> Clock::WatchFaceDigitalScreen() {
7779
return std::make_unique<Screens::WatchFaceDigital>(dateTimeController,
7880
batteryController,
7981
bleController,
82+
alarmController,
8083
notificationManager,
8184
settingsController,
8285
heartRateController,

src/displayapp/screens/Clock.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace Pinetime {
1313
class Settings;
1414
class Battery;
1515
class Ble;
16+
class AlarmController;
1617
class NotificationManager;
1718
class MotionController;
1819
class DateTime;
@@ -28,6 +29,7 @@ namespace Pinetime {
2829
Clock(Controllers::DateTime& dateTimeController,
2930
const Controllers::Battery& batteryController,
3031
const Controllers::Ble& bleController,
32+
const Controllers::AlarmController& alarmController,
3133
Controllers::NotificationManager& notificationManager,
3234
Controllers::Settings& settingsController,
3335
Controllers::HeartRateController& heartRateController,
@@ -43,6 +45,7 @@ namespace Pinetime {
4345
Controllers::DateTime& dateTimeController;
4446
const Controllers::Battery& batteryController;
4547
const Controllers::Ble& bleController;
48+
const Controllers::AlarmController& alarmController;
4649
Controllers::NotificationManager& notificationManager;
4750
Controllers::Settings& settingsController;
4851
Controllers::HeartRateController& heartRateController;

src/displayapp/screens/SystemInfo.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen2() {
179179

180180
extern int mallocFailedCount;
181181
extern int stackOverflowCount;
182+
182183
std::unique_ptr<Screen> SystemInfo::CreateScreen3() {
183184
lv_mem_monitor_t mon;
184185
lv_mem_monitor(&mon);

src/displayapp/screens/Tile.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@ Tile::Tile(uint8_t screenID,
2929
Controllers::Settings& settingsController,
3030
const Controllers::Battery& batteryController,
3131
const Controllers::Ble& bleController,
32+
const Controllers::AlarmController& alarmController,
3233
Controllers::DateTime& dateTimeController,
3334
std::array<Applications, 6>& applications)
34-
: app {app}, dateTimeController {dateTimeController}, pageIndicator(screenID, numScreens), statusIcons(batteryController, bleController) {
35+
: app {app},
36+
dateTimeController {dateTimeController},
37+
pageIndicator(screenID, numScreens),
38+
statusIcons(batteryController, bleController, alarmController) {
3539

3640
settingsController.SetAppMenu(screenID);
3741

src/displayapp/screens/Tile.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ namespace Pinetime {
2828
Controllers::Settings& settingsController,
2929
const Controllers::Battery& batteryController,
3030
const Controllers::Ble& bleController,
31+
const Controllers::AlarmController& alarmController,
3132
Controllers::DateTime& dateTimeController,
3233
std::array<Applications, 6>& applications);
3334

src/displayapp/screens/WatchFaceDigital.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ using namespace Pinetime::Applications::Screens;
1616
WatchFaceDigital::WatchFaceDigital(Controllers::DateTime& dateTimeController,
1717
const Controllers::Battery& batteryController,
1818
const Controllers::Ble& bleController,
19+
const Controllers::AlarmController& alarmController,
1920
Controllers::NotificationManager& notificationManager,
2021
Controllers::Settings& settingsController,
2122
Controllers::HeartRateController& heartRateController,
@@ -26,7 +27,7 @@ WatchFaceDigital::WatchFaceDigital(Controllers::DateTime& dateTimeController,
2627
settingsController {settingsController},
2728
heartRateController {heartRateController},
2829
motionController {motionController},
29-
statusIcons(batteryController, bleController) {
30+
statusIcons(batteryController, bleController, alarmController) {
3031

3132
statusIcons.Create();
3233

src/displayapp/screens/WatchFaceDigital.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ namespace Pinetime {
1515
class Settings;
1616
class Battery;
1717
class Ble;
18+
class AlarmController;
1819
class NotificationManager;
1920
class HeartRateController;
2021
class MotionController;
@@ -28,6 +29,7 @@ namespace Pinetime {
2829
WatchFaceDigital(Controllers::DateTime& dateTimeController,
2930
const Controllers::Battery& batteryController,
3031
const Controllers::Ble& bleController,
32+
const Controllers::AlarmController& alarmController,
3133
Controllers::NotificationManager& notificationManager,
3234
Controllers::Settings& settingsController,
3335
Controllers::HeartRateController& heartRateController,

0 commit comments

Comments
 (0)