Add WS2812 status module and config

This commit is contained in:
2025-12-13 12:32:15 +02:00
parent 3218e6039f
commit 5b4691dc53
39 changed files with 2538 additions and 3 deletions

View File

@@ -17,6 +17,7 @@
#include "sdkconfig.h"
#include "tinyusb.h"
#include "tusb_cdc_acm.h"
#include "ws2812_status.h"
#define CLI_LINE_MAX_LEN 128
#define CLI_QUEUE_LEN 8
@@ -140,8 +141,9 @@ static void usb_cli_handle_switch(const char *cmd, char *args)
if (err != ESP_OK) {
usb_cli_printf("\r\nПомилка керування каналом: %s\r\n", esp_err_to_name(err));
} else {
usb_cli_printf("\r\nКанал %d -> %s\r\n", channel,
dcdc_get_state(channel) ? "ON" : "OFF");
bool state = dcdc_get_state(channel);
usb_cli_printf("\r\nКанал %d -> %s\r\n", channel, state ? "ON" : "OFF");
ws2812_status_set_channel_state(channel, state);
}
}