gengxin
author@CHENG <2393524978@qq.com>
Sat, 25 May 2024 08:00:51 +0000 (16:00 +0800)
committer@CHENG <2393524978@qq.com>
Sat, 25 May 2024 08:00:51 +0000 (16:00 +0800)
2.sdk/sdk/gui/lv_watch/lv_apps/factory_mode/factory_mode_autotest.c

index a97fe23..b32515e 100644 (file)
@@ -820,6 +820,14 @@ void autotest_gps_create(lv_obj_t * par)
     lv_label_set_text(label,str);
 
     fac_gps_mode_set(1);
+
+    lv_factory_obj_ext_t * ext_fac = factorymode_get_ext();
+    if(NULL != ext_fac)
+       {
+        ext_fac->module = AUTOTEST_GPS;
+        ext_fac->label_prompt = label;
+    }
+
     gps_core.force_on=0;
     gps_send_msg(GPS_MSG_STOP);
     gps_core.force_on=1;
@@ -1227,6 +1235,14 @@ void autotest_hal_stop(void)
     } else if(ext->module == AUTOTEST_VIBRATION) {
         Hal_Vibrator_Play_End();
     }
+       else if(ext->module == AUTOTEST_GPS)
+       {
+       #if USE_GPS
+               gps_core.force_on=0;
+               gps_send_msg(GPS_MSG_STOP);
+               fac_gps_mode_set(0);
+       #endif
+       }
     ext->module = AUTOTEST_MAX;
 
     if(TEST_AGING == ext->testmode) {