diff --git a/epicardium/modules/personal_state.c b/epicardium/modules/personal_state.c index 08028b58b8c31acf98a3ae269018579ad43985f5..3aa5138ab52be9ba4fbbc1f9118249a32d4902c9 100644 --- a/epicardium/modules/personal_state.c +++ b/epicardium/modules/personal_state.c @@ -31,9 +31,7 @@ int epic_personal_state_set(uint8_t state, bool persistent) personal_state_persistent = persistent; if (was_enabled && !_personal_state_enabled) { - while (hwlock_acquire_timeout(HWLOCK_LED, portMAX_DELAY) < 0) { - vTaskDelay(pdMS_TO_TICKS(1)); - } + hwlock_acquire(HWLOCK_LED); leds_prep(PERSONAL_STATE_LED, 0, 0, 0); leds_update_power(); @@ -60,10 +58,7 @@ void vLedTask(void *pvParameters) const int led_animation_rate = 1000 / 25; /* 25Hz -> 40ms*/ while (1) { if (_personal_state_enabled) { - while (hwlock_acquire_timeout( - HWLOCK_LED, portMAX_DELAY) < 0) { - vTaskDelay(pdMS_TO_TICKS(1)); - } + hwlock_acquire(HWLOCK_LED); led_animation_ticks++; if (personal_state == STATE_NO_CONTACT) {