feat: Implement Ethernet and Wi-Fi connection management with LED status indicators.
This commit is contained in:
@@ -53,4 +53,27 @@ internal void set_led_status(led_status status) {
|
||||
break;
|
||||
}
|
||||
led_strip_refresh(led_strip);
|
||||
}
|
||||
}
|
||||
internal void led_blink_number(int n, uint8_t r, uint8_t g, uint8_t b) {
|
||||
if (n <= 0) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
led_strip_set_pixel(led_strip, 0, r, g, b);
|
||||
led_strip_refresh(led_strip);
|
||||
vTaskDelay(pdMS_TO_TICKS(50));
|
||||
led_strip_clear(led_strip);
|
||||
led_strip_refresh(led_strip);
|
||||
vTaskDelay(pdMS_TO_TICKS(50));
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(1000));
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < n; i++) {
|
||||
led_strip_set_pixel(led_strip, 0, r, g, b);
|
||||
led_strip_refresh(led_strip);
|
||||
vTaskDelay(pdMS_TO_TICKS(300));
|
||||
led_strip_clear(led_strip);
|
||||
led_strip_refresh(led_strip);
|
||||
vTaskDelay(pdMS_TO_TICKS(300));
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(1000));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user