diff --git a/main/osc_control.c b/main/osc_control.c --- a/main/osc_control.c +++ b/main/osc_control.c @@ -36,6 +36,10 @@ static void sender() } } +static uint8_t r_man = 0; +static uint8_t g_man = 0; +static uint8_t b_man = 0; + static bool callback(const char *topic, const char *format, esp_osc_value_t *values) { @@ -73,6 +77,21 @@ static bool callback(const char *topic, { ledstrip_set_modifier(values[i].f); } + else if(strcmp(topic, "/led_manual_r") == 0) + { + r_man = values[i].f * 255.0; + ledstrip_set(r_man, g_man, b_man); + } + else if(strcmp(topic, "/led_manual_g") == 0) + { + g_man = values[i].f * 255.0; + ledstrip_set(r_man, g_man, b_man); + } + else if(strcmp(topic, "/led_manual_b") == 0) + { + b_man = values[i].f * 255.0; + ledstrip_set(r_man, g_man, b_man); + } } break; case 'd':