self.meta = wechat_popup_screen
def done_left_to_right(self):
- EventMesh.publish("wechat_updata_list_show")
+ # EventMesh.publish("wechat_updata_list_show")
EventMesh.publish("load_screen", {"screen": "wechat"})
def done_right_to_left(self):
- EventMesh.publish("wechat_updata_list_show")
+ # EventMesh.publish("wechat_updata_list_show")
EventMesh.publish("load_screen", {"screen": "wechat"})
def done_bottom_to_top(self):
- EventMesh.publish("wechat_updata_list_show")
+ # EventMesh.publish("wechat_updata_list_show")
EventMesh.publish("load_screen", {"screen": "wechat"})
def done_top_to_bottom(self):
- EventMesh.publish("wechat_updata_list_show")
+ # EventMesh.publish("wechat_updata_list_show")
EventMesh.publish("load_screen", {"screen": "wechat"})
def done_return(self):
EventMesh.publish("load_screen", {"screen": "main_menu"})
def done_click(self):
- EventMesh.publish("wechat_updata_list_show")
+ # EventMesh.publish("wechat_updata_list_show")
EventMesh.publish("load_screen", {"screen": "wechat"})
def btn1_release(self):
get_send_state=EventMesh.publish("get_send_state")
if get_send_state != 1:
EventMesh.publish("load_screen", {"screen": "wechat_popup"})
- EventMesh.publish("wechat_updata_list_show")
+ else:
+ EventMesh.publish("wechat_updata_list_show")
# path = "/ext/static/storage_file/audio_amr/amr/{}.amr".format(wechat_num)
path = "/ext/static/storage_file/{}.amr".format(wechat_num)
with open(path,"w") as fd:
get_send_state=EventMesh.publish("get_send_state")
if get_send_state != 1:
EventMesh.publish("load_screen", {"screen": "wechat_popup"})
- EventMesh.publish("wechat_updata_list_show")
+ else:
+ EventMesh.publish("wechat_updata_list_show")
self.bat_time = 0
self.sms_full_flag = 0
self.clear_step = 0
-
+ self.test = 0
self.old_time = 0
self.UD_time = 0
self.upload_time = 0
self.UD_timeout = 7*60
+ self.aud = audio.Audio(0)
print("DeviceInfoManager:1")
self.gsensor = SC7A20()
print("DeviceInfoManager:1.0")
print("post_processor_after_instantiation:2")
self.timer_push_schedule.start(10000, 1, self.publish_event)
- # self.timer_push_schedule.start(1000, 1, self.publish_test)
+ # self.timer_push_schedule.start(2000, 1, self.publish_test)
# self.battery_push_schedule.start(3000, 1, self.__check_battery)
self.log.debug("post_processor_after_instantiation finished")
#EventMesh.publish(constants.EVENT.START_HEART)
self.publish_event()
print("post_processor_after_instantiation:3")
def publish_test(self, *args, **kwargs):
- pass
+ if self.test == 0:
+ self.test = 1
+ self.aud.play(1, 1, 'E:/static/audio_audio_haixiu.mp3') #播放声音
+ elif self.test == 1:
+ self.aud.stop()
+ self.test = 0
# self.read_data = {}
# check = ql_fs.path_exists("/ext/static/storage_file/config.json")
# if check == True:
if msg_nums >= 50:
EventMesh.publish("load_screen", {"screen": "message_full"})
-
+
if EventMesh.publish(constants.EVENT.GET_CONNECT) == 1 or battery[1] != 1:
if hr_time != None:
# print("hr......01....{}\r\n".format(hr_time))
if data[-1] != 0x5d and len(data)<20*1024: #']':
continue
self.connect_tmp = 1 #有数据,就认为是连接状态
- print("TCP:recv: data:{}".format(data))
+ # print("TCP:recv: data:{}".format(data))
EventMesh.publish(constants.EVENT.SET_CONNECT, 1)
data_str = data.decode('ascii')
data_str = data_str.split(']')
def initialization(self):
global FIND_screen ,watchface_mpsignal_img
+
if FIND_screen ==None:
FIND_screen = lv.obj()
FIND_screen.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
def post_processor_after_initialization(self):
utime.sleep_ms(200)#不加延时会切屏
+ self.FIND_timer_count = 0
+ print("self.FIND_timer_count:{}".format(self.FIND_timer_count))
self.FIND_timer.start(3000, 1, self.FIND_timer_cb)
self.aud.play(1, 1, 'E:/static/audio_audio_haixiu.mp3') #播放声音
pass
def FIND_timer_cb(self, *args):
+ EventMesh.publish("system_sleep_rest")
self.aud.play(1, 1, 'E:/static/audio_audio_haixiu.mp3')
self.FIND_timer_count += 1
- if self.FIND_timer_count > 40: #120秒
+ if self.FIND_timer_count > 20: #120秒
self.stop_FIND()
def stop_FIND(self) :
self.FIND_timer.stop()
self.aud.stopAll()
+ self.aud.stop(1, 1, 'E:/static/audio_audio_haixiu.mp3') #播放声音
+ EventMesh.publish("load_screen", {"screen": "main_menu"})
+
def Close(self):
- self.stop_FIND()
+ print("self.FIND_timer_Close")
+ self.FIND_timer.stop()
+ self.aud.stop(1, 1, 'E:/static/audio_audio_haixiu.mp3') #播放声音
def done_left_to_right(self):
-
EventMesh.publish("load_screen", {"screen": "main_menu"})
+
def done_right_to_left(self):
EventMesh.publish("load_screen", {"screen": "main_menu"})
def done_bottom_to_top(self):
utime.sleep_ms(100)
EventMesh.publish("set_lcd_state",self.sleep_flag)
self.level = EventMesh.publish("get_brightness_level")
-
- self.read_data = EventMesh.publish("get_storage_data")
- # print("self.read_data:{} self.level:{}".format(self.read_data,self.level))
if self.level == None:
self.level = 6
elif self.level > 10: