From ccc8cee07a3a702b31ab3a0f2f93950f0d176198 Mon Sep 17 00:00:00 2001 From: minacode Date: Mon, 3 Oct 2022 12:15:37 +0200 Subject: added low battery message --- src/systemtask/SystemTask.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/systemtask/SystemTask.cpp') diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 01056a9a..169eaa05 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -424,6 +424,17 @@ void SystemTask::Work() { case Messages::BatteryPercentageUpdated: nimbleController.NotifyBatteryLevel(batteryController.PercentRemaining()); break; + case Messages::LowBattery: + { + Pinetime::Controllers::NotificationManager::Notification notif; + std::array message {"Low Battery\0Low Battery\0"}; + notif.message = message; + notif.size = 25; + notif.category = Pinetime::Controllers::NotificationManager::Categories::SimpleAlert; + notificationManager.Push(std::move(notif)); + PushMessage(Messages::OnNewNotification); + } + break; case Messages::OnPairing: if (state == SystemTaskState::Sleeping) { GoToRunning(); -- cgit v1.2.3-70-g09d2