From: dxy15521469561 <1731678236@qq.com> Date: Thu, 17 Aug 2023 01:23:08 +0000 (+0800) Subject: 微聊 短信详情界面优化 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=fa873852fde06c00918b104f6ae1648636d760b6;p=mirrors%2FASR1603_G5.git 微聊 短信详情界面优化 --- diff --git a/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/appWechat.py b/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/appWechat.py index 6996a007..c744cbe2 100644 --- a/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/appWechat.py +++ b/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/appWechat.py @@ -387,31 +387,34 @@ class WechatScreen(Screen): Wechat_log("talking_cb2") #按下录音 def talking(self,e): - Wechat_log("talking1") - self.play_timer.stop() - self.aud.stop() - self.wechat_list.add_flag(lv.obj.FLAG.HIDDEN)#隐藏列表选项方框 - self.countdown = 1 - wechat_label.clear_flag(lv.obj.FLAG.HIDDEN) - wechat_label.set_text("松开发送") - wechat_press_label_countdown.clear_flag(lv.obj.FLAG.HIDDEN) - wechat_press_label_countdown.set_text("{}S".format(str(self.countdown))) - + if EventMesh.publish(constants.EVENT.GET_CONNECT) == 1:#有卡时触发sos报警 无卡时自动关机 + Wechat_log("talking1") + self.play_timer.stop() + self.aud.stop() + self.wechat_list.add_flag(lv.obj.FLAG.HIDDEN)#隐藏列表选项方框 + self.countdown = 1 + wechat_label.clear_flag(lv.obj.FLAG.HIDDEN) + wechat_label.set_text("松开发送") + wechat_press_label_countdown.clear_flag(lv.obj.FLAG.HIDDEN) + wechat_press_label_countdown.set_text("{}S".format(str(self.countdown))) + - #self.updata_list_show(2)#不需要显示语音列表 - #按下说话 - if self.wechat_num >= self.MXA_MSG: - self.wechat_num = 0 - self.wechat_num += 1 - self.wechat_show = self.wechat_num - self.wechat_recode_list["num"] = self.wechat_num - Wechat_log("talking1.0") - self.record_test.start("/ext/static/storage_file/{}.amr".format(self.wechat_num),16) - self.second_timer.start(1000, 1, self.reduce_second) - self.press_state = 1 - self.ble_send = 1 - #松开发送 - Wechat_log("talking2") + #self.updata_list_show(2)#不需要显示语音列表 + #按下说话 + if self.wechat_num >= self.MXA_MSG: + self.wechat_num = 0 + self.wechat_num += 1 + self.wechat_show = self.wechat_num + self.wechat_recode_list["num"] = self.wechat_num + Wechat_log("talking1.0") + self.record_test.start("/ext/static/storage_file/{}.amr".format(self.wechat_num),16) + self.second_timer.start(1000, 1, self.reduce_second) + self.press_state = 1 + self.ble_send = 1 + #松开发送 + Wechat_log("talking2") + else: + EventMesh.publish("load_screen", {"screen": "no_sim_popup_screen"}) def sending_cb(self,e): @@ -422,7 +425,10 @@ class WechatScreen(Screen): #self.sending(e) Wechat_log("sending_cb2") else: + self.press_state = 0 EventMesh.publish("load_screen", {"screen": "no_sim_popup_screen"}) + else: + pass #松手0.2秒后显示 def hide_label(self,*args): diff --git a/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/mgr.py b/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/mgr.py index c705f643..2c4fe0a4 100644 --- a/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/mgr.py +++ b/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/mgr.py @@ -946,7 +946,7 @@ class DeviceInfoManager(Abstract): get_temp_state = EventMesh.publish("get_temp_state") hr_time = {} hr_time = EventMesh.publish("get_time_hr_spo2")#获取时间是否大于0 - if EventMesh.publish(constants.EVENT.GET_CONNECT) == 1 and battery[0] != "0": + if EventMesh.publish(constants.EVENT.GET_CONNECT) == 1 and battery[0] != "1": # print("get_temp_time:{} self.temp_one_state:{}".format(get_temp_time,self.temp_one_state)) if get_temp_time != None:#定时测量体温 if get_temp_time > 0: @@ -1351,7 +1351,6 @@ class DeviceInfoManager(Abstract): self.HR_Onestate = 0 self.HR_OneTime = 0 self.old_time = 0 - else: self.old_temp_time = 0 self.old_time = 0 diff --git a/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/ui.py b/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/ui.py index 3fcedde5..27332512 100644 --- a/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/ui.py +++ b/2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/ui.py @@ -1517,9 +1517,7 @@ class DialingNoPlayPopupScreen(Screen):#正在拨号中...未打出 EventMesh.publish("set_UI_high_priority", 0) sos_flag = EventMesh.publish("get_sos_flag") if sos_flag == 1: - EventMesh.publish("set_sos_flag",0) - EventMesh.publish("set_sos_num",0) - EventMesh.publish("set_hangup_mode",0) + EventMesh.publish("set_sos_info_call") EventMesh.publish("load_screen", {"screen": "dial_no_connect_popup"}) @@ -1592,6 +1590,7 @@ class DialNoconnectPopupScreen(Screen):#你所拨打的电话暂时无法接通 EventMesh.publish("return_prev_screen") def Close(self): + EventMesh.publish("set_sos_info_call") self.timer.stop() def done_left_to_right(self): @@ -2308,6 +2307,8 @@ class MsgDetailScreen(Screen): msg_detail_cont.add_style(style_font_28_black_bg_gray, lv.PART.MAIN | lv.STATE.DEFAULT) self.meta = msg_detail_screen #获取字符串 + msg_detail_cont_obj.scroll_to(0, 0, lv.ANIM.OFF) + self.name = EventMesh.publish("get_msg_name") self.content = EventMesh.publish("get_msg_content") msg_detail_title.set_text(self.name)