主流程
This commit is contained in:
1 parent
f96e72dbb8
commit
0045c0c390
10 files changed
+216
-74
No files matched your search
+12
-4
@@ -58,13 +58,21 @@ void app_main(void)
|
||||
/* 启动 WiFi + HTTP 网页控制服务器 */
|
||||
web_ctrl_init();
|
||||
|
||||
/* 系统就绪: 绿灯 (低亮) */
|
||||
rgb_set(0, 32, 0);
|
||||
/* 系统就绪: 黄灯 (低亮) */
|
||||
rgb_set(32, 32, 0);
|
||||
rgb_set_state(RGB_STATE_IDLE);
|
||||
ESP_LOGI(TAG, "系统就绪, 等待网页指令...");
|
||||
|
||||
while (1) {
|
||||
/* 心跳指示: 绿灯慢闪 (低亮) */
|
||||
rgb_set(0, 32, 0);
|
||||
/* 根据系统状态选择闪烁颜色 */
|
||||
rgb_state_t st = rgb_get_state();
|
||||
if (st == RGB_STATE_DONE) {
|
||||
/* 绿灯慢闪: Cycle 执行完毕 */
|
||||
rgb_set(0, 32, 0);
|
||||
} else {
|
||||
/* 黄灯慢闪: 待机 */
|
||||
rgb_set(32, 32, 0);
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
rgb_off();
|
||||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
|
||||
Reference in new issue
Block a user