feat(pwr): poll adaptatif des taches au repos
Repo State / repo-state (push) Failing after 27s

This commit is contained in:
clement
2026-06-20 00:33:10 +02:00
parent 216dc2523e
commit 8a2280edb0
4 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -212,7 +212,7 @@ static void tone_task(void *a)
tone_mode_t m = s_mode; tone_mode_t m = s_mode;
if (m == TONE_NONE) { if (m == TONE_NONE) {
s_tone_idle = true; s_tone_idle = true;
vTaskDelay(pdMS_TO_TICKS(20)); vTaskDelay(pdMS_TO_TICKS(100)); /* repos : poll lent -> CPU dort (éco batterie) */
t = 0; t = 0;
ph = 0; ph = 0;
sco_acc_n = 0; sco_acc_n = 0;
+3 -1
View File
@@ -259,7 +259,9 @@ static void call_task(void *arg)
} }
} }
vTaskDelay(pdMS_TO_TICKS(50)); /* Poll adaptatif : 250 ms au repos (raccroché, rien à faire — le hook IRQ
* et la file BT réveillent à temps), 50 ms sinon (numérotation/appel). */
vTaskDelay(pdMS_TO_TICKS(st == ST_IDLE ? 250 : 50));
} }
} }
+1 -1
View File
@@ -54,7 +54,7 @@ static void cli_task(void *a)
for (;;) { for (;;) {
int c = getchar(); int c = getchar();
if (c == EOF) { if (c == EOF) {
vTaskDelay(pdMS_TO_TICKS(30)); vTaskDelay(pdMS_TO_TICKS(150)); /* repos : poll lent -> CPU dort (éco batterie) */
continue; continue;
} }
if (c == '\n' || c == '\r') { if (c == '\n' || c == '\r') {
+5 -2
View File
@@ -18,7 +18,8 @@
#define TAG "hook_monitor" #define TAG "hook_monitor"
#define POLL_MS 10 #define POLL_MS 10 /* décroché : résolution fine pour décoder les impulsions */
#define POLL_IDLE_MS 80 /* raccroché (repos) : poll lent -> CPU dort + DFS (éco batterie) */
#define DEBOUNCE_MS 30 #define DEBOUNCE_MS 30
#define PULSE_MIN_WIDTH_MS 20 /* filtre anti-glitch */ #define PULSE_MIN_WIDTH_MS 20 /* filtre anti-glitch */
#define INTER_DIGIT_GAP_MS 200 /* fin d'un chiffre au cadran */ #define INTER_DIGIT_GAP_MS 200 /* fin d'un chiffre au cadran */
@@ -93,7 +94,9 @@ static void hook_task(void *arg)
pulse_count = 0; pulse_count = 0;
} }
} }
vTaskDelay(pdMS_TO_TICKS(POLL_MS)); /* Poll adaptatif : 10 ms décroché (décodage impulsions), 80 ms raccroché
* (repos) -> le CPU dort plus longtemps, DFS/tickless idle s'engagent. */
vTaskDelay(pdMS_TO_TICKS(stable ? POLL_MS : POLL_IDLE_MS));
} }
} }