From 8bb5cc8836fd2e74d408be68f0d76d1ca11eeecd Mon Sep 17 00:00:00 2001 From: Wang Beihong Date: Fri, 6 Mar 2026 13:23:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E5=8A=A8=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=8F=B0=E5=91=BD=E4=BB=A4=E5=88=9D=E5=A7=8B=E5=8C=96=E5=88=B0?= =?UTF-8?q?=E4=B8=BB=E5=BE=AA=E7=8E=AF=E4=B8=AD=EF=BC=8C=E7=A1=AE=E4=BF=9D?= =?UTF-8?q?=E5=9C=A8=20I2C=20=E5=87=86=E5=A4=87=E5=90=8E=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main/main.c b/main/main.c index ad09b13..2d4180a 100755 --- a/main/main.c +++ b/main/main.c @@ -49,11 +49,6 @@ void app_main(void) ESP_ERROR_CHECK(wifi_connect_init()); printf("设备启动完成:长按按键进入配网模式,手机连接 ESP32-* 后访问 http://192.168.4.1\n"); - ESP_ERROR_CHECK(console_cmd_init()); - ESP_ERROR_CHECK(console_user_cmds_register()); - ESP_ERROR_CHECK(console_cmd_all_register()); // 可选:自动注册插件命令 - ESP_ERROR_CHECK(console_cmd_start()); - // 启动 LVGL 演示程序,显示简单的界面 ESP_ERROR_CHECK(start_lvgl_demo()); @@ -91,6 +86,11 @@ void app_main(void) i2c_ready = true; } + ESP_ERROR_CHECK(console_cmd_init()); + ESP_ERROR_CHECK(console_user_cmds_register()); + ESP_ERROR_CHECK(console_cmd_all_register()); // 可选:自动注册插件命令 + ESP_ERROR_CHECK(console_cmd_start()); + for (;;) { i2c_master_messager_data_t sensor_data = {0};