From: dxy15521469561 <1731678236@qq.com> Date: Fri, 24 May 2024 02:39:14 +0000 (+0800) Subject: G10:协议问题 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=dca3a7a3dfb1a973b5712a2222920655469df7e3;p=mirrors%2FASR1603_G5.git G10:协议问题 --- diff --git a/2.sdk/project/D10/new.bat b/2.sdk/project/D10/new.bat index 43458e99..8aacecf9 100644 --- a/2.sdk/project/D10/new.bat +++ b/2.sdk/project/D10/new.bat @@ -13,7 +13,7 @@ if errorlevel 0 ( ) :STEP1 -..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c usr -b 4096 -r 4096 -p 4096 -s 716800 -i .\images\customer_fs.bin +..\..\Helios_SDK\tools\ASR_1606\win32\mklfs.exe -c usr -b 4096 -r 4096 -p 4096 -s 393216 -i .\images\customer_fs.bin if errorlevel 1 ( echo "customer_fs.binÉú³Éʧ°Ü Çë¼ì²éusrĿ¼ÊÇ·ñ´óÓÚ316K!!!!!!!!!!!!!!!" goto exit diff --git a/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/mgr.py b/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/mgr.py index 494ad499..dcc3f70c 100644 --- a/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/mgr.py +++ b/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/mgr.py @@ -676,6 +676,7 @@ if EventMesh.model == "D10": EventMesh.debug_log("voice_callback:on_list_flag{}".format(on_list_flag)) if on_list_flag == 1:#在白名单里 if WLKEY == "2": + WL_timer.stop() WL_timer.start(30000, 0, WL_timer_cb) else: EventMesh.debug_log("voice_callback:不在白名单中,挂断") @@ -1340,7 +1341,7 @@ if EventMesh.model == "D10": if get_temp_state > 1 and (WEAR != 1 or call_state != 0): EventMesh.publish(constants.EVENT.STOP_TEMP) - EventMesh.publish("set_temp_state",0) + EventMesh.publish("set_temp_state",0) EventMesh.txt_log("auto stop_temp:22") if (self.get_hr_state > 1 or self.get_spo2_state > 1 or get_bp_state > 1 or get_bg_state > 1) and (WEAR != 1 or call_state != 0): @@ -1365,7 +1366,6 @@ if EventMesh.model == "D10": EventMesh.publish(constants.PROTOCOL.OXYGEN_SEND,spo2_value) if get_bp_state > 1: - EventMesh.txt_log("auto stop_bp:22") EventMesh.publish("set_bp_state",0)#2代表后台进入测试 EventMesh.publish(constants.EVENT.STOP_HEART) @@ -1382,7 +1382,6 @@ if EventMesh.model == "D10": if get_bg_state > 1: EventMesh.txt_log("auto stop_bg:22") - EventMesh.publish("set_bg_state",0)#2代表后台进入测试 EventMesh.publish(constants.EVENT.STOP_HEART) if WEAR == 1: @@ -1575,6 +1574,8 @@ if EventMesh.model == "D10": EventMesh.publish(constants.PROTOCOL.TEMP_SEND,[tmp_f_tmp,tmp_d_tmp]) EventMesh.publish(constants.EVENT.STOP_TEMP) EventMesh.txt_log("auto start_temp:333") + else: + self.temp_one_state = 0 @@ -1597,7 +1598,7 @@ if EventMesh.model == "D10": EventMesh.txt_log("auto START_temp:1") EventMesh.publish(constants.EVENT.START_TEMP) - elif (time_tmp-self.temp_timeSecond) >= 30 and self.temp_state == 1: + elif (time_tmp-self.temp_timeSecond) >= 30 and self.temp_state == 1 and get_temp_state == 2: self.temp_state = 0 EventMesh.txt_log("auto stop_temp:1") EventMesh.publish("set_temp_state",0) @@ -1663,7 +1664,7 @@ if EventMesh.model == "D10": # EventMesh.publish("set_hr_blood_led",1) EventMesh.publish(constants.EVENT.START_HEART) - elif (time_tmp - self.hr_timeSecond) >= 60 and self.HR_Onestate == 1: + elif (time_tmp - self.hr_timeSecond) >= 60 and self.HR_Onestate == 1 and get_hr_state == 2: self.HR_Onestate = 0 EventMesh.publish("set_hr_state",0)#2代表后台进入测试 EventMesh.debug_log("stop debug3") @@ -1713,7 +1714,7 @@ if EventMesh.model == "D10": EventMesh.publish("set_spo2_state",2)#2代表后台进入测试 EventMesh.publish(constants.EVENT.START_BLOOD_OXYGEN)#K开血氧 - elif (time_tmp - self.spo2_timeSecond) >= 60 and self.spo2auto_state == 1: + elif (time_tmp - self.spo2_timeSecond) >= 60 and self.spo2auto_state == 1 and get_spo2_state == 2: EventMesh.publish("set_spo2_state",0)#2代表后台进入测试 self.spo2auto_state = 0 EventMesh.publish(constants.EVENT.STOP_BLOOD_OXYGEN) @@ -1760,7 +1761,7 @@ if EventMesh.model == "D10": # EventMesh.publish("set_hr_blood_led",1) EventMesh.publish(constants.EVENT.START_HEART) - elif (time_tmp - self.bp_timeSecond) >= 60 and self.bpauto_state == 1: + elif (time_tmp - self.bp_timeSecond) >= 60 and self.bpauto_state == 1 and get_bp_state == 2: self.bpauto_state = 0 EventMesh.publish("set_bp_state",0)#2代表后台进入测试 blood_data = get_autoblood_value() @@ -1816,7 +1817,7 @@ if EventMesh.model == "D10": # EventMesh.publish("set_hr_blood_led",1) EventMesh.publish(constants.EVENT.START_HEART) self.BG_state = 1 - elif (time_tmp - self.bg_timeSecond) >= 60 and self.BG_state == 1: + elif (time_tmp - self.bg_timeSecond) >= 60 and self.BG_state == 1 and get_bg_state == 2: self.BG_state = 0 EventMesh.publish("set_bg_state",0)#2代表后台进入测试 # EventMesh.publish("stop_led_timer")#设置参数 diff --git a/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/mgr_d15.py b/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/mgr_d15.py index c09f7101..25202692 100644 --- a/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/mgr_d15.py +++ b/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/mgr_d15.py @@ -1609,7 +1609,7 @@ if EventMesh.model == "D15": EventMesh.txt_log("auto START_temp:1") EventMesh.publish(constants.EVENT.START_TEMP) - elif (time_tmp-self.temp_timeSecond) >= 30 and self.temp_state == 1: + elif (time_tmp-self.temp_timeSecond) >= 30 and self.temp_state == 1 and get_temp_state == 2: self.temp_state = 0 EventMesh.txt_log("auto stop_temp:1") EventMesh.publish("set_temp_state",0) @@ -1673,7 +1673,7 @@ if EventMesh.model == "D15": # EventMesh.publish("set_hr_blood_led",1) EventMesh.publish(constants.EVENT.START_HEART) - elif (time_tmp - self.hr_timeSecond) >= 60 and self.HR_Onestate == 1: + elif (time_tmp - self.hr_timeSecond) >= 60 and self.HR_Onestate == 1 and get_hr_state == 2: self.HR_Onestate = 0 EventMesh.publish("set_hr_state",0)#2代表后台进入测试 EventMesh.debug_log("stop debug3") @@ -1723,7 +1723,7 @@ if EventMesh.model == "D15": EventMesh.publish("set_spo2_state",2)#2代表后台进入测试 EventMesh.publish(constants.EVENT.START_BLOOD_OXYGEN)#K开血氧 - elif (time_tmp - self.spo2_timeSecond) >= 60 and self.spo2auto_state == 1: + elif (time_tmp - self.spo2_timeSecond) >= 60 and self.spo2auto_state == 1 and get_spo2_state == 2: EventMesh.publish("set_spo2_state",0)#2代表后台进入测试 self.spo2auto_state = 0 EventMesh.publish(constants.EVENT.STOP_BLOOD_OXYGEN) @@ -1770,7 +1770,7 @@ if EventMesh.model == "D15": # EventMesh.publish("set_hr_blood_led",1) EventMesh.publish(constants.EVENT.START_HEART) - elif (time_tmp - self.bp_timeSecond) >= 60 and self.bpauto_state == 1: + elif (time_tmp - self.bp_timeSecond) >= 60 and self.bpauto_state == 1 and get_bp_state == 2: self.bpauto_state = 0 EventMesh.publish("set_bp_state",0)#2代表后台进入测试 blood_data = get_autoblood_value() @@ -1825,7 +1825,7 @@ if EventMesh.model == "D15": # EventMesh.publish("set_hr_blood_led",1) EventMesh.publish(constants.EVENT.START_HEART) self.BG_state = 1 - elif (time_tmp - self.bg_timeSecond) >= 60 and self.BG_state == 1: + elif (time_tmp - self.bg_timeSecond) >= 60 and self.BG_state == 1 and get_bg_state == 2: self.BG_state = 0 EventMesh.publish("set_bg_state",0)#2代表后台进入测试 # EventMesh.publish("stop_led_timer")#设置参数 diff --git a/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/protocol.py b/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/protocol.py index 6e64fe91..2ab81a55 100644 --- a/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/protocol.py +++ b/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/protocol.py @@ -456,7 +456,7 @@ class SockManager(Abstract): # ip_addr = "app.api.thisiot.com" # http://app.api.thisiot.com/ url = "http://app.api.thisiot.com/dev/device/check?imei={}&bid={}&sonce={}&sign={}".format(imei,pid_data,sonce_data,sign_data) - + # print("url:{}".format(url)) response = request.get(url) data_tmp ={} @@ -2208,7 +2208,7 @@ class sosHome_dial_ProtoCol(ProtoCol): TYPE = "SOS" def send(self, event, msg): # [XT*334588000000156*0004*MONITOR] - send_data = self.PID+"*%s*0003*SOS"%(self.imei) + send_data = EventMesh.publish("get_new_pid")+"*%s*0003*SOS"%(self.imei) MD5_SIGN = self.pack_MD5_head(send_data) data = "[%s%s]"%(str(MD5_SIGN),send_data) print("sosHome_dial_ProtoCol:data:%s"%(data)) @@ -3418,7 +3418,7 @@ class SCREEN_SHOWProtoCol(ProtoCol): TYPE = "SCREEN_SHOW" def send(self, event, msg): # [XT*334588000000156*0006*SILENCETIME2] - send_data = self.PID+"*%s*000B*SCREEN_SHOW"%(self.imei) + send_data = EventMesh.publish("get_new_pid")+"*%s*000B*SCREEN_SHOW"%(self.imei) MD5_SIGN = self.pack_MD5_head(send_data) data = "[%s%s]"%(str(MD5_SIGN),send_data) # print("KEYBRD:data:%s"%(data))