summaryrefslogtreecommitdiff
path: root/src/systemtask/SystemTask.h
diff options
context:
space:
mode:
authorhubmartin <hub.martin@gmail.com>2021-09-13 08:19:07 (GMT)
committerhubmartin <hub.martin@gmail.com>2021-09-13 08:19:07 (GMT)
commit73d3e41ceadf576542508c114679e1d3e6039d4d (patch)
tree8fdbd15c5a0ac7fc209276ea6e60a9570a51b7ff /src/systemtask/SystemTask.h
parent8390d0ef7243261675aab3a5c19862eb3fc53e68 (diff)
parentc9aeef94ea824ad7304ca3f0bd76a476f4744ff4 (diff)
Merge branch 'develop' into pinmap
Diffstat (limited to 'src/systemtask/SystemTask.h')
-rw-r--r--src/systemtask/SystemTask.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/systemtask/SystemTask.h b/src/systemtask/SystemTask.h
index 3bf72ac..1f8be75 100644
--- a/src/systemtask/SystemTask.h
+++ b/src/systemtask/SystemTask.h
@@ -128,13 +128,15 @@ namespace Pinetime {
uint8_t bleDiscoveryTimer = 0;
TimerHandle_t dimTimer;
TimerHandle_t idleTimer;
+ TimerHandle_t measureBatteryTimer;
+ bool sendBatteryNotification = false;
bool doNotGoToSleep = false;
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;
+ static constexpr TickType_t batteryMeasurementPeriod = pdMS_TO_TICKS(10 * 60 * 1000);
+ TickType_t lastBatteryNotificationTime = 0;
#if configUSE_TRACE_FACILITY == 1
SystemMonitor<FreeRtosMonitor> monitor;