Revert "added low battery message"
This reverts PR https://github.com/InfiniTimeOrg/InfiniTime/pull/1352
This commit is contained in:
@@ -29,7 +29,6 @@ namespace Pinetime {
|
||||
SetOffAlarm,
|
||||
MeasureBatteryTimerExpired,
|
||||
BatteryPercentageUpdated,
|
||||
LowBattery,
|
||||
StartFileTransfer,
|
||||
StopFileTransfer,
|
||||
BleRadioEnableToggle
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
#include "BootErrors.h"
|
||||
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
||||
using namespace Pinetime::System;
|
||||
|
||||
@@ -408,16 +406,6 @@ void SystemTask::Work() {
|
||||
case Messages::BatteryPercentageUpdated:
|
||||
nimbleController.NotifyBatteryLevel(batteryController.PercentRemaining());
|
||||
break;
|
||||
case Messages::LowBattery: {
|
||||
Pinetime::Controllers::NotificationManager::Notification notif;
|
||||
constexpr char message[] = "Low Battery\0Charge your watch to prevent data loss.\0";
|
||||
constexpr size_t messageSize = std::min(sizeof(message), Pinetime::Controllers::NotificationManager::MaximumMessageSize());
|
||||
std::memcpy(notif.message.data(), message, messageSize);
|
||||
notif.size = messageSize;
|
||||
notif.category = Pinetime::Controllers::NotificationManager::Categories::SimpleAlert;
|
||||
notificationManager.Push(std::move(notif));
|
||||
PushMessage(Messages::OnNewNotification);
|
||||
} break;
|
||||
case Messages::OnPairing:
|
||||
if (state == SystemTaskState::Sleeping) {
|
||||
GoToRunning();
|
||||
|
||||
Reference in New Issue
Block a user