summaryrefslogtreecommitdiff
path: root/src/systemtask/SystemTask.h
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2021-07-11 14:55:06 (GMT)
committerJean-François Milants <jf@codingfield.com>2021-07-11 14:55:06 (GMT)
commite21f6a7f414d1f832e8fddfeaab3b9de05aa3459 (patch)
treea4ebbc3a74ba7daf87aa99c0eafcb0e9e7bc6c35 /src/systemtask/SystemTask.h
parent6a91b83b12ef849f68d54f490153b02f0ecf58dc (diff)
Notify battery level every 10 minutes when connected to a BLE host.
Refactor battery percent : only use uint8_t to store the battery % remaining.
Diffstat (limited to 'src/systemtask/SystemTask.h')
-rw-r--r--src/systemtask/SystemTask.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/systemtask/SystemTask.h b/src/systemtask/SystemTask.h
index bfb9726..f8cf637 100644
--- a/src/systemtask/SystemTask.h
+++ b/src/systemtask/SystemTask.h
@@ -135,6 +135,8 @@ namespace Pinetime {
void GoToRunning();
void UpdateMotion();
bool stepCounterMustBeReset = false;
+ static constexpr TickType_t batteryNotificationPeriod = 1000 * 60 * 10; // 1 tick ~= 1ms. 1ms * 60 * 10 = 10 minutes
+ TickType_t batteryNotificationTick = 0;
#if configUSE_TRACE_FACILITY == 1
SystemMonitor<FreeRtosMonitor> monitor;