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.
This commit is contained in:
Jean-François Milants 2023-05-07 18:20:49 +02:00
parent 5f19f689f9
commit 7ad970ea87

View file

@ -181,7 +181,7 @@ void SystemTask::Work() {
UpdateMotion();
Messages msg;
if (xQueueReceive(systemTasksMsgQueue, &msg, 100) == pdTRUE) {
if (xQueueReceive(systemTasksMsgQueue, &msg, 4000) == pdTRUE) {
switch (msg) {
case Messages::EnableSleeping:
// Make sure that exiting an app doesn't enable sleeping,