if self.bat_time > 5*60:
self.bat_time = 0
- if battery[1] == 20:
+ if battery[1] <= 20 and battery[1] > 0:
EventMesh.publish("load_screen", {"screen": "LOW_POWER"})
else:
self.bat_time = 0
self.temp_state = 0
self.temp_one_state = 0
temp = EventMesh.publish(constants.EVENT.GET_TEMP)
+ temp += 0.5
if temp < 25 or temp > 42:
temp = 0
tmp_f = str(temp).split('.')[0]
elif self.temp_one_state > 6:
self.temp_one_state = 0
temp = EventMesh.publish(constants.EVENT.GET_TEMP)
+ temp += 0.5
if temp < 25 or temp > 42:
temp = 0
tmp_f = str(temp).split('.')[0]
elif self.temp_one_state > 6:
self.temp_one_state = 0
temp = EventMesh.publish(constants.EVENT.GET_TEMP)
+ temp += 0.5
if temp < 25 or temp > 42:
temp = 0
tmp_f = str(temp).split('.')[0]
if get_temp_state == 2 or get_temp_state == 3:
self.temp_one_state = 0
self.temp_state = 0
- temp = EventMesh.publish(constants.EVENT.GET_TEMP)
+ temp = EventMesh.publish(constants.EVENT.GET_TEMP)
+ temp += 0.5
if temp < 25 or temp > 42:
temp = 0
if self.time_count >= 5:#5s内没有打通则不在继续拨打关闭
self.time_count = 0
EventMesh.publish("set_UI_high_priority", 0)
- sos_flag = EventMesh.publish("get_sos_flag")
- if sos_flag == 1:
- EventMesh.publish("set_sos_info_call")
+ EventMesh.publish("set_sos_info_call")
EventMesh.publish("load_screen", {"screen": "dial_no_connect_popup"})
def timeout_hangup(self,e):
EventMesh.publish("system_sleep_rest")#防止黑屏
self.time_count+=1
- if self.time_count >= 10:
+ if self.time_count >= 5:
self.time_count = 0
EventMesh.publish("return_prev_screen")
on_call_label_name.set_text(name)
# on_call_label.set_text(str(self.meta_info))
on_call_second_label.set_text("00:00")
- on_call_volum_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
+ on_call_volum_label.set_style_text_color(lv.color_make(128, 128, 128), lv.STATE.DEFAULT)
self.phone_num = ''
self.phone_list = []
self.button = 0
self.mute_btn = 0
+ voiceCall.mute(2,1,0)
def show_num(self):
global on_call_screen_tab_label
global on_call_screen_tab,on_call_screen,on_call_obj
if self.mute_btn == 0:#默认是开启
self.mute_btn = 1
- on_call_volum_label.set_style_text_color(lv.color_make(128, 128, 128), lv.STATE.DEFAULT)
- else:
+ voiceCall.mute(2,0,0)
on_call_volum_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
+ else:
+
+ on_call_volum_label.set_style_text_color(lv.color_make(128, 128, 128), lv.STATE.DEFAULT)
self.mute_btn = 0
+ voiceCall.mute(2,1,0)
# self.aud.setVolume(0)
# if self.open_volum_state == 1:
# self.open_volum_state = 0