From 6c40071eff98518f3fe2b51ae490d06f6cdd8f2c Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Fri, 22 Sep 2023 00:24:38 +0200 Subject: [PATCH] Only call sleep function if we want to sleep --- extdrv/status_led.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extdrv/status_led.c b/extdrv/status_led.c index 2823b8e..f3a919a 100644 --- a/extdrv/status_led.c +++ b/extdrv/status_led.c @@ -132,5 +132,7 @@ void chenillard(uint32_t ms) { static int n; status_led(steps[n++ % (sizeof steps / sizeof *steps)]); - msleep(ms); + if (ms > 0) { + msleep(ms); + } } -- 2.43.0