"""
EventMesh.publish(constants.PROTOCOL.POWEROFF_SEND)
#print("POWEROFF_ProtoCol:recv:%s"%(msg))
- Power.powerDown()
+ EventMesh.publish("load_screen", {"screen": "poweroff_comfirm"})
class PHL_ProtoCol(ProtoCol):
"""电话本同步"""
#EventMesh.publish("load_screen", {"screen": "main_menu"})
def btn8_press(self):
- pass
- #EventMesh.publish("load_screen", {"screen": "main_menu"})
+ flag = EventMesh.publish("get_lcd_state")
+ if flag == 1:
+ EventMesh.publish(constants.EVENT.SYSTEM_SLEEP)
+ else:
+ EventMesh.publish(constants.EVENT.SYSTEM_UP)
message_popup_screen = None
incoming_call_name_label = lv.label(incoming_call_screen)
incoming_call_name_label.set_pos(0, 140)
+ incoming_call_name_label.set_text(" ")
incoming_call_name_label.set_size(240, 50)
incoming_call_name_label.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0)
incoming_call_name_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
pass
def btn8_press(self):
- # self.aud.stop()
- # self.call_timer.stop()
+ flag = EventMesh.publish("get_lcd_state")
+ if flag == 1:
+ EventMesh.publish(constants.EVENT.SYSTEM_SLEEP)
+ else:
+ EventMesh.publish(constants.EVENT.SYSTEM_UP)
pass
def done_left_to_right(self):
#EventMesh.publish("load_screen", {"screen": "main_menu"})
def btn8_press(self):
- pass
+ flag = EventMesh.publish("get_lcd_state")
+ if flag == 1:
+ EventMesh.publish(constants.EVENT.SYSTEM_SLEEP)
+ else:
+ EventMesh.publish(constants.EVENT.SYSTEM_UP)
#EventMesh.publish("load_screen", {"screen": "main_menu"})
# -------------------------------------------step screen----------------------------------------------------------#
watchface1_time1_text.set_pos(20, 50)
watchface1_time1_text.set_size(190, 71)
watchface1_time1_text.set_align(lv.TEXT_ALIGN.LEFT)
-watchface1_time1_text.set_text("%02d:%02d"%(hour,min))
+watchface1_time1_text.set_text("{}:{}".format("%02d"%(hour),"%02d"%(min)))
+# watchface1_time1_text.set_text("%02d:%02d"%(hour,min))
watchface1_time1_text.add_style(style_font_youyuan_70_black, lv.PART.MAIN|lv.STATE.DEFAULT)
#日期
watchface2_time1_hour_text.set_pos(20, 80)
watchface2_time1_hour_text.set_size(88, 70)
watchface2_time1_hour_text.set_align(lv.TEXT_ALIGN.LEFT)
-watchface2_time1_hour_text.set_text("{}".format(hour))
+watchface2_time1_hour_text.set_text("{}".format("%02d"%(hour)))
watchface2_time1_hour_text.add_style(style_font_youyuan_70_red, lv.PART.MAIN|lv.STATE.DEFAULT)
watchface2_time1_mao_text = lv.label(Watchface2)
watchface2_time1_hour1_text.set_pos(152, 80)
watchface2_time1_hour1_text.set_size(88, 70)
watchface2_time1_hour1_text.set_align(lv.TEXT_ALIGN.LEFT)
-watchface2_time1_hour1_text.set_text("{}".format(min))
+watchface2_time1_hour1_text.set_text("{}".format("%02d"%(min)))
watchface2_time1_hour1_text.add_style(style_font_youyuan_70_red, lv.PART.MAIN|lv.STATE.DEFAULT)