From: d15521469561 Date: Tue, 25 Apr 2023 08:27:31 +0000 (+0800) Subject: Merge branch 'master' of codeup.aliyun.com:64191456b9581d62e8f81ac0/ASR1603_G5 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=1f93df2b72265693af5ccae603fa5631372134b4;p=mirrors%2FASR1603_G5.git Merge branch 'master' of codeup.aliyun.com:64191456b9581d62e8f81ac0/ASR1603_G5 # Conflicts: # 3.code/1.watch/2.code/main_1.py # 3.code/1.watch/2.code/ui.py # 3.code/1.watch/2.code/ui_setting.py --- 1f93df2b72265693af5ccae603fa5631372134b4 diff --cc 3.code/1.watch/2.code/main_1.py index 2f2d22a9,65fbaf9e..af5ae668 --- a/3.code/1.watch/2.code/main_1.py +++ b/3.code/1.watch/2.code/main_1.py @@@ -44,22 -43,21 +43,22 @@@ if __name__ == '__main__' res = uos.statvfs("/ext") res = list(res) print('总ext空间:{} MB,剩余空间:{} MB'.format((((res[0] * res[2]) / 1024 / 1024)),((res[0] * res[3]) / 1024 / 1024))) - mem = gc.mem_free() - print('剩余内存RAM:{} KB'.format(mem / 1024)) - print("init0:{}".format(utime.localtime())) + print("init1:{}".format(utime.localtime())) from ext import EventMesh from ext.common import Abstract + print("init2:{}".format(utime.localtime())) from ext.lcd import tp_cst816 + print("init3:{}".format(utime.localtime())) from ext.btn_device_ec800m import BtnDevice - from ext.protocol import LK_ProtoCol,PING_ProtoCol,HEART_ProtoCol,OXYGEN_ProtoCol,OXYGEN_One_ProtoCol,HRSTART_ProtoCol,WT_ProtoCol,UD_ProtoCol,REMIND_ProtoCol, CR_ProtoCol,KA_ProtoCol,FIND_ProtoCol,POWEROFF_ProtoCol,ProtoColResolver,PHL_ProtoCol - print("init4:{}".format(utime.localtime())) + from ext.protocol import LK_ProtoCol,PING_ProtoCol,HEART_ProtoCol,OXYGEN_ProtoCol,OXYGEN_One_ProtoCol,HRSTART_ProtoCol,temp_ProtoCol,\ + WT_ProtoCol,UD_ProtoCol,REMIND_ProtoCol, CR_ProtoCol,KA_ProtoCol,FIND_ProtoCol,POWEROFF_ProtoCol,ProtoColResolver,PHL_ProtoCol import ext.mgr as mgr - print("init5:{}".format(utime.localtime())) + print("init1:{}".format(utime.localtime())) import ext.ui as _ui - print("init6:{}".format(utime.localtime())) - from ext.mgr import ConfigStoreManager, LocationManager, SockManager, \ + print("init2:{}".format(utime.localtime())) + from ext.mgr import ConfigStoreManager, LocationManager, SockManager,getVolumSizeManager, \ NetManager,AddrBookManager,MsgdetailManager,PhoneCallingManager,getOldHrDataManager,getStorageDataManager,getBrightnessManager,getHrTimeManager + print("init3:{}".format(utime.localtime())) from ext.appAlipay import Alipay ,AlipayOpenScreen,Alipay_1_1,Alipay_invite,Alipay_inviting,\ Alipay_success,Alipay_paycode,Alipay_pay_success,Alipay_collect,Alipay_parent # from ext.ui_WatchFaceScreen import WatchFaceScreen @@@ -136,12 -135,9 +138,12 @@@ ui.add_screen(FactoryModeLocationScreen()) ui.add_screen(FactoryModeScreen()) ui.add_screen(PopupAlarmScreen()) + ui.add_screen(_ui.LowPowerScreen()) + ui.add_screen(_ui.NewMessageScreen()) + ui.add_screen(NewWechatPopupScreen()) # ui.add_screen(_ui.Setting3Screen()) + print("init9:{}".format(utime.localtime())) - print("init7:{}".format(utime.localtime())) app = watchApp() app.set_ui(ui) app.append_manager(mgr.AlarmVolumeLevelManager()) \ diff --cc 3.code/1.watch/2.code/ui.py index 56007376,c3b02c07..05050bd0 --- a/3.code/1.watch/2.code/ui.py +++ b/3.code/1.watch/2.code/ui.py @@@ -1346,13 -1331,13 +1331,13 @@@ msg_list_t.set_size(240, 270 msg_list_t.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF) msg_list_t.add_style(style_screen, lv.PART.MAIN | lv.STATE.DEFAULT) - msg_list_t_done_img = lv.img(msg_list_t) - msg_list_t_done_img.set_pos(53, 20) - msg_list_t_done_img.set_size(134, 117) - msg_list_t_done_img.set_src("E:/static/IMAGE_NOTICE_NONE.png") + heartrate_done_img = lv.img(msg_list_t) + heartrate_done_img.set_pos(53, 0) + heartrate_done_img.set_size(134, 117) + heartrate_done_img.set_src("E:/static/IMAGE_NOTICE_NONE.jpg") no_msg_text = lv.label(msg_list_t) -no_msg_text.set_pos(0, 130) +no_msg_text.set_pos(0, 200) no_msg_text.set_size(240, 40) no_msg_text.set_text("暂无信息") no_msg_text.set_long_mode(lv.label.LONG.WRAP) @@@ -1801,13 -1639,9 +1786,10 @@@ class ToolboxScreen(Screen) toolbox_step_img.add_event_cb(lambda e: self.load_screen(e, {"screen": "step"}), lv.EVENT.CLICKED, None) toolbox_weather_img.add_event_cb(lambda e: self.load_screen(e, {"screen": "weather"}), lv.EVENT.CLICKED, None) toolbox_alarm_img.add_event_cb(lambda e: self.load_screen(e, {"screen": "clk_list"}), lv.EVENT.CLICKED, None) + toolbox_sms_img.add_event_cb(lambda e: self.load_screen(e, {"screen": "popup"}), lv.EVENT.CLICKED, None) toolbox_countdown_img.add_event_cb(lambda e: self.load_screen(e, {"screen": "countdown"}), lv.EVENT.CLICKED, None) toolbox_stopwatch_img.add_event_cb(lambda e: self.load_screen(e, {"screen": "stopwatch"}), lv.EVENT.CLICKED, None) - - # def post_processor_after_initialization(self): - # mem = gc.mem_free() - # print('剩余内存RAM:{} KB'.format(mem / 1024)) + def done_return(self): EventMesh.publish("load_screen", {"screen": "main_menu"}) diff --cc 3.code/1.watch/2.code/ui_setting.py index b4bebf35,69ed4036..9514adb4 --- a/3.code/1.watch/2.code/ui_setting.py +++ b/3.code/1.watch/2.code/ui_setting.py @@@ -992,13 -1272,10 +1272,10 @@@ class BrightnessScreen(Screen) def show_bar(self): if self.level == None: - self.level = 5 + self.level = 6 - self.brightness_bar.set_value((100 // 10) * self.level, lv.ANIM.OFF) + brightness_bar.set_value((100 // 10) * self.level, lv.ANIM.OFF) - def Close(self): - self.meta.delete() - self.meta = None - + def done_return(self): EventMesh.publish("load_screen", {"screen": "setting"}) @@@ -1381,60 -1498,8 +1498,8 @@@ class totalvolumeScreen(Screen) self.aud.set_pa(Pin.GPIO29) def initialization(self): - #-----------------------------------------Total--volum------------------------------- - if self.meta == None: - self.meta = lv.obj() - self.volume_adjust_volume = lv.obj(self.meta) - self.volume_adjust_volume.center() - self.volume_adjust_volume.set_size(240, 320) - self.volume_adjust_volume.add_style(style_screen, lv.PART.MAIN | lv.STATE.DEFAULT) - - self.totalvolume_title = lv.label(self.volume_adjust_volume) - self.totalvolume_title.set_pos(0, 10) - self.totalvolume_title.set_size(240, 40) - self.totalvolume_title.set_text("铃声调节") - self.totalvolume_title.set_long_mode(lv.label.LONG.WRAP) - self.totalvolume_title.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0) - self.totalvolume_title.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT) - - self.totalvolume_label1 = lv.label(self.volume_adjust_volume) - self.totalvolume_label1.set_pos(10, 70) - self.totalvolume_label1.set_size(230, 40) - self.totalvolume_label1.set_text("铃声:") - self.totalvolume_label1.set_long_mode(lv.label.LONG.WRAP) - self.totalvolume_label1.set_style_text_align(lv.TEXT_ALIGN.LEFT, 0) - self.totalvolume_label1.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT) - - self.totalvolume_bar = lv.bar(self.volume_adjust_volume) - self.totalvolume_bar.set_pos(20, 120) - self.totalvolume_bar.set_size(200, 15) - self.totalvolume_bar.set_style_anim_time(1000, lv.PART.INDICATOR | lv.STATE.DEFAULT) - self.totalvolume_bar.set_mode(lv.bar.MODE.NORMAL) - self.totalvolume_bar.set_value(50, lv.ANIM.OFF) - self.totalvolume_bar.add_style(style_bar, lv.PART.MAIN | lv.STATE.DEFAULT) - self.totalvolume_bar.add_style(style_bar_indic, lv.PART.INDICATOR | lv.STATE.DEFAULT) - - self.totalvolume_reduce_imgbtn = lv.img(self.volume_adjust_volume) - self.totalvolume_reduce_imgbtn.set_pos(5, 150) - self.totalvolume_reduce_imgbtn.set_size(110, 46) - self.totalvolume_reduce_imgbtn.add_flag(lv.obj.FLAG.CLICKABLE) - self.totalvolume_reduce_imgbtn.set_src("E:/static/reduce_btn.png") - self.totalvolume_reduce_imgbtn.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - - - self.totalvolume_add_imgbtn = lv.img(self.volume_adjust_volume) - self.totalvolume_add_imgbtn.set_pos(125, 150) - self.totalvolume_add_imgbtn.set_size(110, 46) - self.totalvolume_add_imgbtn.add_flag(lv.obj.FLAG.CLICKABLE) - self.totalvolume_add_imgbtn.set_src("E:/static/add_btn.png") - self.totalvolume_add_imgbtn.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - self.totalvolume_add_imgbtn.add_event_cb(lambda e: self.add_volum_size(e), - lv.EVENT.CLICKED, None) - self.totalvolume_reduce_imgbtn.add_event_cb(lambda e: self.reduce_volum_size(e), - lv.EVENT.CLICKED, None) - self.read_data = EventMesh.publish("get_storage_data") - print("self.read_data:{}".format(self.read_data)) + # print("self.read_data:{}".format(self.read_data)) num = EventMesh.publish("get_volum_size") if num == None: self.volum_size = 8