From: dxy15521469561 <1731678236@qq.com> Date: Mon, 22 Jan 2024 03:22:27 +0000 (+0800) Subject: K5_DDY: X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=5046b14493f5e84c78833161644589b07ae25e31;p=mirrors%2FASR1603_G5.git K5_DDY: 更改IP和地址 --- diff --git a/2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/protocol.py b/2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/protocol.py index 0c137018..aee967c0 100644 --- a/2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/protocol.py +++ b/2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/protocol.py @@ -2363,7 +2363,7 @@ class MESSAGE_ProtoCol(ProtoCol): # [XT*YYYYYYYYYYYYYYY*LEN*MESSAGE_SOS] # 实例:[XT*334588000000156*0007*MESSAGE_SOS] class MESSAGE_SOS_ProtoCol(ProtoCol): - """微聊""" + """SOS下发文字短语""" TYPE = "MESSAGE_SOS" @@ -2380,14 +2380,14 @@ class MESSAGE_SOS_ProtoCol(ProtoCol): def recv(self, event, msg): """ - @param event: 微聊文字 + @param event: @param msg: 接收到的下行数据 """ msg = msg[1:-1] msg_s = msg.decode('ascii') msg_s = msg_s.split('MESSAGE_SOS,')[1] - + print("MESSAGE_SOS!!!!!!!!!!!!") for phonebook_tmp in msg_s: if len(phonebook_tmp) != 0: phonebook_name = UnicodeHexStr_To_Utf8Str(phonebook_tmp) @@ -2398,7 +2398,7 @@ class MESSAGE_SOS_ProtoCol(ProtoCol): # 请求[XT*334588000000156*0004*MSGQ] class MSGQ_ProtoCol(ProtoCol): - """微聊""" + """离线消息""" TYPE = "MSGQ" @@ -2421,7 +2421,7 @@ class MSGQ_ProtoCol(ProtoCol): msg = msg[1:-1] msg_s = msg.decode('ascii') - + print("MSGQ!!!!!!!!!!!!") @@ -2440,7 +2440,7 @@ class ProtoColResolver(object): def handler(self, data): # 这里接收数据 - # print("handler -> {}".format(data)) + print("handler -> {}".format(data)) # if data.startswith('Init;'): # data = data[5:] # EventMesh.publish(constants.EVENT.SET_KEY, {"value": ujson.loads(data)['KEY']}) diff --git a/2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/ui.py b/2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/ui.py index f04d7a26..6ec4aaab 100644 --- a/2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/ui.py +++ b/2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/ui.py @@ -5256,7 +5256,7 @@ class UIFINDScreen(Screen): EventMesh.publish("return_prev_screen") def Close(self): - print("self.FIND_timer_Close") + EventMesh.publish("close_motor_infor")#关闭马达和定时器 self.FIND_timer.stop() self.aud.stop() #播放声音 diff --git a/2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/ui_setting.py b/2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/ui_setting.py index 6ea395e0..3ee7ba8b 100644 --- a/2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/ui_setting.py +++ b/2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/ui_setting.py @@ -1214,6 +1214,7 @@ class PowerOnScreen(Screen): EventMesh.publish("set_motor_time",[1,2,8*1,8,4])#设置马达参数 def Close(self): + EventMesh.publish("close_motor_infor")#关闭马达和定时器 self.timer.stop() self.aud.setVolume(self.volum_size) pass diff --git a/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/btn_device_ec800m_d15.py b/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/btn_device_ec800m_d15.py index 019820a2..32193d38 100644 --- a/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/btn_device_ec800m_d15.py +++ b/2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/btn_device_ec800m_d15.py @@ -2640,12 +2640,9 @@ if EventMesh.model == "D15" : if self.KeyCall1_status == 0: video_state = EventMesh.publish("get_video_state") if video_state != 0:#视频通话打入或者接听后允许挂断视频通话 - if video_state == 6:#6是app打手表需要接通 - print("key17_extint_cb") - EventMesh.publish("video_answer_cb") - else: + if video_state != 6:#6是app打手表需要接通 EventMesh.publish("video_reject_cb",2)#挂断视频通话 - return + return self.WeChatKey_status = self.wechatKey.read_level() self.GPIO26_status = self.pwk_key26.read_level() self.KeyCall2_status = self.extint_19.read_level() @@ -2656,21 +2653,18 @@ if EventMesh.model == "D15" : EventMesh.debug_log('key17_extint_cb',args,self.KeyCall2_status,self.WeChatKey_status,self.GPIO26_status,self.KeyCall1_status,self.sosKey_status) # args[0]:gpio号 args[1]:上升沿或下降沿 if self.WeChatKey_status != 0 and self.GPIO26_status != 0 and self.KeyCall2_status != 0 and self.sosKey_status != 0: if self.KeyCall1_status == 0:#按下 - # if NEW_ENABLE == 0:#新的按键功能定义 - # video_state = EventMesh.publish("get_video_state") - # if video_state != 0:#视频通话打入或者接听后允许挂断视频通话 - # if video_state == 6:#6是app打手表需要接通 - # print("key17_extint_cb") - # EventMesh.publish("video_answer_cb") - # else: - # EventMesh.publish("video_reject_cb",2)#挂断视频通话 - # self.Keycall1_press_count=0 - # self.wechatKey_timer.stop() - # self.pwkey_timer.stop() - # self.sosKey_timer.stop() - # self.Keycall2_timer.stop() - # self.Keycall1_timer.stop() - # return + if NEW_ENABLE == 0:#新的按键功能定义 + video_state = EventMesh.publish("get_video_state") + if video_state != 0:#视频通话打入或者接听后允许挂断视频通话 + if video_state != 6:#6是app打手表需要接通 + EventMesh.publish("video_reject_cb",2)#挂断视频通话 + self.Keycall1_press_count=0 + self.wechatKey_timer.stop() + self.pwkey_timer.stop() + self.sosKey_timer.stop() + self.Keycall2_timer.stop() + self.Keycall1_timer.stop() + return EventMesh.publish("close_wechat_btn_timer") if self.Keycall1_press == 0 : self.wechatKey_timer.stop() @@ -2838,13 +2832,9 @@ if EventMesh.model == "D15" : if self.KeyCall2_status == 0: video_state = EventMesh.publish("get_video_state") if video_state != 0:#视频通话打入或者接听后允许挂断视频通话 - if video_state == 6:#6是app打手表需要接通 - print("key17_extint_cb") - EventMesh.publish("video_answer_cb") - else: - + if video_state != 6:#6是app打手表需要接通 EventMesh.publish("video_reject_cb",2)#挂断视频通话 - return + return self.WeChatKey_status = self.wechatKey.read_level() self.GPIO26_status = self.pwk_key26.read_level() # self.KeyCall1_status = self.extint_17.read_level() @@ -2853,21 +2843,6 @@ if EventMesh.model == "D15" : # EventMesh.debug_log('self.KeyCall1_status :{}',args,self.KeyCall1_status) # args[0]:gpio号 args[1]:上升沿或下降沿 if self.WeChatKey_status != 0 and self.GPIO26_status != 0 and self.KeyCall1_status != 0 and self.sosKey_status != 0: if self.KeyCall2_status == 0:#按下 - video_state = EventMesh.publish("get_video_state") - if video_state != 0:#视频通话打入或者接听后允许挂断视频通话 - if video_state == 6:#6是app打手表需要接通 - print("key19_extint_cb") - EventMesh.publish("video_answer_cb") - # else: - # EventMesh.publish("video_reject_cb",2)#挂断视频通话 - - self.Keycall2_press_count = 0 - self.wechatKey_timer.stop() - self.pwkey_timer.stop() - self.sosKey_timer.stop() - self.Keycall2_timer.stop() - self.Keycall1_timer.stop() - return EventMesh.publish("close_wechat_btn_timer") if self.Keycall2_press == 0 : self.wechatKey_timer.stop() @@ -2988,12 +2963,12 @@ if EventMesh.model == "D15" : EventMesh.publish("set_manual_measure_mode",3)#测量体温 elif self.Keycall2_press_count == 1:# self.Keycall2_press_count = 0 - # video_state = EventMesh.publish("get_video_state") - # print("video_state ",video_state) - # if video_state != 0: - # if video_state == 2:#2 是app拨打手表 1 是手表打app 3 是正在视频通话中 0 关闭只有第一次视频通话打入才允许接听 接通之后不允许接听了 - # EventMesh.publish("video_answer_cb") - # return + video_state = EventMesh.publish("get_video_state") + print("video_state ",video_state) + if video_state != 0: + if video_state == 6:#6 是app拨打手表 1 是手表打app 3 是正在视频通话中 0 关闭只有第一次视频通话打入才允许接听 接通之后不允许接听了 + EventMesh.publish("video_answer_cb") + return EventMesh.publish("stop_led_timer")#设置参数 call_state = EventMesh.publish("get_call_state") @@ -3559,12 +3534,9 @@ if EventMesh.model == "D15" : if self.WeChatKey_status == 0: video_state = EventMesh.publish("get_video_state") if video_state != 0:#视频通话打入或者接听后允许挂断视频通话 - if video_state == 6:#6是app打手表需要接通 - # print("wechatKey_extint_cb") - EventMesh.publish("video_answer_cb") - else: + if video_state != 6:#6是app打手表需要接通 EventMesh.publish("video_reject_cb",2)#挂断视频通话 - return + return # self.sosKey_status = self.sosKey.read_level() self.GPIO26_status = self.pwk_key26.read_level() @@ -3576,19 +3548,15 @@ if EventMesh.model == "D15" : if self.WeChatKey_status == 0:#按下 video_state = EventMesh.publish("get_video_state") if video_state != 0:#视频通话打入或者接听后允许挂断视频通话 - if video_state == 6:#6是app打手表需要接通 - print("wechatKey_extint_cb") - EventMesh.publish("video_answer_cb") - else: + if video_state != 6:#6是app打手表需要接通 EventMesh.publish("video_reject_cb",2)#挂断视频通话 - - self.wechatKey_press_count = 0 - self.wechatKey_timer.stop() - self.pwkey_timer.stop() - self.sosKey_timer.stop() - self.Keycall2_timer.stop() - self.Keycall1_timer.stop() - return + self.wechatKey_press_count = 0 + self.wechatKey_timer.stop() + self.pwkey_timer.stop() + self.sosKey_timer.stop() + self.Keycall2_timer.stop() + self.Keycall1_timer.stop() + return if self.wechatKey_press == 0: self.wechatKey_timer.stop() self.pwkey_timer.stop() @@ -3880,7 +3848,7 @@ if EventMesh.model == "D15" : video_state = EventMesh.publish("get_video_state") print("video_state call",video_state) if video_state != 0: - if video_state == 2:#2 是app拨打手表 1 是手表打app 3 是正在视频通话中 0 关闭只有第一次视频通话打入才允许接听 接通之后不允许接听了 + if video_state == 6:#2 是app拨打手表 1 是手表打app 3 是正在视频通话中 0 关闭只有第一次视频通话打入才允许接听 接通之后不允许接听了 EventMesh.publish("video_answer_cb") return call_state = EventMesh.publish("get_call_state") 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 b401c50a..fdfcff69 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 @@ -5271,7 +5271,7 @@ if EventMesh.model == "D15": jrtc.open(uid,ticket,[],[15,120,240,320]) EventMesh.publish(constants.EVENT.SYSTEM_UP)#唤醒休眠 - jrtc.set_rotate(jrtc.CAM_ROTATE_0) + jrtc.set_rotate(jrtc.CAM_ROTATE_90) self.video_count = 0 self.video_state_time = 0 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 01514b26..b036c1a5 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 @@ -1390,6 +1390,10 @@ class blood_ProtoCol(ProtoCol): """ # print("HRSTART_ProtoCol RECV msg:") #EventMesh.publish(constants.PROTOCOL.TEMP_SEND) + + + + # 设置血糖上传频率 # 平台发送: # [XT*334588000000156*len*bgstart,x] @@ -3116,17 +3120,19 @@ class AGTALK_ProtoCol(ProtoCol):#设备发起视频通话与app接听视频通 @param msg: 接收到的下行数据 """ # b'[SZKW*876226002021444*007B*AGTALK,0,01lqlyqzzQHpfwv5g7jFVC2H6Ha2tHFpMlfSm5sd2uo7o55JEcc=OVxewje6MjP0NgEODwsLDwkJCwkLCA0NDQ==,8762260020214441701226895]' - + print("AGTALK!!!!!!!!!!!!!") msg = msg[1:-1] msg_tmp = msg.decode('ascii') msg_tmp_d = msg_tmp.split(',') call_state = int(msg_tmp_d[1])#返回是否可以视频通话 if call_state == 0:#可正常通话 - tokens_data = msg_tmp_d[2]#会议id - meet_id = msg_tmp_d[3]#会议id - EventMesh.publish("set_vedio_meet_id", meet_id)# - EventMesh.publish("set_vedio_tokens_data", tokens_data)# - EventMesh.publish("open_vedio_infor") + if EventMesh.publish("get_video_state") != 0: + print("AGTALK!!!!!!!!!!!!!answer") + tokens_data = msg_tmp_d[2]#会议id + meet_id = msg_tmp_d[3]#会议id + EventMesh.publish("set_vedio_meet_id", meet_id)# + EventMesh.publish("set_vedio_tokens_data", tokens_data)# + EventMesh.publish("open_vedio_infor") else: #不能视频通话 diff --git a/2.sdk/project/K5_DDY/sdk/services/microPython/ports/quectel/core/protocol.py b/2.sdk/project/K5_DDY/sdk/services/microPython/ports/quectel/core/protocol.py index 4a2de8e7..1c1b56b2 100644 --- a/2.sdk/project/K5_DDY/sdk/services/microPython/ports/quectel/core/protocol.py +++ b/2.sdk/project/K5_DDY/sdk/services/microPython/ports/quectel/core/protocol.py @@ -25,7 +25,7 @@ import usys def server_init(server_type = None): #服务器选择1,防走丢,2大锤,3三基同创,4童信,5云米,6荣为 if server_type == None: - server_type = 1 + server_type = 2 #print("server_init:server_type:{}".format(server_type)) d_server_addr = "api.xcloudtech.com" d_server_port = 9000 @@ -1198,6 +1198,7 @@ class bodytemp2_ProtoCol(ProtoCol): if temp_state == 0:#只要两个不在测量 单次优先级最低 EventMesh.publish("set_temp_state",3)#3代表单次测量 EventMesh.publish(constants.PROTOCOL.BODYTEMP2_SEND) + class btemp2_ProtoCol(ProtoCol):#上传体温数据 """立即测量""" TYPE = "btemp2"