From: azao <821478748@qq.com> Date: Mon, 22 Dec 2025 09:41:08 +0000 (+0800) Subject: 优化了一代心跳没发的问题 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=c8f5495dc3fdb38b528e4f7213aad463eaa60530;p=mirrors%2FASR1603_G5.git 优化了一代心跳没发的问题 以及取消一代本地判断语音留言和蓝牙的部分 --- diff --git a/2.sdk/project/7PIN_1_5/sdk/services/microPython/ports/quectel/core/ai_VC.py b/2.sdk/project/7PIN_1_5/sdk/services/microPython/ports/quectel/core/ai_VC.py index 4715c1a1..86be6fc0 100644 --- a/2.sdk/project/7PIN_1_5/sdk/services/microPython/ports/quectel/core/ai_VC.py +++ b/2.sdk/project/7PIN_1_5/sdk/services/microPython/ports/quectel/core/ai_VC.py @@ -1807,7 +1807,6 @@ class device_res_author(Abstract): if dev_type == "7PIN_BK_EU":#英文小瑞 url = "http://dmp-global.raisound.com/bz-api/dev/time" else: - url = "https://qipai-dev.dobell.top/qp-dmp-api/dev/time" url = "https://dmp-api.qipai.com/qp-dmp-api/dev/time" # url = "http://dmp.raisound.com/bz-api/dev/time" response = request.get(url,timeout=5) @@ -1939,7 +1938,6 @@ class device_res_author(Abstract): if dev_type == "7PIN_BK_EU":#英文小瑞 url = "http://dmp-global.raisound.com/bz-api/dev/auth/active" else: - url = "https://qipai-dev.dobell.top/qp-dmp-api/dev/auth/active" url = "https://dmp-api.qipai.com/qp-dmp-api/dev/auth/active" # url = "http://dmp.raisound.com/bz-api/dev/auth/active" data =ujson.dumps(data) @@ -2053,7 +2051,6 @@ class device_res_author(Abstract): if dev_type == "7PIN_BK_EU":#英文小瑞 sign_url = "http://dmp-global.raisound.com/bz-api/dev/auth/sign_in" #登入地址 else: - sign_url = "https://qipai-dev.dobell.top/qp-dmp-api/dev/auth/sign_in" #登入地址 sign_url = "https://dmp-api.qipai.com/qp-dmp-api/dev/auth/sign_in" # sign_url = "http://dmp.raisound.com/bz-api/dev/auth/sign_in" #登入地址 #获取验证码 @@ -2127,7 +2124,6 @@ class device_res_author(Abstract): if dev_type == "7PIN_BK_EU":#英文小瑞 url = "http://dmp-global.raisound.com/bz-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid) else: - url = "https://qipai-dev.dobell.top/qp-dmp-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid) url = "https://dmp-api.qipai.com/qp-dmp-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid) # url = "http://dmp.raisound.com/bz-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid) #北科地址 print("{} H:{}".format(url,headers_T)) @@ -2167,7 +2163,6 @@ class device_res_author(Abstract): if dev_type == "7PIN_BK_EU":#英文小瑞 dev_tokenip = "http://dmp-global.raisound.com/bz-api/dev/auth/token" #设备新令牌更新地址 else: - dev_tokenip = "https://qipai-dev.dobell.top/qp-dmp-api/dev/auth/token" #设备新令牌更新地址 dev_tokenip = "https://dmp-api.qipai.com/qp-dmp-api/dev/auth/token" # dev_tokenip = "http://dmp.raisound.com/bz-api/dev/auth/token" #设备新令牌更新地址 @@ -2244,7 +2239,6 @@ class OTA(): # if dev_type == "7PIN" or dev_type == "7PIN_coze":#柒牌 # url = "http://ota.qipai.com/bz-cmp-api/api/task?deviceId={}&sourceVersion={}".format(modem.getDevImei(),sourceVersion) # else: - url = "https://qipai-dev.dobell.top/qp-dmp-api/ota/task?deviceId={}&sourceVersion={}".format(modem.getDevImei(),sourceVersion) url = "https://dmp-api.qipai.com/qp-dmp-api/ota/task?deviceId={}&sourceVersion={}".format(modem.getDevImei(),sourceVersion) print(url) response = request.get(url,timeout=5) @@ -2314,7 +2308,6 @@ class OTA(): # if dev_type == "7PIN" or dev_type == "7PIN_coze":#柒牌 # url = "http://ota.qipai.com/bz-cmp-api/api/task?deviceId={}&sourceVersion={}".format(modem.getDevImei(),sourceVersion) # else: - url = "https://qipai-dev.dobell.top/qp-dmp-api/ota/task?deviceId={}&sourceVersion={}".format(modem.getDevImei(),sourceVersion) url = "https://dmp-api.qipai.com/qp-dmp-api/ota/task?deviceId={}&sourceVersion={}".format(modem.getDevImei(),sourceVersion) print(url) response = request.get(url,timeout=5) @@ -2412,7 +2405,6 @@ class OTA(): # if dev_type == "7PIN" or dev_type == "7PIN_1_5" or dev_type == "7PIN_coze":#柒牌 # url = "http://ota.qipai.com/bz-cmp-api/api/result?deviceId={}¤tVersion={}".format(modem.getDevImei(),currentVersion) # else: - url = "https://qipai-dev.dobell.top/qp-dmp-api/ota/result?deviceId={}¤tVersion={}".format(modem.getDevImei(),currentVersion) url = "https://dmp-api.qipai.com/qp-dmp-api/ota/result?deviceId={}¤tVersion={}".format(modem.getDevImei(),currentVersion) print(url) response = request.post(url,timeout=5) @@ -2445,7 +2437,6 @@ class OTA(): if dev_type == "7PIN_BK_EU":#英文小瑞 url = "http://dmp-global.raisound.com/bz-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid) else: - url = "https://qipai-dev.dobell.top/qp-dmp-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid) url = "https://dmp-api.qipai.com/qp-dmp-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid) # url = "http://dmp.raisound.com/bz-api/dev/iccid?deviceId={}&iccid={}".format(modem.getDevImei(),iccid) #北科地址 print("{} H:{}".format(url,headers_T)) @@ -5101,64 +5092,65 @@ class AI_VC(Abstract): else: self.AI_TTS_str = "当前已是最新版本" return 0 - if text.find("语音留言") != -1: - self.voice_flag = 1 - self.AI_TTS_str = "已进入语音留言模式,长按按钮开始录音,松开按钮结束" - self.Close_flag = 1 - self.stop_voice_timer.stop() #关闭语音留言模式定时器 - self.stop_voice_timer.start(30*1000,0,self.exit_voice_message_timer) - print("语音留言!!!!!!!!!!") - return 0 - if text.find("开广播") != -1 or text.find("开蓝牙广播") != -1: - - self.AI_TTS_str = "正在开蓝牙广播" - EventMesh.publish("AI_send_bt_ble_switch_toble",1) - - print("正在开蓝牙广播") - return 0 - if text.find("关广播") != -1 or text.find("关蓝牙广播") != -1: - - self.AI_TTS_str = "正在关蓝牙广播" - EventMesh.publish("AI_send_bt_ble_switch_toble",2) + if dev_type == "7PIN_1_5":#二代才有蓝牙和语音留言功能 + if text.find("语音留言") != -1: + self.voice_flag = 1 + self.AI_TTS_str = "已进入语音留言模式,长按按钮开始录音,松开按钮结束" + self.Close_flag = 1 + self.stop_voice_timer.stop() #关闭语音留言模式定时器 + self.stop_voice_timer.start(30*1000,0,self.exit_voice_message_timer) + print("语音留言!!!!!!!!!!") + return 0 + if text.find("开广播") != -1 or text.find("开蓝牙广播") != -1: + + self.AI_TTS_str = "正在开蓝牙广播" + EventMesh.publish("AI_send_bt_ble_switch_toble",1) - print("正在关蓝牙广播") - return 0 - if text.find("开经典蓝牙") != -1: - - self.AI_TTS_str = "正在开经典蓝牙" - EventMesh.publish("AI_send_bt_ble_switch_toble",3) - print("正在开经典蓝牙") - return 0 - if text.find("关闭经典蓝牙") != -1 or text.find("关经典蓝牙") != -1: - - self.AI_TTS_str = "正在关经典蓝牙" - EventMesh.publish("AI_send_bt_ble_switch_toble",4) - print("正在关经典蓝牙") - return 0 - - if text.find("确认解绑设备") != -1 or text.find("确认设备解绑") != -1: - self.AI_TTS_str = "设备解绑中...." - self.Close_flag = 1 - EventMesh.publish("send_unbind_dev_to_iot") - print("解绑设备!!!!!!!!!!!!!!") - return 0 - if text.find("删除耳机记录") != -1 or text.find("清楚耳机记录") != -1: - - self.AI_TTS_str = "正在删除" - EventMesh.publish("clear_earphone_record") + print("正在开蓝牙广播") + return 0 + if text.find("关广播") != -1 or text.find("关蓝牙广播") != -1: + + self.AI_TTS_str = "正在关蓝牙广播" + EventMesh.publish("AI_send_bt_ble_switch_toble",2) - print("正在删除") - return 0 - if len(text)<16 and (text.find("再见") != -1 or text.find("拜拜") != -1 or text.find("关闭对话") != -1): - #EventMesh.publish("publish_AI_btnInfo",{"func":self.Close}) - if dev_type != "7PIN" and dev_type != "7PIN_coze" and dev_type != "7PIN_1_5":#柒牌 - self.AI_TTS_str = "好嘞,再见,我们下次再聊" + print("正在关蓝牙广播") + return 0 + if text.find("开经典蓝牙") != -1: + + self.AI_TTS_str = "正在开经典蓝牙" + EventMesh.publish("AI_send_bt_ble_switch_toble",3) + print("正在开经典蓝牙") + return 0 + if text.find("关闭经典蓝牙") != -1 or text.find("关经典蓝牙") != -1: + + self.AI_TTS_str = "正在关经典蓝牙" + EventMesh.publish("AI_send_bt_ble_switch_toble",4) + print("正在关经典蓝牙") + return 0 + + if text.find("确认解绑设备") != -1 or text.find("确认设备解绑") != -1: + self.AI_TTS_str = "设备解绑中...." self.Close_flag = 1 + EventMesh.publish("send_unbind_dev_to_iot") + print("解绑设备!!!!!!!!!!!!!!") return 0 - else: - EventMesh.publish("publish_AI_btnInfo",{"func":self.Close}) - #EventMesh.publish("sleep_BT")#休眠蓝牙 - return 1 + if text.find("删除耳机记录") != -1 or text.find("清楚耳机记录") != -1: + + self.AI_TTS_str = "正在删除" + EventMesh.publish("clear_earphone_record") + + print("正在删除") + return 0 + # if len(text)<16 and (text.find("再见") != -1 or text.find("拜拜") != -1 or text.find("关闭对话") != -1): + # #EventMesh.publish("publish_AI_btnInfo",{"func":self.Close}) + # if dev_type != "7PIN" and dev_type != "7PIN_coze" and dev_type != "7PIN_1_5":#柒牌 + # self.AI_TTS_str = "好嘞,再见,我们下次再聊" + # self.Close_flag = 1 + # return 0 + # else: + # EventMesh.publish("publish_AI_btnInfo",{"func":self.Close}) + # #EventMesh.publish("sleep_BT")#休眠蓝牙 + # return 1 if len(text)<12 and (text.find("关机") != -1 ): if dev_type == "7PIN" or dev_type == "7PIN_coze" or dev_type == "7PIN_1_5":#柒牌 EventMesh.publish("publish_AI_btnInfo",{"func":self.Close}) diff --git a/2.sdk/project/7PIN_1_5/sdk/services/microPython/ports/quectel/core/main_init.py b/2.sdk/project/7PIN_1_5/sdk/services/microPython/ports/quectel/core/main_init.py index fe9941c2..a9e5773f 100644 --- a/2.sdk/project/7PIN_1_5/sdk/services/microPython/ports/quectel/core/main_init.py +++ b/2.sdk/project/7PIN_1_5/sdk/services/microPython/ports/quectel/core/main_init.py @@ -211,7 +211,6 @@ def main_init(): app.append_manager(pro.sosInfoCallManager()) pcr = pro.ProtoColResolver() if dev_type == "7PIN_1_5":#二代专属功能 - pcr.add_support(pro.IOTWeb_HRProtoCol()) pcr.add_support(pro.IOTWeb_LocateNowProtoCol()) pcr.add_support(pro.IOTWeb_post_sosProtoCol()) pcr.add_support(pro.IOTWeb_post_device_stateProtoCol()) @@ -250,6 +249,7 @@ def main_init(): pcr.add_support(pro.IOTWeb_come_transProtoCol())#接收小程序控制进入翻译 pcr.add_support(pro.IOTWeb_exit_transProtoCol())#接收小程序控制退出翻译 pcr.add_support(pro.IOTWeb_appcontrol_meetProtoCol())#接收小程序控制进入会议 + pcr.add_support(pro.IOTWeb_HRProtoCol()) pcr.add_support(pro.IOTWeb_volumeProtoCol()) pcr.add_support(pro.IOTWeb_chat_configProtoCol()) pcr.add_support(pro.IOTWeb_get_chat_configProtoCol())