zhunk пре 3 месеци
родитељ
комит
1777cd11d6

+ 1 - 1
Application_cbd_apm32f1/applications/control.h

@@ -17,7 +17,7 @@
 #define SENSOR_EN        0              //温湿度:0关闭,1打开
 #define PCB_V1           0             //1-旧PCB,0-新PCB(模块化)
 ////////////////////////////////////////////////////////////////
-#define VERSION_BZY         "3.11.4"                   //孢子仪
+#define VERSION_BZY         "3.11.5"                   //孢子仪
 
 
 /*********************************************************************/

+ 10 - 0
Application_cbd_apm32f1/applications/hmi.c

@@ -458,12 +458,22 @@ static void depth_of_field_fusion(void)
 /* 完成对焦 */
 static void auto_focus_done(void)
 {
+    char *c0 = makeJson_Warn("auto_focus","auto_focus");
+    DTU_Write("%s",c0);
+    rt_free(c0);
     LOG_I("[对焦] 完成! 最佳位置:%d 清晰度:%.2f", g_af.best_pos, g_af.best_sharpness);
     /* 停止 timer_takephoto,避免景深融合期间产生新的清晰度更新 */
     rt_timer_stop(timer_takephoto);
     /* 标记景深融合开始,auto_focus_process 会忽略清晰度处理 */
     g_af.fusion_active = true;
+    /* 等待清晰度更新 */
     g_af.sharpness_updated = false;
+    rt_timer_start(timer_takephoto);
+    uint16_t wait_count = 0;
+    while (!g_af.sharpness_updated && wait_count < 200) {
+        rt_thread_delay(50);
+        wait_count++;
+    }
     /* 执行景深融合 */
     depth_of_field_fusion();
     g_af.fusion_active = false;