Add WS2812 status module and config
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user