Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions examples/voice_agent/main/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ void board_init()
// Initialize board support package and LEDs
bsp_i2c_init();
bsp_leds_init();
bsp_led_set(BSP_LED_RED, true);
bsp_led_set(BSP_LED_BLUE, true);

// Initialize temperature sensor
temperature_sensor_config_t temp_sensor_config = TEMPERATURE_SENSOR_CONFIG_DEFAULT(10, 50);
Expand Down
11 changes: 6 additions & 5 deletions examples/voice_agent/main/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,21 @@ static void set_led_state(const livekit_rpc_invocation_t* invocation, void* ctx)
}

const char *color = color_entry->valuestring;

bool state = cJSON_IsTrue(state_entry);

bsp_led_t led;
if (strncmp(color, "red", 3) == 0) {
led = BSP_LED_RED;
} else if (strncmp(color, "blue", 4) == 0) {
// TODO: there is a bug in the Korvo2 BSP which causes the LED pins to be swapped
// (i.e., blue is mapped to red and red is mapped to blue): https://github.com/espressif/esp-bsp/pull/632
led = BSP_LED_BLUE;
} else if (strncmp(color, "blue", 4) == 0) {
led = BSP_LED_RED;
} else {
error = "Unsupported color";
break;
}
// There is a known bug in the BSP component, so we need to invert the state for now.
// See https://github.com/espressif/esp-bsp/pull/610.
if (bsp_led_set(led, !state) != ESP_OK) {
if (bsp_led_set(led, state) != ESP_OK) {
error = "Failed to set LED state";
break;
}
Expand Down
3 changes: 1 addition & 2 deletions examples/voice_agent/main/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ dependencies:
path: ../../../components/third_party/esp-webrtc-solution/components/codec_board
# Eventually, the BSP will perform all the functions of the codec_board component.
# It currently is used because codec_board is required to support AEC.
esp32_s3_korvo_2:
version: ">=0.1"
esp32_s3_korvo_2: "4.1.0"
render_impl:
path: ../../../components/third_party/esp-webrtc-solution/components/av_render/render_impl
livekit_sandbox:
Expand Down