feat(i18n): zh-CN examples log in English, matching the serial-monitor convention
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2b73b57ee6
commit
4e99dd3a87
12 files changed
+28
-28
No files matched your search
@@ -18,8 +18,8 @@ void setup() {
|
||||
}
|
||||
|
||||
Serial.println("");
|
||||
Serial.println("Wi-Fi conectado com sucesso!");
|
||||
Serial.print("Endereço IP: ");
|
||||
Serial.println("Wi-Fi connected!");
|
||||
Serial.print("IP address: ");
|
||||
Serial.println(WiFi.localIP());
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ void app_main(void)
|
||||
audio_element_set_uri(fatfs_stream_reader, "/sdcard/test.mp3");
|
||||
|
||||
// 启动流水线
|
||||
ESP_LOGI(TAG, "Iniciando pipeline...");
|
||||
ESP_LOGI(TAG, "Starting pipeline...");
|
||||
audio_pipeline_run(pipeline);
|
||||
|
||||
// 保持流水线运行
|
||||
|
||||
@@ -12,7 +12,7 @@ void app_main(void)
|
||||
// 初始化 ESP-DSP
|
||||
esp_err_t ret = dsps_fft2r_init_fc32(NULL, CONFIG_DSP_MAX_FFT_SIZE);
|
||||
if (ret != ESP_OK) {
|
||||
printf("Erro ao inicializar o ESP-DSP!\n");
|
||||
printf("Failed to initialize ESP-DSP!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,8 +46,8 @@ void app_main(void)
|
||||
esp_chip_info(&chip_info);
|
||||
|
||||
ESP_LOGI(TAG, "===========================================");
|
||||
ESP_LOGI(TAG, " Iniciando ESP-IDF v5.x Modern Application ");
|
||||
ESP_LOGI(TAG, " Modelo do Chip: %d | Núcleos: %d | Rev: %d",
|
||||
ESP_LOGI(TAG, " Starting ESP-IDF v5.x Modern Application ");
|
||||
ESP_LOGI(TAG, " Chip model: %d | Cores: %d | Rev: %d",
|
||||
chip_info.model, chip_info.cores, chip_info.revision);
|
||||
ESP_LOGI(TAG, "===========================================");
|
||||
|
||||
|
||||
@@ -31,13 +31,13 @@ static void button_single_click_cb(void *arg, void *data)
|
||||
/* 长按回调(> 3 秒) */
|
||||
static void button_long_press_cb(void *arg, void *data)
|
||||
{
|
||||
ESP_LOGW(TAG, "Evento: Pressionamento Longo! Acionando modo de reset de fábrica.");
|
||||
ESP_LOGW(TAG, "Event: long press! Entering factory reset mode.");
|
||||
led_indicator_start(led_handle, BLINK_BREATHE_FAST);
|
||||
}
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
ESP_LOGI(TAG, "Iniciando ESP-IoT-Solution Component Suite");
|
||||
ESP_LOGI(TAG, "Starting ESP-IoT-Solution Component Suite");
|
||||
|
||||
// 1. LED Indicator 配置
|
||||
led_indicator_gpio_config_t led_cfg = {
|
||||
@@ -64,7 +64,7 @@ void app_main(void)
|
||||
iot_button_register_cb(btn_handle, BUTTON_SINGLE_CLICK, button_single_click_cb, NULL);
|
||||
iot_button_register_cb(btn_handle, BUTTON_LONG_PRESS_START, button_long_press_cb, NULL);
|
||||
|
||||
ESP_LOGI(TAG, "Drivers inicializados com sucesso! Pressione o botão GPIO 0.");
|
||||
ESP_LOGI(TAG, "Drivers initialized! Press the button on GPIO 0.");
|
||||
|
||||
while (1) {
|
||||
vTaskDelay(pdMS_TO_TICKS(1000));
|
||||
|
||||
@@ -15,7 +15,7 @@ void app_event_cb(const esp_matter_event_t *event)
|
||||
bool on = false;
|
||||
esp_matter_attribute_get(attr_update->endpoint_id, attr_update->cluster_id,
|
||||
attr_update->attribute_id, &on);
|
||||
ESP_LOGI(TAG, "Lâmpada %s", on ? "ligada" : "desligada");
|
||||
ESP_LOGI(TAG, "Lamp %s", on ? "on" : "off");
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -40,5 +40,5 @@ void app_main(void)
|
||||
// 启动 Matter 协议栈
|
||||
ESP_ERROR_CHECK(esp_matter::start(node));
|
||||
|
||||
ESP_LOGI(TAG, "Dispositivo Matter iniciado. Aguardando comissionamento...");
|
||||
ESP_LOGI(TAG, "Matter device started. Waiting for commissioning...");
|
||||
}
|
||||
@@ -30,7 +30,7 @@ static const uint8_t broadcast_mac[ESP_NOW_ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
/* 发送数据包时执行的回调 */
|
||||
static void on_data_sent(const uint8_t *mac_addr, esp_now_send_status_t status)
|
||||
{
|
||||
ESP_LOGI(TAG, "Envio concluído: %s", status == ESP_NOW_SEND_SUCCESS ? "SUCESSO (ACK)" : "FALHA");
|
||||
ESP_LOGI(TAG, "Send complete: %s", status == ESP_NOW_SEND_SUCCESS ? "SUCCESS (ACK)" : "FAILURE");
|
||||
}
|
||||
|
||||
/* 接收其他 ESP32 数据包时执行的回调 */
|
||||
@@ -70,7 +70,7 @@ void app_main(void)
|
||||
memcpy(peer_info.peer_addr, broadcast_mac, ESP_NOW_ETH_ALEN);
|
||||
ESP_ERROR_CHECK(esp_now_add_peer(&peer_info));
|
||||
|
||||
ESP_LOGI(TAG, "ESP-NOW pronto! Enviando telemetria a cada 3 segundos...");
|
||||
ESP_LOGI(TAG, "ESP-NOW ready! Sending telemetry every 3 seconds...");
|
||||
|
||||
dados_pacote_t telemetria = {
|
||||
.sensor_id = 101,
|
||||
@@ -84,7 +84,7 @@ void app_main(void)
|
||||
|
||||
esp_err_t res = esp_now_send(broadcast_mac, (uint8_t *)&telemetria, sizeof(telemetria));
|
||||
if (res != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Erro ao disparar envio ESP-NOW: %d", res);
|
||||
ESP_LOGE(TAG, "Failed to send ESP-NOW packet: %d", res);
|
||||
}
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(3000));
|
||||
|
||||
@@ -56,7 +56,7 @@ void app_main(void)
|
||||
esp_rmaker_node_t *node = esp_rmaker_node_init(&rainmaker_cfg, "ESP32_SmartSwitch", "Switch");
|
||||
|
||||
// 创建默认的 'Switch' 设备
|
||||
switch_device = esp_rmaker_switch_device_create("Luz Sala", NULL, true);
|
||||
switch_device = esp_rmaker_switch_device_create("Living Room Light", NULL, true);
|
||||
|
||||
// 注册写回调
|
||||
esp_rmaker_device_add_cb(switch_device, write_cb, NULL);
|
||||
@@ -72,5 +72,5 @@ void app_main(void)
|
||||
// 通过 BLE 启动 Wi-Fi 配网(在官方 RainMaker 应用中打开)
|
||||
app_wifi_start(POP_TYPE_RANDOM);
|
||||
|
||||
ESP_LOGI(TAG, "Nó RainMaker pronto! Escaneie o QR Code no app ESP RainMaker.");
|
||||
ESP_LOGI(TAG, "RainMaker node ready! Scan the QR code in the ESP RainMaker app.");
|
||||
}
|
||||
@@ -46,7 +46,7 @@ void speech_recognition_task(void *arg)
|
||||
const esp_mn_iface_t *multinet = &ESP_MN_HANDLE;
|
||||
model_iface_data_t *model_data = multinet->create(&MULTINET_MODEL, 6000);
|
||||
|
||||
ESP_LOGI(TAG, "Aguardando palavra-chave de ativação (ex: 'Hi, ESP')...");
|
||||
ESP_LOGI(TAG, "Waiting for the wake word (e.g. 'Hi, ESP')...");
|
||||
|
||||
while (1) {
|
||||
afe_fetch_result_t *res = afe_handle->fetch(afe_data);
|
||||
@@ -69,9 +69,9 @@ void speech_recognition_task(void *arg)
|
||||
|
||||
// 操作示例
|
||||
if (mn_res->command_id[0] == 1) {
|
||||
ESP_LOGI(TAG, "Ação: Ligar Luz da Sala");
|
||||
ESP_LOGI(TAG, "Action: turn on the living room light");
|
||||
} else if (mn_res->command_id[0] == 2) {
|
||||
ESP_LOGI(TAG, "Ação: Desligar Luz da Sala");
|
||||
ESP_LOGI(TAG, "Action: turn off the living room light");
|
||||
}
|
||||
} else if (mn_state == ESP_MN_STATE_TIMEOUT) {
|
||||
ESP_LOGI(TAG, "Tempo esgotado. Retornando ao modo de escuta de Wake Word.");
|
||||
@@ -83,7 +83,7 @@ void speech_recognition_task(void *arg)
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
ESP_LOGI(TAG, "Iniciando ESP-SR Speech Recognition Engine");
|
||||
ESP_LOGI(TAG, "Starting ESP-SR Speech Recognition Engine");
|
||||
|
||||
// 配置音频前端流水线(AEC、BSS、VAD、WakeNet)
|
||||
afe_config_t afe_config = AFE_CONFIG_DEFAULT();
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
Serial.setDebugOutput(true);
|
||||
Serial.println("Iniciando câmera...");
|
||||
Serial.println("Starting camera...");
|
||||
|
||||
camera_config_t config;
|
||||
config.ledc_channel = LEDC_CHANNEL_0;
|
||||
@@ -38,17 +38,17 @@ void setup() {
|
||||
config.fb_count = 1;
|
||||
|
||||
if (esp_camera_init(&config) != ESP_OK) {
|
||||
Serial.println("Falha ao iniciar a câmera!");
|
||||
Serial.println("Failed to start camera!");
|
||||
return;
|
||||
}
|
||||
|
||||
Serial.println("Câmera inicializada com sucesso!");
|
||||
Serial.println("Camera initialized!");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
camera_fb_t *fb = esp_camera_fb_get();
|
||||
if (!fb) {
|
||||
Serial.println("Falha ao capturar imagem!");
|
||||
Serial.println("Failed to capture image!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ static esp_err_t zb_attribute_handler(const esp_zb_zcl_set_attr_value_message_t
|
||||
if (message->attribute.id == ESP_ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID &&
|
||||
message->attribute.data.type == ESP_ZB_ZCL_ATTR_TYPE_BOOL) {
|
||||
bool on_off_state = message->attribute.data.value ? *(bool *)message->attribute.data.value : false;
|
||||
ESP_LOGW(TAG, ">>> COMANDO ZIGBEE RECEBIDO: Lâmpada %s", on_off_state ? "LIGADA" : "DESLIGADA");
|
||||
ESP_LOGW(TAG, ">>> COMANDO ZIGBEE RECEBIDO: Lamp %s", on_off_state ? "ON" : "OFF");
|
||||
}
|
||||
}
|
||||
return ESP_OK;
|
||||
@@ -40,12 +40,12 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_msg_t *signal_msg)
|
||||
|
||||
switch (sig_type) {
|
||||
case ESP_ZB_ZDO_SIGNAL_SKIP_STARTUP:
|
||||
ESP_LOGI(TAG, "Iniciando comissionamento na rede Zigbee...");
|
||||
ESP_LOGI(TAG, "Starting commissioning on the Zigbee network...");
|
||||
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_STEERING);
|
||||
break;
|
||||
case ESP_ZB_BDB_SIGNAL_STEERING:
|
||||
if (err_status == ESP_OK) {
|
||||
ESP_LOGI(TAG, "Conectado com sucesso à rede Zigbee 3.0!");
|
||||
ESP_LOGI(TAG, "Connected to the Zigbee 3.0 network!");
|
||||
} else {
|
||||
ESP_LOGW(TAG, "Buscando coordenador Zigbee novamente...");
|
||||
esp_zb_scheduler_alarm((esp_zb_callback_t)esp_zb_bdb_start_top_level_commissioning, ESP_ZB_BDB_MODE_NETWORK_STEERING, 1000);
|
||||
|
||||
@@ -42,7 +42,7 @@ fn main() -> ! {
|
||||
led.toggle();
|
||||
counter += 1;
|
||||
|
||||
println!("Ciclo Rust #{}: LED está {:?}", counter, led.is_set_high());
|
||||
println!("Rust cycle #{}: LED is {:?}", counter, led.is_set_high());
|
||||
delay.delay_millis(500);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user