mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-10-22 15:11:51 +02:00
Compare commits
5 commits
b5e2f768e6
...
27de7d8d19
Author | SHA1 | Date | |
---|---|---|---|
27de7d8d19 | |||
8598142c27 | |||
6e03b47eb3 | |||
491d3ae20f | |||
7ad970ea87 |
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -4,9 +4,6 @@
|
||||||
[submodule "src/libs/littlefs"]
|
[submodule "src/libs/littlefs"]
|
||||||
path = src/libs/littlefs
|
path = src/libs/littlefs
|
||||||
url = https://github.com/littlefs-project/littlefs.git
|
url = https://github.com/littlefs-project/littlefs.git
|
||||||
[submodule "src/libs/QCBOR"]
|
|
||||||
path = src/libs/QCBOR
|
|
||||||
url = https://github.com/laurencelundblade/QCBOR.git
|
|
||||||
[submodule "src/libs/arduinoFFT"]
|
[submodule "src/libs/arduinoFFT"]
|
||||||
path = src/libs/arduinoFFT
|
path = src/libs/arduinoFFT
|
||||||
url = https://github.com/kosme/arduinoFFT.git
|
url = https://github.com/kosme/arduinoFFT.git
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 56b17bf9f74096774944bcac0829adcd887d391e
|
|
|
@ -186,7 +186,7 @@ void SystemTask::Work() {
|
||||||
UpdateMotion();
|
UpdateMotion();
|
||||||
|
|
||||||
Messages msg;
|
Messages msg;
|
||||||
if (xQueueReceive(systemTasksMsgQueue, &msg, 100) == pdTRUE) {
|
if (xQueueReceive(systemTasksMsgQueue, &msg, GetQueueTimeout()) == pdTRUE) {
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case Messages::EnableSleeping:
|
case Messages::EnableSleeping:
|
||||||
wakeLocksHeld--;
|
wakeLocksHeld--;
|
||||||
|
@ -499,3 +499,15 @@ void SystemTask::PushMessage(System::Messages msg) {
|
||||||
xQueueSend(systemTasksMsgQueue, &msg, portMAX_DELAY);
|
xQueueSend(systemTasksMsgQueue, &msg, portMAX_DELAY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TickType_t SystemTask::GetQueueTimeout() const {
|
||||||
|
// By default, the timeout on the queue is 100ms.
|
||||||
|
// It's extended to 4s in sleep mode, when no motion based wake up option is enabled.
|
||||||
|
TickType_t timeout = pdMS_TO_TICKS(100);
|
||||||
|
if (state == SystemTaskState::Sleeping && ((!settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::RaiseWrist) &&
|
||||||
|
!settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::Shake)) ||
|
||||||
|
settingsController.GetNotificationStatus() == Controllers::Settings::Notification::Sleep)) {
|
||||||
|
timeout = pdMS_TO_TICKS(4000);
|
||||||
|
}
|
||||||
|
return timeout;
|
||||||
|
}
|
|
@ -136,6 +136,8 @@ namespace Pinetime {
|
||||||
bool stepCounterMustBeReset = false;
|
bool stepCounterMustBeReset = false;
|
||||||
static constexpr TickType_t batteryMeasurementPeriod = pdMS_TO_TICKS(10 * 60 * 1000);
|
static constexpr TickType_t batteryMeasurementPeriod = pdMS_TO_TICKS(10 * 60 * 1000);
|
||||||
|
|
||||||
|
TickType_t GetQueueTimeout() const;
|
||||||
|
|
||||||
SystemMonitor monitor;
|
SystemMonitor monitor;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue