Revert "added low battery message"

This reverts PR https://github.com/InfiniTimeOrg/InfiniTime/pull/1352
This commit is contained in:
Riku Isokoski 2022-12-31 09:56:03 +02:00
parent 3b084d74c3
commit fff0a00a4a
5 changed files with 1 additions and 31 deletions

View file

@ -29,7 +29,6 @@ namespace Pinetime {
SetOffAlarm,
MeasureBatteryTimerExpired,
BatteryPercentageUpdated,
LowBattery,
StartFileTransfer,
StopFileTransfer,
BleRadioEnableToggle

View file

@ -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();