K5_DDY:
authordxy15521469561 <1731678236@qq.com>
Sat, 20 Jan 2024 06:20:36 +0000 (14:20 +0800)
committerdxy15521469561 <1731678236@qq.com>
Sat, 20 Jan 2024 06:20:36 +0000 (14:20 +0800)
更新

2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/mgr.py
2.sdk/project/K5_DDY/sdk/services/microPython/ports/quectel/core/mgr.py

index 60b8602..32f78b4 100644 (file)
@@ -1295,7 +1295,7 @@ class DeviceInfoManager(Abstract):
             self.mearsure_btn = int(hr_time[0])
             self.mearsure_timer = int(hr_time[1])
             if self.mearsure_btn != None and self.mearsure_timer != None:
-                print("hr......01....{} {}\r\n".format(hr_time[0],hr_time[1]))
+                # print("hr......01....{} {}\r\n".format(hr_time[0],hr_time[1]))
                 if self.mearsure_btn > 0:
                     if self.mearsure_timer > 0:
                         #print("get_hr_state:{} get_spo2_state:{} self.old_time:{} mearsure_timer:{}".format(self.get_hr_state,self.get_spo2_state,self.old_time,mearsure_timer))
index c067f5b..3d282bb 100644 (file)
@@ -1237,11 +1237,12 @@ class DeviceInfoManager(Abstract):
         
         if temp_state != None : #突然脱腕
             if temp_state > 1 and WEAR != 1:
-                print("TMEP WEAR !!!!")
+                # print("TMEP WEAR !!!!")
                 EventMesh.publish(constants.EVENT.STOP_TEMP)
-                EventMesh.publish("set_temp_state",0)       
+                EventMesh.publish("set_temp_state",0)   
+        if hr_state != None and  spo2_state !=  None and bp_state != None:
             if (hr_state > 1 or spo2_state > 1 or bp_state > 1) and WEAR != 1:
-                print("SENSOR WEAR !!!!")
+                # print("SENSOR WEAR !!!!")
                 if hr_state > 1 :
                     EventMesh.publish("set_hr_state",0)#2代表后台进入测试,定时测心率 1ui界面测试洗心率 
                     EventMesh.publish(constants.EVENT.STOP_HEART) 
@@ -1252,6 +1253,7 @@ class DeviceInfoManager(Abstract):
                     EventMesh.txt_log("auto stop_bp:22")
                     EventMesh.publish("set_bp_state",0)#2代表后台进入测试
                     EventMesh.publish(constants.EVENT.STOP_HEART)
+
         if self.pull_time == 0:
             self.pull_time = time_tmp
         # EventMesh.txt_log("time_tmp - self.pull_time!!!!{}".format(time_tmp - self.pull_time))
@@ -3377,16 +3379,17 @@ class getSosFlagManager(Abstract):#设置sos
             self.call_timer.start(10000, 0, self.call_timer_cb)#延迟10S 继续拨打
 
     def call_timer_cb(self, *args, **kwargs):
-        sos_state =  EventMesh.publish("get_dev_state")
-        tmp = 1 << 16
-        sos_state = sos_state|tmp #第16位=1
-        EventMesh.publish("set_dev_state",sos_state)
-
-        EventMesh.publish(constants.EVENT.START_LOCATION,[constants.PROTOCOL.AL_SEND,sos_state]) #开始AL定位
-        # print("call_timer_cb:{}".format(self.callnumer))
-        EventMesh.publish("save_phonename",str(self.callnumer))
-        EventMesh.publish("save_phonenum",str(self.callnumer))
-        EventMesh.publish("load_screen", {"screen": "dialing_noplay_popup"})  
+        if self.sos_flag == 1:
+            sos_state =  EventMesh.publish("get_dev_state")
+            tmp = 1 << 16
+            sos_state = sos_state|tmp #第16位=1
+            EventMesh.publish("set_dev_state",sos_state)
+
+            EventMesh.publish(constants.EVENT.START_LOCATION,[constants.PROTOCOL.AL_SEND,sos_state]) #开始AL定位
+            # print("call_timer_cb:{}".format(self.callnumer))
+            EventMesh.publish("save_phonename",str(self.callnumer))
+            EventMesh.publish("save_phonenum",str(self.callnumer))
+            EventMesh.publish("load_screen", {"screen": "dialing_noplay_popup"})  
 
     def close_sos_timer(self,event,msg):
         self.call_timer.stop()