11#include " displayapp/widgets/StatusIcons.h"
22#include " displayapp/screens/Symbols.h"
3+ #include " components/alarm/AlarmController.h"
34
45using namespace Pinetime ::Applications::Widgets;
56
6- StatusIcons::StatusIcons (const Controllers::Battery& batteryController, const Controllers::Ble& bleController)
7- : batteryIcon(true ), batteryController {batteryController}, bleController {bleController} {
7+ StatusIcons::StatusIcons (const Controllers::Battery& batteryController,
8+ const Controllers::Ble& bleController,
9+ const Controllers::AlarmController& alarmController)
10+ : batteryIcon(true ), batteryController {batteryController}, bleController {bleController}, alarmController {alarmController} {
811}
912
1013void StatusIcons::Create () {
@@ -20,6 +23,9 @@ void StatusIcons::Create() {
2023 batteryPlug = lv_label_create (container, nullptr );
2124 lv_label_set_text_static (batteryPlug, Screens::Symbols::plug);
2225
26+ alarmIcon = lv_label_create (container, nullptr );
27+ lv_label_set_text_static (alarmIcon, Screens::Symbols::bell);
28+
2329 batteryIcon.Create (container);
2430
2531 lv_obj_align (container, nullptr , LV_ALIGN_IN_TOP_RIGHT, 0 , 0 );
@@ -37,6 +43,11 @@ void StatusIcons::Update() {
3743 batteryIcon.SetBatteryPercentage (batteryPercent);
3844 }
3945
46+ alarmEnabled = alarmController.IsEnabled ();
47+ if (alarmEnabled.IsUpdated ()) {
48+ lv_obj_set_hidden (alarmIcon, !alarmEnabled.Get ());
49+ }
50+
4051 bleState = bleController.IsConnected ();
4152 bleRadioEnabled = bleController.IsRadioEnabled ();
4253 if (bleState.IsUpdated () || bleRadioEnabled.IsUpdated ()) {
0 commit comments