formating changes

This commit is contained in:
Wizmo2
2023-11-04 23:07:25 -04:00
parent f9d7e15d4b
commit fc8d15f58d
3 changed files with 7 additions and 6 deletions

View File

@@ -115,7 +115,7 @@ static struct {
struct arg_str *type;
struct arg_int *length;
struct arg_int *gpio;
struct arg_int * scale;
struct arg_int * scale;
struct arg_lit *clear;
struct arg_end *end;
} ledvu_args;
@@ -686,7 +686,7 @@ static int do_ledvu_cmd(int argc, char **argv) {
} else {
ledvu.length = ledvu_args.length->count > 0 ? ledvu_args.length->ival[0] : 0;
}
ledvu.scale = ledvu_args.scale->count>0?ledvu_args.scale->ival[0]:ledvu.scale;
ledvu.scale = ledvu_args.scale->count>0?ledvu_args.scale->ival[0]:ledvu.scale;
if (!nerrors) {
@@ -1318,7 +1318,7 @@ void register_ledvu_config(void) {
ledvu_args.type = arg_str1(NULL, "type", "<none>|WS2812", "Led type (supports one rgb strip to display built in effects and allow remote control through 'dmx' messaging)");
ledvu_args.length = arg_int1(NULL, "length", "<1..255>", "Strip length (1-255 supported)");
ledvu_args.gpio = arg_int1(NULL, "gpio", "gpio", "Data pin");
ledvu_args.scale = arg_int0(NULL,"scale","<n>","Gain scale (precent)");
ledvu_args.scale = arg_int0(NULL,"scale","<n>","Gain scale (precent)");
ledvu_args.clear = arg_lit0(NULL, "clear", "Clear configuration");
ledvu_args.end = arg_end(4);

View File

@@ -1277,9 +1277,9 @@ static void ledv_handler( u8_t *data, int len) {
led_visu.mode = pkt->which;
led_visu.style = pkt->style;
led_visu.max = pkt->bright;
led_visu.gain = led_visu.max * led_vu_scale() / 100;
led_visu.gain = led_visu.max * led_vu_scale() / 100;
if (led_visu.mode) {
if (led_visu.mode) {
if (led_visu.mode == VISU_SPECTRUM) {
led_visu.n = (led_visu.config < MAX_BARS) ? led_visu.config : MAX_BARS;
spectrum_limits(led_visu.bars, 0, led_visu.n, 0, 0.25);
@@ -1295,7 +1295,7 @@ led_visu.gain = led_visu.max * led_vu_scale() / 100;
LOG_INFO("LED Visualizer mode %u with bars:%u max:%u style:%d gain:%u", led_visu.mode, led_visu.n, led_visu.max, led_visu.style, led_visu.gain);
} else {
led_vu_clear();
led_vu_clear();
LOG_INFO("Stopping led visualizer");
}