diff --git a/include/pumps.h b/include/pumps.h index b1a8ba5..272f3a8 100644 --- a/include/pumps.h +++ b/include/pumps.h @@ -7,8 +7,8 @@ #define PUMPS_ERR_OUT_IDX (1) #define GPIO_PUMP_PIN_SEL ((1ULL< 0 ? 500 / running : 500; + vTaskDelay(delay / portTICK_PERIOD_MS); + + uint8_t color = tick % (LED_COUNT * 2) > LED_COUNT ? 0 : 100; + + ESP_ERROR_CHECK(led_strip_set_pixel(led_strip, tick % LED_COUNT, 5, 5, color)); + ESP_ERROR_CHECK(led_strip_refresh(led_strip)); + tick++; } } diff --git a/main/pumps.c b/main/pumps.c index 3d44e64..430ab88 100644 --- a/main/pumps.c +++ b/main/pumps.c @@ -101,6 +101,7 @@ void pumps_run() { running++; + pump_timers[i] = xTimerCreate((const char *)(0x48 + i), (pumps_duration[i] * 250 / portTICK_PERIOD_MS), pdFALSE, (void*)0, pump_timer_done); xTimerStart(pump_timers[i], 0); pumps_set_enabled(i, 1);