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):
#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):
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:
self.HR_Onestate = 0
self.HR_OneTime = 0
self.old_time = 0
-
else:
self.old_temp_time = 0
self.old_time = 0
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"})
EventMesh.publish("return_prev_screen")
def Close(self):
+ EventMesh.publish("set_sos_info_call")
self.timer.stop()
def done_left_to_right(self):
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)