Compare commits

...

5 commits

Author SHA1 Message Date
JF 27de7d8d19
Merge 6e03b47eb3 into 8598142c27 2024-10-21 12:20:53 -05:00
NeroBurner 8598142c27
Remove unused submodule QCBOR (#2138)
Some checks failed
CI / build-firmware (push) Successful in 5m57s
CI / build-simulator (push) Failing after 3s
CI / get-base-ref-size (push) Has been skipped
CI / Compare build size (push) Has been skipped
The submodule isn't used anymore. Remove the submodule reference
completely.
2024-10-09 20:26:08 +02:00
Jean-François Milants 6e03b47eb3 Power optimization - Increase SystemTask Period
Increase the SystemTask period also when the notification mode is set to Sleep (as it also disables the motion-based wake options).
2023-05-18 15:49:14 +02:00
Jean-François Milants 491d3ae20f Power optimization - Increase SystemTaskPeriod
Improve the timeout on the queue : by default, the timeout is 100ms, and it's extended to 4s in sleep mode, when no motion based wake up option is enabled.
2023-05-08 21:23:54 +02:00
Jean-François Milants 7ad970ea87 Power optimization - Increase SystemTaskPeriod.
Increase the timeout on the message queue in SystemTask. This reduces the power consumption by 60-70µs in sleep mode.
2023-05-07 18:20:49 +02:00
4 changed files with 15 additions and 5 deletions

3
.gitmodules vendored
View file

@ -4,9 +4,6 @@
[submodule "src/libs/littlefs"]
path = src/libs/littlefs
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"]
path = src/libs/arduinoFFT
url = https://github.com/kosme/arduinoFFT.git

@ -1 +0,0 @@
Subproject commit 56b17bf9f74096774944bcac0829adcd887d391e

View file

@ -186,7 +186,7 @@ void SystemTask::Work() {
UpdateMotion();
Messages msg;
if (xQueueReceive(systemTasksMsgQueue, &msg, 100) == pdTRUE) {
if (xQueueReceive(systemTasksMsgQueue, &msg, GetQueueTimeout()) == pdTRUE) {
switch (msg) {
case Messages::EnableSleeping:
wakeLocksHeld--;
@ -499,3 +499,15 @@ void SystemTask::PushMessage(System::Messages msg) {
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;
}

View file

@ -136,6 +136,8 @@ namespace Pinetime {
bool stepCounterMustBeReset = false;
static constexpr TickType_t batteryMeasurementPeriod = pdMS_TO_TICKS(10 * 60 * 1000);
TickType_t GetQueueTimeout() const;
SystemMonitor monitor;
};
}