From f02e2edf2340366eb693e4ac5314e83edcbd6868 Mon Sep 17 00:00:00 2001 From: d15521469561 Date: Fri, 28 Apr 2023 16:33:17 +0800 Subject: [PATCH] =?utf8?q?=E6=9B=B4=E6=8D=A2=E6=8B=A8=E5=8F=B7=E7=9B=98?= =?utf8?q?=E5=9B=BE=E7=89=87=20=E8=A1=A8=E7=9B=98=E5=AD=97=E4=BD=93?= =?utf8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../microPython/ports/quectel/core/Makefile | 1 - .../ports/quectel/core/appAlipay.py | 6 +- .../ports/quectel/core/appWechat.py | 73 +++--- .../microPython/ports/quectel/core/mgr.py | 215 ++++++++++++---- .../microPython/ports/quectel/core/ui.py | 165 +++++++------ .../ports/quectel/core/ui_WatchFaceScreen.py | 233 +++++++----------- .../ports/quectel/core/ui_setting.py | 21 +- 3.code/1.watch/2.code/appAlipay.py | 6 +- 3.code/1.watch/2.code/appWechat.py | 73 +++--- 3.code/1.watch/2.code/main.py | 11 +- 3.code/1.watch/2.code/main_1.py | 8 +- 3.code/1.watch/2.code/mgr.py | 59 ++++- 3.code/1.watch/2.code/protocol.py | 42 +++- .../2.code/static/IMAGE_BUTTON_DELKEY.png | Bin 1240 -> 629 bytes .../2.code/static/IMAGE_BUTTON_DIAL.png | Bin 1334 -> 730 bytes .../static/IMAGE_BUTTON_DIAL_CONTACT.png | Bin 1085 -> 615 bytes .../2.code/static/IMAGE_NUMBER_KEY0_ICON.png | Bin 1007 -> 569 bytes .../2.code/static/IMAGE_NUMBER_KEY1_ICON.png | Bin 621 -> 312 bytes .../2.code/static/IMAGE_NUMBER_KEY2_ICON.png | Bin 1081 -> 638 bytes .../2.code/static/IMAGE_NUMBER_KEY3_ICON.png | Bin 1215 -> 722 bytes .../2.code/static/IMAGE_NUMBER_KEY4_ICON.png | Bin 971 -> 523 bytes .../2.code/static/IMAGE_NUMBER_KEY5_ICON.png | Bin 1013 -> 629 bytes .../2.code/static/IMAGE_NUMBER_KEY6_ICON.png | Bin 1147 -> 685 bytes .../2.code/static/IMAGE_NUMBER_KEY7_ICON.png | Bin 997 -> 508 bytes .../2.code/static/IMAGE_NUMBER_KEY8_ICON.png | Bin 1357 -> 800 bytes .../2.code/static/IMAGE_NUMBER_KEY9_ICON.png | Bin 1127 -> 656 bytes .../static/IMAGE_NUMBER_KEYHASH_ICON.png | Bin 1193 -> 672 bytes .../static/IMAGE_NUMBER_KEYSTAR_ICON.png | Bin 1165 -> 625 bytes 3.code/1.watch/2.code/ui.py | 165 +++++++------ 3.code/1.watch/2.code/ui_WatchFaceScreen.py | 233 +++++++----------- 3.code/1.watch/2.code/ui_setting.py | 21 +- 31 files changed, 724 insertions(+), 608 deletions(-) diff --git a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/Makefile b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/Makefile index 7de462ce..b4f64548 100644 --- a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/Makefile +++ b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/Makefile @@ -896,7 +896,6 @@ frozen_mpy_list = $(BUILD)/_boot.mpy \ $(BUILD)/mgr.mpy \ $(BUILD)/ui.mpy \ $(BUILD)/ui_setting.mpy \ - $(BUILD)/alarm.mpy \ $(BUILD)/appAlipay.mpy \ $(BUILD)/appWechat.mpy \ $(BUILD)/ui_WatchFaceScreen.mpy \ diff --git a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/appAlipay.py b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/appAlipay.py index 065637e3..2375db3c 100644 --- a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/appAlipay.py +++ b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/appAlipay.py @@ -85,7 +85,8 @@ class Alipay(Abstract): print("post_processor_after_instantiation") - + EventMesh.subscribe("alipay_unbind", self.alipay_unbind) + EventMesh.subscribe("alipay_1", self.alipay_1) EventMesh.subscribe("get_payment_code", self.get_payment_code) EventMesh.subscribe("get_collect_code", self.get_collect_code) @@ -264,6 +265,9 @@ class Alipay(Abstract): def get_binding_code(self, event, msg): return self.result + + def alipay_unbind(self, event, msg): + self.alipay.unbind() def get_payment_code(self, event, msg): if self.is_init == 0 : diff --git a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/appWechat.py b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/appWechat.py index f3c6f7b0..6dd3defa 100644 --- a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/appWechat.py +++ b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/appWechat.py @@ -54,21 +54,21 @@ wechat_press_label.set_text("请按住说话") wechat_press_label.align(lv.ALIGN.CENTER, 10, 0) wechat_press_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT) -wechat_label = lv.label(wechat_screen) -wechat_label.center() -wechat_label.set_size(240, 40) -wechat_label.set_long_mode(lv.label.LONG.WRAP) -wechat_label.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0) -wechat_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT) +# wechat_label = lv.label(wechat_screen) +# wechat_label.center() +# wechat_label.set_size(240, 40) +# wechat_label.set_long_mode(lv.label.LONG.WRAP) +# wechat_label.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0) +# wechat_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT) -wechat_press_label_countdown = lv.label(wechat_screen) -wechat_press_label_countdown.set_pos(100, 100) -wechat_press_label_countdown.set_size(40, 40) -wechat_press_label_countdown.set_text(" ") -wechat_press_label_countdown.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT) -wechat_press_label_countdown.set_long_mode(lv.label.LONG.WRAP) -wechat_press_label_countdown.set_style_text_align(lv.TEXT_ALIGN.RIGHT, 0) +# wechat_press_label_countdown = lv.label(wechat_screen) +# wechat_press_label_countdown.set_pos(100, 100) +# wechat_press_label_countdown.set_size(40, 40) +# wechat_press_label_countdown.set_text(" ") +# wechat_press_label_countdown.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT) +# wechat_press_label_countdown.set_long_mode(lv.label.LONG.WRAP) +# wechat_press_label_countdown.set_style_text_align(lv.TEXT_ALIGN.RIGHT, 0) @@ -115,20 +115,20 @@ class WechatScreen(Screen): self.volum_size = 8 self.aud.setVolume(self.volum_size) self.meta = wechat_screen - wechat_press_btn.add_event_cb(lambda e: self.talking(e), - lv.EVENT.LONG_PRESSED, None) - wechat_press_btn.add_event_cb(lambda e: self.sending(e), - lv.EVENT.RELEASED, None) + # wechat_press_btn.add_event_cb(lambda e: self.talking(e), + # lv.EVENT.LONG_PRESSED, None) + # wechat_press_btn.add_event_cb(lambda e: self.sending(e), + # lv.EVENT.RELEASED, None) self.timer = osTimer() self.second_timer = osTimer() self.play_timer = osTimer() - wechat_label.set_text(" ") + self.startY = 0 self.startWidth = 0 self.check_json = 0 - self.wechat_list =lv.obj(wechat_screen) + self.wechat_list = wechat_screen EventMesh.subscribe("wechat_updata_list_show", self.wechat_updata_list_show) EventMesh.subscribe("get_wechat_data", self.get_wechat_data) EventMesh.subscribe("set_wechat_data", self.set_wechat_data) @@ -163,8 +163,8 @@ class WechatScreen(Screen): def wechat_updata_list_show(self, event, msg): if (self.wechat_list.has_flag(lv.obj.FLAG.HIDDEN)) == False: - wechat_label.clear_flag(lv.obj.FLAG.HIDDEN) - wechat_label.set_text("接收中") + # wechat_label.clear_flag(lv.obj.FLAG.HIDDEN) + # wechat_label.set_text("接收中") self.updata_list_show(2) self.timer.start(1 * 1000, 0, self.reciving) @@ -176,7 +176,7 @@ class WechatScreen(Screen): if self.wechat_num != 0: if index == 0: self.wechat_list.clear_flag(lv.obj.FLAG.HIDDEN) - wechat_label.add_flag(lv.obj.FLAG.HIDDEN) + # wechat_label.add_flag(lv.obj.FLAG.HIDDEN) elif index == 2 or index == 1: #读取json文件中的键作为label文本; #print("self.wechat_list.self.wechat_num:{}".format(self.wechat_num)) @@ -290,9 +290,10 @@ class WechatScreen(Screen): bottom_btn1.scroll_to_view(lv.ANIM.OFF) def initialization(self): - wechat_label.add_flag(lv.obj.FLAG.HIDDEN) - wechat_press_label_countdown.add_flag(lv.obj.FLAG.HIDDEN) - self.wechat_list.clear_flag(lv.obj.FLAG.HIDDEN) + # wechat_label.set_text(" ") + # wechat_label.add_flag(lv.obj.FLAG.HIDDEN) + # wechat_press_label_countdown.add_flag(lv.obj.FLAG.HIDDEN) + # self.wechat_list.clear_flag(lv.obj.FLAG.HIDDEN) #读取json文件中的字典放到self.phonebook中 #创建btn self.updata_list_show(1) @@ -305,10 +306,10 @@ class WechatScreen(Screen): 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))) + # 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)#不需要显示语音列表 @@ -328,10 +329,10 @@ class WechatScreen(Screen): #松开发送 def sending(self,e): if self.press_state == 1: - wechat_label.clear_flag(lv.obj.FLAG.HIDDEN) - wechat_label.set_text("发送中") - wechat_press_label_countdown.add_flag(lv.obj.FLAG.HIDDEN) - wechat_press_label_countdown.set_text(" ") + # wechat_label.clear_flag(lv.obj.FLAG.HIDDEN) + # wechat_label.set_text("发送中") + # wechat_press_label_countdown.add_flag(lv.obj.FLAG.HIDDEN) + # wechat_press_label_countdown.set_text(" ") if self.countdown >= 15: self.countdown = 15 @@ -433,8 +434,8 @@ class WechatScreen(Screen): #松手2秒后发送数据 def hide_label(self,*args): if self.ble_send != 1: - wechat_label.add_flag(lv.obj.FLAG.HIDDEN) - wechat_label.set_text(" ") + # wechat_label.add_flag(lv.obj.FLAG.HIDDEN) + # wechat_label.set_text(" ") self.updata_list_show(0) #获取是否在录音 @@ -459,7 +460,7 @@ class WechatScreen(Screen): if self.countdown >= 15: self.countdown = 15 - wechat_press_label_countdown.set_text("{}S".format(str(self.countdown))) + # wechat_press_label_countdown.set_text("{}S".format(str(self.countdown))) def done_return(self): EventMesh.publish("load_screen", {"screen": "main_menu"}) diff --git a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/mgr.py b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/mgr.py index 2eec719f..2c5803e9 100644 --- a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/mgr.py +++ b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/mgr.py @@ -12,7 +12,7 @@ import dataCall import checkNet import osTimer from ext import constants - +import sms from ext.common import Lock, Abstract, LogAdapter from ext.location import GPS, GPSMatch,CellLocator from misc import USB, Power, ADC @@ -440,8 +440,9 @@ def voice_callback(args): tmp = [] tmp = args[6] find_num = tmp[0] - b = tmp.isdigit()#判断是否不是数字开头 暂时不用 因为截取了+判断不了 - if find_num != 0 and size_len > 11: + b = tmp[0].isdigit()#判断是否不是数字开头 暂时不用 因为截取了+判断不了 判断号码是否大于11位数,如果大于11位数 并且第一个字符是数字就按照最后11位做存储 + + if b == True and size_len > 11: tmp = tmp[size_len-11:] EventMesh.publish("load_screen", {"screen": "incoming_call","meta":str(tmp)}) @@ -451,8 +452,8 @@ def voice_callback(args): tmp = [] tmp = args[6] find_num = tmp[0] - b = tmp.isdigit()#判断是否不是数字开头 暂时不用 因为截取了+判断不了 - if find_num != 0 and size_len > 11: + b = tmp[0].isdigit()#判断是否不是数字开头 暂时不用 因为截取了+判断不了 + if b == True and size_len > 11: tmp = tmp[size_len-11:] EventMesh.publish("load_screen", {"screen": "on_call","meta":str(tmp)}) @@ -511,9 +512,12 @@ class DeviceInfoManager(Abstract): self.Hr_Need_Open = 0 self.Spo2_Need_Open = 0 self.bat_time = 0 + self.sms_full_flag = 0 + self.clear_step = 0 self.old_time = 0 self.UD_time = 0 + self.UD_timeout = 7*60 print("DeviceInfoManager:1") self.gsensor = SC7A20() @@ -589,7 +593,9 @@ class DeviceInfoManager(Abstract): :return: """ + self.timer_push = self.timer_push+1 + #if self.timer_push > 10 : # EventMesh.publish("time", self.get_time()) # EventMesh.publish("battery", self.get_battery()) @@ -609,30 +615,62 @@ class DeviceInfoManager(Abstract): self.get_hr_state = EventMesh.publish("get_hr_state") self.get_spo2_state = EventMesh.publish("get_spo2_state") - # print("hr_time:{} get_hr_state:{} get_spo2_state:{}".format(hr_time,self.get_hr_state,self.get_spo2_state)) + hour = 0 + min = 0 + hour = date_tmp[3] + min = date_tmp[4] + + if hour == 0:#清步数 + if min <= 1: + if self.clear_step == 0: + step = EventMesh.publish("get_old_step_value") + if step > 0: + EventMesh.publish("set_old_step_value",0) + self.gsensor.reset_step() + self.clear_step = 1 + else: + if self.clear_step == 1: + self.clear_step = 0 + else: + if self.clear_step == 1: + self.clear_step = 0 + + #电量小于20% 5分钟提醒一次 battery = EventMesh.publish("screen_get_battery") self.bat_time+=10 + # print("date_tmp:{} self.bat_time:{}".format(date_tmp,self.bat_time)) + if self.bat_time > 5*60: self.bat_time = 0 if battery == 20: - EventMesh.publish("load_screen", {"screen": "low_power"}) - - + EventMesh.publish("load_screen", {"screen": "LOW_POWER"}) + + #消息已满 + msg_nums = sms.getMsgNums() #获取短信条数 + self.sms_full_flag+=10 + if self.sms_full_flag >= 120: + self.sms_full_flag=0 + if msg_nums >= 50: + EventMesh.publish("load_screen", {"screen": "message_full"}) + + #print("hr......01....{}\r\n".format(hr_time)) if hr_time != None: # print("hr......01....{}\r\n".format(hr_time)) if hr_time > 0: # print("get_hr_state:{} get_spo2_state:{} self.old_time:{} hr_time:{}".format(self.get_hr_state,self.get_spo2_state,self.old_time,hr_time)) if self.get_hr_state != 1 and self.get_spo2_state != 1: - if self.HR_state == 0: - self.HR_Onestate = 0 - self.HR_OneTime = 0 + if self.get_hr_state == 0 and self.get_spo2_state == 0: + if self.HR_state == 0 or self.HR_state == 3: + self.HR_Onestate = 0 + self.HR_OneTime = 0 - if self.old_time != hr_time: + if self.old_time != hr_time:#重复修改测量间隔时间 self.SENSOR_time = time_tmp#防止改变时间的时候正在开启测量突然10s就停止测量 if self.get_hr_state == 2 and self.HR_state == 1:#自动检测的心率还在测量立马关了测试 heart_value = EventMesh.publish(constants.EVENT.GET_HEART) if heart_value > 50 and heart_value != None: + EventMesh.publish("set_old_hr_data",heart_value) EventMesh.publish(constants.PROTOCOL.HEART_SEND,heart_value) EventMesh.publish(constants.EVENT.STOP_HEART) self.HR_state = 0 @@ -640,21 +678,48 @@ class DeviceInfoManager(Abstract): self.HR_state = 0 spo2_value = EventMesh.publish(constants.EVENT.GET_BLOOD_OXYGEN) if spo2_value > 85 and spo2_value != None: + EventMesh.publish("set_old_spo2_data",spo2_value) EventMesh.publish(constants.PROTOCOL.OXYGEN_SEND,spo2_value) EventMesh.publish(constants.EVENT.STOP_BLOOD_OXYGEN) self.old_time = hr_time - # print("time_tmp :{} self.SENSOR_time :{} time_tmp - self.SENSOR_time:{} self.HR_state:{}".format(time_tmp,self.SENSOR_time,time_tmp - self.SENSOR_time,self.HR_state)) - if math.fabs(time_tmp - self.SENSOR_time) >= hr_time and self.HR_state == 0: + if self.HR_state == 3 or self.HR_state == 0:# + if (time_tmp - self.SENSOR_time) >= hr_time: + if self.get_spo2_state == 3 or self.get_hr_state == 3:#单次测量没有完毕优先测量间隔时间测量的 + if self.get_hr_state == 3: + EventMesh.publish(constants.EVENT.STOP_HEART) + heart_value = EventMesh.publish(constants.EVENT.GET_HEART) + if heart_value > 50 and heart_value != None: + EventMesh.publish("set_old_hr_data",heart_value) + EventMesh.publish(constants.PROTOCOL.HEART_SEND,heart_value) + + elif self.get_spo2_state == 3: + EventMesh.publish(constants.EVENT.STOP_BLOOD_OXYGEN) + spo2_value = EventMesh.publish(constants.EVENT.GET_BLOOD_OXYGEN) + if spo2_value > 85 and spo2_value != None: + EventMesh.publish("set_old_spo2_data",spo2_value) + EventMesh.publish(constants.PROTOCOL.OXYGEN_SEND,spo2_value) + + self.HR_state = 0 + self.SENSOR_time = time_tmp + self.SENSOR_time = time_tmp + self.HR_state = 0 + + #print("time_tmp :{} self.SENSOR_time :{} time_tmp - self.SENSOR_time:{} self.HR_state:{}".format(time_tmp,self.SENSOR_time,time_tmp - self.SENSOR_time,self.HR_state)) + if (time_tmp - self.SENSOR_time) == 0 and self.HR_state == 0: print("START_HEART:1") EventMesh.publish("set_hr_state",2)#2代表后台进入测试 EventMesh.publish(constants.EVENT.START_HEART) self.HR_state = 1 - elif math.fabs(time_tmp - self.SENSOR_time) >= (hr_time+60) and self.HR_state == 1: + self.HR_Onestate = 0 + self.HR_OneTime = 0 + elif (time_tmp - self.SENSOR_time) >= 60 and self.HR_state == 1: EventMesh.publish("set_hr_state",0)#2代表后台进入测试 EventMesh.publish(constants.EVENT.STOP_HEART) heart_value = EventMesh.publish(constants.EVENT.GET_HEART) + print("heart_value:{}".format(heart_value)) if heart_value > 50 and heart_value != None: + EventMesh.publish("set_old_hr_data",heart_value) EventMesh.publish(constants.PROTOCOL.HEART_SEND,heart_value)#上传心率数据 #获取心率数据上传数据app print("STOP_HEART:") @@ -662,22 +727,22 @@ class DeviceInfoManager(Abstract): EventMesh.publish(constants.EVENT.START_BLOOD_OXYGEN)#K开血氧 print("START_BLOOD_OXYGEN:") self.HR_state = 2 - elif math.fabs(time_tmp - self.SENSOR_time) >= (hr_time+120) and self.HR_state == 2: + elif (time_tmp - self.SENSOR_time) >= 120 and self.HR_state == 2: print("STOP_BLOOD_OXYGEN:") EventMesh.publish("set_spo2_state",0)#2代表后台进入血氧测试 EventMesh.publish(constants.EVENT.STOP_BLOOD_OXYGEN)#停止血氧测试 spo2_value = EventMesh.publish(constants.EVENT.GET_BLOOD_OXYGEN) print("spo2_value:{}".format(spo2_value)) if spo2_value > 85 and spo2_value != None: + EventMesh.publish("set_old_spo2_data",spo2_value) EventMesh.publish(constants.PROTOCOL.OXYGEN_SEND,spo2_value) - self.HR_state = 0 - self.SENSOR_time = time_tmp + self.HR_state = 3 + else: - # print("endtime.........\r\n") self.SENSOR_time = time_tmp self.HR_state = 0 self.old_time = 0 - if self.HR_state == 0:#只有不在测量的时候才测单次的 + if self.HR_state == 3 or self.HR_state == 0:#只有不在测量的时候才测单次的 if self.get_spo2_state == 3 or self.get_hr_state == 3:#单次测量 self.HR_state = 0 self.HR_OneTime+=1 @@ -705,18 +770,19 @@ class DeviceInfoManager(Abstract): heart_value = EventMesh.publish(constants.EVENT.GET_HEART) if heart_value > 50 and heart_value != None: EventMesh.publish(constants.PROTOCOL.HEART_SEND,heart_value)#上传心率数据 - print("STOP_HEART.01:") + EventMesh.publish("set_old_hr_data",heart_value) + if self.Spo2_Need_Open == 0 and self.get_spo2_state == 3: EventMesh.publish("set_spo2_state",3)#2代表后台进入血氧测试 EventMesh.publish(constants.EVENT.START_BLOOD_OXYGEN)#K开血氧 - print("START_BLOOD_OXYGEN 02") + self.HR_Onestate = 2 self.set_hsenor_crt = 2#血氧关闭 else: self.HR_Onestate = 0 self.HR_OneTime = 0 self.set_hsenor_crt = 0# - print("START_end......") + EventMesh.publish("set_hr_state",0)#2代表后台进入血氧测试 EventMesh.publish("set_spo2_state",0)#2代表后台进入血氧测试 else: @@ -724,9 +790,10 @@ class DeviceInfoManager(Abstract): EventMesh.publish("set_spo2_state",0)#2代表后台进入血氧测试 EventMesh.publish(constants.EVENT.STOP_BLOOD_OXYGEN)#K开血氧 spo2_value = EventMesh.publish(constants.EVENT.GET_BLOOD_OXYGEN) - print("spo2_value:{}.......01..".format(spo2_value)) + if spo2_value > 85 and spo2_value != None: EventMesh.publish(constants.PROTOCOL.OXYGEN_SEND,spo2_value) + EventMesh.publish("set_old_spo2_data",spo2_value) if self.Hr_Need_Open == 0 and self.get_hr_state == 3: EventMesh.publish("set_hr_state",3)#2代表后台进入测试 EventMesh.publish(constants.EVENT.START_HEART) @@ -736,7 +803,7 @@ class DeviceInfoManager(Abstract): self.HR_Onestate = 0 self.HR_OneTime = 0 self.set_hsenor_crt = 2#血氧关闭 - print("STOP_BLOOD_OXYGEN:....09.....") + elif self.HR_OneTime > 6+6 and self.HR_Onestate == 2: print("HR_OneTime:....05") @@ -744,16 +811,16 @@ class DeviceInfoManager(Abstract): EventMesh.publish("set_spo2_state",0)#2代表后台进入血氧测试 EventMesh.publish(constants.EVENT.STOP_BLOOD_OXYGEN)#停止血氧测试 spo2_value = EventMesh.publish(constants.EVENT.GET_BLOOD_OXYGEN) - print("spo2_value:{}......08.....".format(spo2_value)) if spo2_value > 85 and spo2_value != None: EventMesh.publish(constants.PROTOCOL.OXYGEN_SEND,spo2_value) + EventMesh.publish("set_old_spo2_data",spo2_value) elif self.set_hsenor_crt == 1: EventMesh.publish("set_hr_state",0)#0代表g关闭测试 EventMesh.publish(constants.EVENT.STOP_HEART) heart_value = EventMesh.publish(constants.EVENT.GET_HEART) if heart_value > 50 and heart_value != None: + EventMesh.publish("set_old_hr_data",heart_value) EventMesh.publish(constants.PROTOCOL.HEART_SEND,heart_value)#上传心率数据 - print("STOP_HEART.03:") self.HR_Onestate = 0 else: self.HR_Onestate = 0 @@ -764,12 +831,11 @@ class DeviceInfoManager(Abstract): self.SENSOR_time = time_tmp#进入最后一次的时间戳 self.old_time = 0 - if self.get_hr_state != 1 and self.get_spo2_state != 1: + if self.get_hr_state != 1 and self.get_spo2_state != 1:#没有设置间隔时间单次测量 if self.get_spo2_state == 3 or self.get_hr_state == 3:#单次测量 self.HR_state = 0 self.HR_OneTime+=1 if self.HR_OneTime == 1 and self.HR_Onestate == 0: - print("hr.......01...\r\n") if self.get_hr_state == 3: self.Hr_Need_Open = 1 EventMesh.publish("set_hr_state",3)#2代表后台进入测试 @@ -784,26 +850,25 @@ class DeviceInfoManager(Abstract): else: self.Spo2_Need_Open = 0 self.HR_Onestate = 1 - print("self.HR_Onestate....3") + elif self.HR_OneTime > 6 and self.HR_Onestate == 1: - print("self.HR_Onestate...4..") + print("stop_heart Onec ") if self.Hr_Need_Open == 1:#需要关闭心率测量 EventMesh.publish(constants.EVENT.STOP_HEART) heart_value = EventMesh.publish(constants.EVENT.GET_HEART) + print("stop_heart heart_value:{}".format(heart_value)) if heart_value > 50 and heart_value != None: + EventMesh.publish("set_old_hr_data",heart_value) EventMesh.publish(constants.PROTOCOL.HEART_SEND,heart_value)#上传心率数据 - print("STOP_HEART.06:") if self.Spo2_Need_Open == 0 and self.get_spo2_state == 3: EventMesh.publish("set_spo2_state",3)#2代表后台进入血氧测试 EventMesh.publish(constants.EVENT.START_BLOOD_OXYGEN)#K开血氧 - print("START_BLOOD_OXYGEN 06") self.HR_Onestate = 2 self.set_hsenor_crt = 2#血氧关闭 else: self.HR_Onestate = 0 self.HR_OneTime = 0 self.set_hsenor_crt = 0# - print("START_end....06..") EventMesh.publish("set_hr_state",0)#2代表后台进入血氧测试 EventMesh.publish("set_spo2_state",0)#2代表后台进入血氧测试 else: @@ -813,6 +878,7 @@ class DeviceInfoManager(Abstract): spo2_value = EventMesh.publish(constants.EVENT.GET_BLOOD_OXYGEN) print("spo2_value:{}.......01..".format(spo2_value)) if spo2_value > 85 and spo2_value != None: + EventMesh.publish("set_old_spo2_data",spo2_value) EventMesh.publish(constants.PROTOCOL.OXYGEN_SEND,spo2_value) if self.Hr_Need_Open == 0 and self.get_hr_state == 3: EventMesh.publish("set_hr_state",3)#2代表后台进入测试 @@ -826,21 +892,20 @@ class DeviceInfoManager(Abstract): print("STOP_BLOOD_OXYGEN:....06.....") elif self.HR_OneTime > 6+6 and self.HR_Onestate == 2: - print("HR_OneTime:....06") if self.set_hsenor_crt == 2: EventMesh.publish("set_spo2_state",0)#2代表后台进入血氧测试 EventMesh.publish(constants.EVENT.STOP_BLOOD_OXYGEN)#停止血氧测试 spo2_value = EventMesh.publish(constants.EVENT.GET_BLOOD_OXYGEN) - print("spo2_value:{}......06.....".format(spo2_value)) if spo2_value > 85 and spo2_value != None: + EventMesh.publish("set_old_spo2_data",spo2_value) EventMesh.publish(constants.PROTOCOL.OXYGEN_SEND,spo2_value) elif self.set_hsenor_crt == 1: EventMesh.publish("set_hr_state",0)#0代表g关闭测试 EventMesh.publish(constants.EVENT.STOP_HEART) heart_value = EventMesh.publish(constants.EVENT.GET_HEART) if heart_value > 50 and heart_value != None: + EventMesh.publish("set_old_hr_data",heart_value) EventMesh.publish(constants.PROTOCOL.HEART_SEND,heart_value)#上传心率数据 - print("STOP_HEART.06:") self.HR_Onestate = 0 else: self.HR_Onestate = 0 @@ -1158,7 +1223,7 @@ class SockManager(Abstract): self.connect() def send(self, topic, msg): - # print("send msg:{}".format(msg)) + print("TCP:send data:{}".format(msg)) self.sock.send(msg) def recv(self): @@ -1182,7 +1247,7 @@ class SockManager(Abstract): if data[-1] != 0x5d and len(data)<10*1024: #']': continue self.connect_tmp = 1 #有数据,就认为是连接状态 - print("TCP:recv:len:{} type:{}".format(len(data),type(data))) + print("TCP:recv: data:{}".format(data)) EventMesh.publish(constants.EVENT.SET_CONNECT, 1) data_str = data.decode('ascii') data_str = data_str.split(']') @@ -1532,11 +1597,38 @@ class PhoneCallingManager(Abstract): def get_phonenum(self, event, msg): return self.phonenum -#获取心率 血氧历史数据 -class getOldHrDataManager(Abstract): +#获取心率 血氧 步数历史数据 +class gethistoryDataManager(Abstract): def __init__(self): self.oldHr = 0 self.oldspo2 = 0 + self.oldstep = 0 + self.old_step = 0 + self.read_data = {} + check_json= ql_fs.path_exists("/ext/static/storage_file/config.json") + if check_json == True : + with open("/ext/static/storage_file/config.json","r") as fd:#音频文件编号 + self.read_data = ujson.load(fd) + if self.read_data != {}: + b = str("old_hr") in self.read_data.keys() + if b == True: + self.oldHr = self.read_data["old_hr"] + else: + self.oldHr = 0 + old_spo2 = str("old_spo2") in self.read_data.keys() + if old_spo2 == True: + self.oldspo2 = self.read_data["old_spo2"] + else: + self.oldspo2 = 0 + old_step = str("old_step") in self.read_data.keys() + if old_step == True: + self.oldstep = self.read_data["old_step"] + else: + self.oldstep = 0 + else: + self.oldHr = 0 + self.oldspo2 = 0 + self.oldstep = 0 def post_processor_after_instantiation(self): EventMesh.subscribe("set_old_hr_data", self.save_hr_value) @@ -1544,18 +1636,46 @@ class getOldHrDataManager(Abstract): EventMesh.subscribe("set_old_spo2_data", self.save_spo2_value) EventMesh.subscribe("get_old_spo2_data", self.get_spo2_value) + EventMesh.subscribe("get_old_step_value", self.get_old_step_value) + EventMesh.subscribe("set_old_step_value", self.set_old_step_value) + def save_hr_value(self, event, msg): - self.oldHr = msg + if msg >= 50: + self.read_data = EventMesh.publish("get_storage_data") + self.read_data["old_hr"] = msg + + EventMesh.publish("set_storage_data", self.read_data) + with open("/ext/static/storage_file/config.json","w",encoding="utf-8") as fd: + ujson.dump(self.read_data,fd) + self.oldHr = msg def get_hr_value(self, event, msg): return self.oldHr def save_spo2_value(self, event, msg): - self.oldspo2 = msg + if msg >= 85: + self.read_data = EventMesh.publish("get_storage_data") + self.read_data["old_spo2"] = msg + + EventMesh.publish("set_storage_data", self.read_data) + with open("/ext/static/storage_file/config.json","w",encoding="utf-8") as fd: + ujson.dump(self.read_data,fd) + self.oldspo2 = msg def get_spo2_value(self, event, msg): return self.oldspo2 + def set_old_step_value(self, event, msg): + self.oldstep = msg + + + def get_old_step_value(self, event, msg): + step = EventMesh.publish(constants.EVENT.GET_STEP) + self.old_step = self.oldstep + step[0] + return self.old_step + + + class getWeatherDataManager(Abstract): # 获取天气数据 @@ -1632,7 +1752,7 @@ class getHrTimeManager(Abstract): class getBrightnessManager(Abstract):#获取亮度级别 def __init__(self): - self.level = 5#默认值5 + self.level = 6#默认值6 self.read_data = {} self.PWM_backlight = None check = ql_fs.path_exists("/ext/static/storage_file/config.json") @@ -1658,7 +1778,7 @@ class getBrightnessManager(Abstract):#获取亮度级别 def add(self, event, msg): if self.level < 10: - self.level = self.level + 1 + self.level = self.level + 2 self.PWM_backlight = PWM(PWM.PWM1, PWM.ABOVE_MS, self.level, 10) self.PWM_backlight.open() @@ -1671,7 +1791,7 @@ class getBrightnessManager(Abstract):#获取亮度级别 def reduce(self, event, msg): if self.level > 0: - self.level = self.level - 1 + self.level = self.level - 2 if self.level <= 0: self.PWM_backlight = PWM(PWM.PWM1, PWM.ABOVE_MS, 1, 10) else: @@ -1730,3 +1850,4 @@ class getVolumSizeManager(Abstract):#设置或获取音量大小数据 def get_volum_size(self, event, msg): return self.volume_size + diff --git a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/ui.py b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/ui.py index b0a4694a..0cc01257 100644 --- a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/ui.py +++ b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/ui.py @@ -206,7 +206,8 @@ class Screen(Abstract): pass PHONE_CALL_MAX_DATA = 22 -line_points = [{"x":0,"y":0},{"x":0,"y":35}] + +phone_line_points = [{"x":0,"y":0},{"x":0,"y":40}] phone_screen = None phone_line = None phone_label = None @@ -254,15 +255,15 @@ class PhoneScreen(Screen): phone_screen.add_style(style_screen, lv.PART.MAIN | lv.STATE.DEFAULT) phone_line = lv.line(phone_screen) - phone_line.set_points(line_points,2) - phone_line.set_pos(235,58) - phone_line.set_size(2,35) + phone_line.set_points(phone_line_points,2) + phone_line.set_pos(235,8) + phone_line.set_size(2,40) phone_line.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF) phone_line.add_style(style_line,0) phone_label = lv.label(phone_screen) - phone_label.set_pos(0, 45) - phone_label.set_size(0, 55) + phone_label.set_pos(0, 14) + phone_label.set_size(0, 48) phone_label.set_text(" ") phone_label.add_style(style_font_youyuan_40, lv.PART.MAIN | lv.STATE.DEFAULT) phone_label.set_long_mode(lv.label.LONG.CLIP) @@ -272,91 +273,92 @@ class PhoneScreen(Screen): phone_one.set_src("E:/static/IMAGE_NUMBER_KEY1_ICON.png") phone_one.add_flag(lv.obj.FLAG.CLICKABLE) phone_one.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_one.set_pos(3, 100) + phone_one.set_pos(3, 60) + phone_one.set_size(76, 50) phone_two = lv.img(phone_screen) - phone_two.set_size(76, 40) + phone_two.set_size(76, 50) phone_two.set_src("E:/static/IMAGE_NUMBER_KEY2_ICON.png") phone_two.add_flag(lv.obj.FLAG.CLICKABLE) phone_two.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_two.set_pos(82, 100) + phone_two.set_pos(82, 60) phone_three = lv.img(phone_screen) - phone_three.set_size(76, 40) + phone_three.set_size(76, 50) phone_three.set_src("E:/static/IMAGE_NUMBER_KEY3_ICON.png") phone_three.add_flag(lv.obj.FLAG.CLICKABLE) phone_three.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_three.set_pos(161, 100) + phone_three.set_pos(161, 60) phone_four = lv.img(phone_screen) - phone_four.set_size(76, 40) + phone_four.set_size(76, 50) phone_four.set_src("E:/static/IMAGE_NUMBER_KEY4_ICON.png") phone_four.add_flag(lv.obj.FLAG.CLICKABLE) phone_four.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_four.set_pos(3, 142) + phone_four.set_pos(3, 112) phone_five = lv.img(phone_screen) - phone_five.set_size(76, 40) + phone_five.set_size(76, 50) phone_five.set_src("E:/static/IMAGE_NUMBER_KEY5_ICON.png") phone_five.add_flag(lv.obj.FLAG.CLICKABLE) phone_five.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_five.set_pos(82, 142) + phone_five.set_pos(82, 112) phone_six = lv.img(phone_screen) - phone_six.set_size(76, 40) + phone_six.set_size(76, 50) phone_six.set_src("E:/static/IMAGE_NUMBER_KEY6_ICON.png") phone_six.add_flag(lv.obj.FLAG.CLICKABLE) phone_six.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_six.set_pos(161, 142) + phone_six.set_pos(161, 112) phone_seven = lv.img(phone_screen) - phone_seven.set_size(76, 40) + phone_seven.set_size(76, 50) phone_seven.set_src("E:/static/IMAGE_NUMBER_KEY7_ICON.png") phone_seven.add_flag(lv.obj.FLAG.CLICKABLE) phone_seven.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_seven.set_pos(3, 184) + phone_seven.set_pos(3, 164) phone_eight = lv.img(phone_screen) - phone_eight.set_size(76, 40) + phone_eight.set_size(76, 50) phone_eight.set_src("E:/static/IMAGE_NUMBER_KEY8_ICON.png") phone_eight.add_flag(lv.obj.FLAG.CLICKABLE) phone_eight.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_eight.set_pos(82, 184) + phone_eight.set_pos(82, 164) phone_nine = lv.img(phone_screen) - phone_nine.set_size(76, 40) + phone_nine.set_size(76, 50) phone_nine.set_src("E:/static/IMAGE_NUMBER_KEY9_ICON.png") phone_nine.add_flag(lv.obj.FLAG.CLICKABLE) phone_nine.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_nine.set_pos(161, 184) + phone_nine.set_pos(161, 164) phone_start = lv.img(phone_screen) - phone_start.set_size(76, 40) + phone_start.set_size(76, 50) phone_start.set_src("E:/static/IMAGE_NUMBER_KEYSTAR_ICON.png") phone_start.add_flag(lv.obj.FLAG.CLICKABLE) phone_start.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_start.set_pos(3, 226) + phone_start.set_pos(3, 216) phone_zero = lv.img(phone_screen) - phone_zero.set_size(76, 40) + phone_zero.set_size(76, 50) phone_zero.set_src("E:/static/IMAGE_NUMBER_KEY0_ICON.png") phone_zero.add_flag(lv.obj.FLAG.CLICKABLE) phone_zero.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_zero.set_pos(82, 226) + phone_zero.set_pos(82, 216) phone_hash = lv.img(phone_screen) - phone_hash.set_size(76, 40) + phone_hash.set_size(76, 50) phone_hash.set_src("E:/static/IMAGE_NUMBER_KEYHASH_ICON.png") phone_hash.add_flag(lv.obj.FLAG.CLICKABLE) phone_hash.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_hash.set_pos(161, 226) + phone_hash.set_pos(161, 216) phone_call = lv.img(phone_screen) - phone_call.set_size(76, 40) + phone_call.set_size(76, 50) phone_call.set_src("E:/static/IMAGE_BUTTON_DIAL.png") phone_call.add_flag(lv.obj.FLAG.CLICKABLE) phone_call.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_call.set_pos(3, 268) + phone_call.set_pos(3, 270) phone_call_btn = lv.img(phone_screen) phone_call_btn.set_size(76, 52) @@ -364,11 +366,11 @@ class PhoneScreen(Screen): phone_call_btn.set_pos(3, 268) phone_contact = lv.img(phone_screen) - phone_contact.set_size(64, 40) + phone_contact.set_size(64, 50) phone_contact.set_src("E:/static/IMAGE_BUTTON_DIAL_CONTACT.png") phone_contact.add_flag(lv.obj.FLAG.CLICKABLE) phone_contact.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_contact.set_pos(87, 268) + phone_contact.set_pos(87, 270) phone_contact_btn = lv.img(phone_screen) phone_contact_btn.set_size(76, 52) @@ -376,11 +378,11 @@ class PhoneScreen(Screen): phone_contact_btn.set_pos(87, 268) phone_delete = lv.img(phone_screen) - phone_delete.set_size(76, 40) + phone_delete.set_size(76, 50) phone_delete.set_src("E:/static/IMAGE_BUTTON_DELKEY.png") phone_delete.add_flag(lv.obj.FLAG.CLICKABLE) phone_delete.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_delete.set_pos(161, 268) + phone_delete.set_pos(161, 270) phone_delete_btn = lv.img(phone_screen) phone_delete_btn.set_size(76, 52) @@ -592,8 +594,8 @@ class PhoneScreen(Screen): len_t = len(self.phone_list)*40 if len_t > 230: len_t = 230 - phone_label.set_size(len_t,45) - phone_label.set_pos(230-len_t,60) + phone_label.set_size(len_t,48) + phone_label.set_pos(230-len_t,14) phone_label.set_text(self.phone_num) def done_return(self): @@ -1141,7 +1143,7 @@ class PopupScreen(Screen): 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.jpg") + msg_list_t_done_img.set_src("E:/static/IMAGE_NOTICE_NONE.png") msg_list_t_done_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) no_msg_text = lv.label(msg_list_t) @@ -2009,56 +2011,57 @@ class WeatherScreen(Screen): weather_detail_label,weather_location_label,no_connect_label ,no_connect_label1 connect = EventMesh.publish(constants.EVENT.GET_CONNECT) #获取网络状态 self.weather_data = EventMesh.publish("get_weather_data") - if connect != 0: - no_data = self.weather_data[8] - if no_data != 0: - no_weather_img.add_flag(lv.obj.FLAG.HIDDEN) - weather_img.clear_flag(lv.obj.FLAG.HIDDEN) - no_connect_label.set_text(" ") - no_connect_label1.set_text(" ") - # print("self.weather_data:{}".format(self.weather_data)) - type = self.weather_data[3] - if type == None: - weather_img.set_src("E:/static/update.png")#天气类型 - else: - weather_img.set_src("E:/static/{}_weather.png".format(type))#天气类型 + if weather_screen != None: + if connect != 0 and self.weather_data != None: + no_data = self.weather_data[8] + if no_data != 0 : + no_weather_img.add_flag(lv.obj.FLAG.HIDDEN) + weather_img.clear_flag(lv.obj.FLAG.HIDDEN) + no_connect_label.set_text(" ") + no_connect_label1.set_text(" ") + # print("self.weather_data:{}".format(self.weather_data)) + type = self.weather_data[3] + if type == None: + weather_img.set_src("E:/static/update.png")#天气类型 + else: + weather_img.set_src("E:/static/{}_weather.png".format(type))#天气类型 - temp = self.weather_data[4] - if temp == None: - weather_tem_label.set_text("_ _") - else: - weather_tem_label.set_text("{}".format(temp)) + temp = self.weather_data[4] + if temp == None: + weather_tem_label.set_text("_ _") + else: + weather_tem_label.set_text("{}".format(temp)) - date = self.weather_data[0] - if date != '{}': - date_month = date.split('-')[1] - date_day = date.split('-')[2] - weather_detail_label.set_text("{}/{}".format(date_month,date_day))#天气更新时间 - else: + date = self.weather_data[0] + if date != '{}': + date_month = date.split('-')[1] + date_day = date.split('-')[2] + weather_detail_label.set_text("{}/{}".format(date_month,date_day))#天气更新时间 + else: + weather_detail_label.set_text("-/-") + + city = self.weather_data[7] + if city != '{}': + weather_location_label.set_text("{}".format(city))#城市 + else: + weather_location_label.set_text("--") + else:#已联网未获取到天气数据 + weather_location_label.set_text(" ") weather_detail_label.set_text("-/-") + weather_tem_label.set_text("_ _") - city = self.weather_data[7] - if city != '{}': - weather_location_label.set_text("{}".format(city))#城市 - else: - weather_location_label.set_text("--") - else:#已联网未获取到天气数据 + no_connect_label.set_text("未获取网络数据") + no_connect_label1.set_text("请稍候重试") + + else: weather_location_label.set_text(" ") weather_detail_label.set_text("-/-") weather_tem_label.set_text("_ _") - - no_connect_label.set_text("未获取网络数据") - no_connect_label1.set_text("请稍候重试") - - else: - weather_location_label.set_text(" ") - weather_detail_label.set_text("-/-") - weather_tem_label.set_text("_ _") - - no_weather_img.clear_flag(lv.obj.FLAG.HIDDEN) - weather_img.add_flag(lv.obj.FLAG.HIDDEN) - no_connect_label.set_text("找不到服务器") - no_connect_label1.set_text("请联网后重试") + + no_weather_img.clear_flag(lv.obj.FLAG.HIDDEN) + weather_img.add_flag(lv.obj.FLAG.HIDDEN) + no_connect_label.set_text("找不到服务器") + no_connect_label1.set_text("请联网后重试") def done_return(self): EventMesh.publish("load_screen", {"screen": "toolbox"}) diff --git a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/ui_WatchFaceScreen.py b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/ui_WatchFaceScreen.py index 1cb64da2..a09b73ce 100644 --- a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/ui_WatchFaceScreen.py +++ b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/ui_WatchFaceScreen.py @@ -11,11 +11,21 @@ import ujson from ui_main_menu import MainMenu2_Watchface -style_font_youyuan_20 = lv.style_t() -style_font_youyuan_20.init() -style_font_youyuan_20.set_text_color(lv.color_make(0xff, 0xff, 0xff)) -style_font_youyuan_20.set_text_font_v2("font_22.bin",22,0) +# style_font_youyuan_20 = lv.style_t() +# style_font_youyuan_20.init() +# style_font_youyuan_20.set_text_color(lv.color_make(0xff, 0xff, 0xff)) +# style_font_youyuan_20.set_text_font_v2("font_22.bin",22,0) +watchface_style_default = lv.style_t() +watchface_style_default.init() +watchface_style_default.set_text_color(lv.color_make(0xff, 0xff, 0xff)) +watchface_style_default.set_text_font_v2("font_22.bin",22,0) + + +style_font_youyuan_28 = lv.style_t() +style_font_youyuan_28.init() +style_font_youyuan_28.set_text_color(lv.color_make(0xFF, 0xFF, 0xFF)) +style_font_youyuan_28.set_text_font(lv.font_28_dial) Watchface = lv.obj() @@ -80,7 +90,7 @@ style_font_youyuan_70_black.set_text_color(lv.color_make(0x32, 0xc8, 0xdb)) style_font_youyuan_70_black.set_text_font(lv.font_70_bold) watchface1_time1_text = lv.label(Watchface1) -watchface1_time1_text.set_pos(20, 60) +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("12:00") @@ -88,27 +98,27 @@ watchface1_time1_text.add_style(style_font_youyuan_70_black, lv.PART.MAIN|lv.STA #日期 watchface1_date_span = lv.label(Watchface1) -watchface1_date_span.set_pos(24, 131) -watchface1_date_span.set_size(84, 30) +watchface1_date_span.set_pos(24, 118) +watchface1_date_span.set_size(140, 30) watchface1_date_span.set_align(lv.TEXT_ALIGN.LEFT) watchface1_date_span.set_text("12月9日") -watchface1_date_span.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) +watchface1_date_span.add_style(style_font_youyuan_28, lv.PART.MAIN|lv.STATE.DEFAULT) #星期 watchface1_week_span = lv.label(Watchface1) -watchface1_week_span.set_pos(24, 163) -watchface1_week_span.set_size(70, 30) +watchface1_week_span.set_pos(24, 153) +watchface1_week_span.set_size(100, 30) watchface1_week_span.set_align(lv.TEXT_ALIGN.LEFT) watchface1_week_span.set_text("星期四") -watchface1_week_span.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) +watchface1_week_span.add_style(style_font_youyuan_28, lv.PART.MAIN|lv.STATE.DEFAULT) watchface1_step_span = lv.label(Watchface1) -watchface1_step_span.set_pos(170, 163) -watchface1_step_span.set_size(70, 30) +watchface1_step_span.set_pos(158, 154) +watchface1_step_span.set_size(78, 30) watchface1_step_span.set_align(lv.TEXT_ALIGN.LEFT) watchface1_step_span.set_text("0") -watchface1_step_span.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) +watchface1_step_span.add_style(style_font_youyuan_28, lv.PART.MAIN|lv.STATE.DEFAULT) @@ -117,7 +127,7 @@ watchface1_HB_span.set_pos(55, 235) watchface1_HB_span.set_size(80, 30) watchface1_HB_span.set_align(lv.TEXT_ALIGN.LEFT) watchface1_HB_span.set_text("0") -watchface1_HB_span.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) +watchface1_HB_span.add_style(style_font_youyuan_28, lv.PART.MAIN|lv.STATE.DEFAULT) @@ -126,7 +136,7 @@ watchface1_SPO2_span.set_pos(160, 235) watchface1_SPO2_span.set_size(80, 30) watchface1_SPO2_span.set_align(lv.TEXT_ALIGN.LEFT) watchface1_SPO2_span.set_text("0") -watchface1_SPO2_span.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) +watchface1_SPO2_span.add_style(style_font_youyuan_28, lv.PART.MAIN|lv.STATE.DEFAULT) class WatchFace1(): @@ -160,9 +170,10 @@ class WatchFace1(): if spo2Value : self.__oldSpo2Value(None, spo2Value) # print("main get_step msg:{}".format(msg)) - step = EventMesh.publish(constants.EVENT.GET_STEP) - if step : - self.__stepValue(None, step[0]) + + # step = EventMesh.publish(constants.EVENT.GET_STEP) + step = EventMesh.publish("get_old_step_value") + self.__stepValue(None, step) def timerout_update(self): @@ -188,9 +199,9 @@ class WatchFace1(): if spo2Value : self.__oldSpo2Value(None, spo2Value) # print("main get_step msg:{}".format(msg)) - step = EventMesh.publish(constants.EVENT.GET_STEP) - if step : - self.__stepValue(None, step[0]) + # step = EventMesh.publish(constants.EVENT.GET_STEP) + step = EventMesh.publish("get_old_step_value") + self.__stepValue(None, step) def __time(self, event, msg): #时间 @@ -227,7 +238,10 @@ class WatchFace1(): watchface1_SPO2_span.set_text(str(msg)) def __stepValue(self, event, msg): - watchface1_step_span.set_text(str(msg)) + if msg == None: + watchface1_step_span.set_text("0") + else: + watchface1_step_span.set_text(str(msg)) def Close(self): pass @@ -294,69 +308,49 @@ style_font_youyuan_70_red.set_text_font(lv.font_70_bold) x = 30 y = 80 watchface2_time1_hour1_text = lv.label(Watchface2) -watchface2_time1_hour1_text.set_pos(40, 80) +watchface2_time1_hour1_text.set_pos(10, 80) watchface2_time1_hour1_text.set_size(50, 70) watchface2_time1_hour1_text.set_align(lv.TEXT_ALIGN.LEFT) watchface2_time1_hour1_text.set_text("1") watchface2_time1_hour1_text.add_style(style_font_youyuan_70_red, lv.PART.MAIN|lv.STATE.DEFAULT) watchface2_time1_hour2_text = lv.label(Watchface2) -watchface2_time1_hour2_text.set_pos(90, 80) +watchface2_time1_hour2_text.set_pos(55, 80) watchface2_time1_hour2_text.set_size(50, 70) watchface2_time1_hour2_text.set_align(lv.TEXT_ALIGN.LEFT) watchface2_time1_hour2_text.set_text("2") watchface2_time1_hour2_text.add_style(style_font_youyuan_70_red, lv.PART.MAIN|lv.STATE.DEFAULT) watchface2_time2_min1_text = lv.label(Watchface2) -watchface2_time2_min1_text.set_pos(40, 156) +watchface2_time2_min1_text.set_pos(10, 156) watchface2_time2_min1_text.set_size(50, 70) watchface2_time2_min1_text.set_align(lv.TEXT_ALIGN.LEFT) watchface2_time2_min1_text.set_text("0") watchface2_time2_min1_text.add_style(style_font_youyuan_70_red, lv.PART.MAIN|lv.STATE.DEFAULT) watchface2_time2_min2_text = lv.label(Watchface2) -watchface2_time2_min2_text.set_pos(90, 156) +watchface2_time2_min2_text.set_pos(55, 156) watchface2_time2_min2_text.set_size(50, 70) watchface2_time2_min2_text.set_align(lv.TEXT_ALIGN.LEFT) watchface2_time2_min2_text.set_text("0") watchface2_time2_min2_text.add_style(style_font_youyuan_70_red, lv.PART.MAIN|lv.STATE.DEFAULT) -# create style watchface2_style_default -# watchface2_style_default = lv.style_t() -# watchface2_style_default.init() -# watchface2_style_default.set_radius(0) -# watchface2_style_default.set_bg_color(lv.color_make(0x21,0x95,0xf6)) -# watchface2_style_default.set_bg_grad_color(lv.color_make(0x21,0x95,0xf6)) -# watchface2_style_default.set_bg_grad_dir(lv.GRAD_DIR.NONE) -# watchface2_style_default.set_bg_opa(0) -# watchface2_style_default.set_border_color(lv.color_make(0x00,0x00,0x00)) -# watchface2_style_default.set_border_width(0) -# watchface2_style_default.set_border_opa(255) -# watchface2_style_default.set_pad_left(0) -# watchface2_style_default.set_pad_right(0) -# watchface2_style_default.set_pad_top(0) -# watchface2_style_default.set_pad_bottom(0) -# watchface2_style_default.set_text_font_v2("font_22.bin",22,0) #将外部字体库与该style对象绑定 - -watchface2_style_default = lv.style_t() -watchface2_style_default.init() -watchface2_style_default.set_text_color(lv.color_make(0xff, 0xff, 0xff)) -watchface2_style_default.set_text_font_v2("font_22.bin",22,0) + #日期 watchface2_date_span = lv.label(Watchface2) -watchface2_date_span.set_pos(30+56+20+56, 100) -watchface2_date_span.set_size(84, 35) +watchface2_date_span.set_pos(30+56+20+6, 90) +watchface2_date_span.set_size(240-(30+56+20+6), 35) watchface2_date_span.set_align(lv.TEXT_ALIGN.LEFT) watchface2_date_span.set_text("12月9日") -watchface2_date_span.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) +watchface2_date_span.add_style(style_font_youyuan_28, lv.PART.MAIN|lv.STATE.DEFAULT) #星期 watchface2_week = lv.img(Watchface2) -watchface2_week.set_pos(int(30+15),int(y+20+56+56+30)) +watchface2_week.set_pos(int(30+56+20+25),int(y+56+30)) watchface2_week.set_size(90,30) watchface2_week.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF) watchface2_week.set_src("E:/static/watch_plate/style_2/week/0_week.png") @@ -364,34 +358,19 @@ watchface2_week.add_style(style_watchface_img_default, lv.PART.MAIN|lv.STATE.DEF -#天气 -watchface2_temp_img = lv.img(Watchface2) -watchface2_temp_img.set_pos(int(x+56+56+20),int(y+56+20)) -watchface2_temp_img.set_size(65,45) -watchface2_temp_img.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF) -watchface2_temp_img.set_src("E:/static/watch_plate/style_2/0_main2_weather.png") -watchface2_temp_img.add_style(style_watchface_img_default, lv.PART.MAIN|lv.STATE.DEFAULT) - -watchface2_temp_degree = lv.img(Watchface2) -watchface2_temp_degree.set_pos(int(x+56+56+65),int(215)) -watchface2_temp_degree.set_size(10,10) -watchface2_temp_degree.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF) -watchface2_temp_degree.set_src("E:/static/watch_plate/style_2/degree.png") -watchface2_temp_degree.add_style(style_watchface_img_default, lv.PART.MAIN|lv.STATE.DEFAULT) - -watchface2_temp_txt = lv.label(Watchface2) -watchface2_temp_txt.set_pos(int(x+56+56+39),int(215)) -watchface2_temp_txt.set_size(240-(x+56+56+34),30) -watchface2_temp_txt.set_align(lv.TEXT_ALIGN.LEFT) -watchface2_temp_txt.set_text("00") -watchface2_temp_txt.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) - -watchface2_no_temp_txt = lv.label(Watchface2) -watchface2_no_temp_txt.set_pos(30+56+56+20, 176) -watchface2_no_temp_txt.set_size(80, 35) -watchface2_no_temp_txt.set_align(lv.TEXT_ALIGN.LEFT) -watchface2_no_temp_txt.set_text("无数据") -watchface2_no_temp_txt.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) +watchface2_step_img = lv.img(Watchface2) +watchface2_step_img.set_pos(int(95),int(260)) +watchface2_step_img.set_size(26,21) +watchface2_step_img.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF) +watchface2_step_img.set_src("E:/static/watch_plate/style_2/step.png") +watchface2_step_img.add_style(style_watchface_img_default, lv.PART.MAIN|lv.STATE.DEFAULT) + +watchface2_step_txt = lv.label(Watchface2) +watchface2_step_txt.set_pos(125, 260) +watchface2_step_txt.set_size(80, 35) +watchface2_step_txt.set_align(lv.TEXT_ALIGN.LEFT) +watchface2_step_txt.set_text("0") +watchface2_step_txt.add_style(style_font_youyuan_28, lv.PART.MAIN|lv.STATE.DEFAULT) class WatchFace2(): NAME = "Watchface2" @@ -417,28 +396,8 @@ class WatchFace2(): if time: self.__time(None, time) - connect = EventMesh.publish(constants.EVENT.GET_CONNECT) #获取网络状态 - self.weather_data = EventMesh.publish("get_weather_data") - if connect == 1 and self.weather_data != None: - no_data = self.weather_data[8] - if no_data != 0: - type = self.weather_data[3] - if type == None: - self.__weather_type(None,None) - else: - self.__weather_type(None,type) - - temp = self.weather_data[4] - if temp == None: - self.__weather_value(None,None) - else: - self.__weather_value(None,temp) - else: - self.__weather_type(None,None) - self.__weather_value(None,None) - else: - self.__weather_type(None,None) - self.__weather_value(None,None) + step = EventMesh.publish("get_old_step_value") + self.__stepValue(None, step) def timerout_update(self): @@ -455,29 +414,9 @@ class WatchFace2(): #print("publish_time:"+time) if time: self.__time(None, time) - - connect = EventMesh.publish(constants.EVENT.GET_CONNECT) #获取网络状态 - self.weather_data = EventMesh.publish("get_weather_data") - if connect != 0: - no_data = self.weather_data[8] - if no_data != 0: - type = self.weather_data[3] - if type == None: - self.__weather_type(None,None) - else: - self.__weather_type(None,type) - - temp = self.weather_data[4] - if temp == None: - self.__weather_value(None,None) - else: - self.__weather_value(None,temp) - else: - self.__weather_type(None,None) - self.__weather_value(None,None) - else: - self.__weather_type(None,None) - self.__weather_value(None,None) + + step = EventMesh.publish("get_old_step_value") + self.__stepValue(None, step) def __time(self, event, msg): #时间 @@ -513,27 +452,33 @@ class WatchFace2(): watchface2_res_stat_battery_img.set_src("E:/static/vbat_%d.png"%(msg[1]))#"E:/vbat_60.png" pass - - def __weather_type(self, event, msg): - if msg == None: - watchface2_temp_img.add_flag(lv.obj.FLAG.HIDDEN) - watchface2_no_temp_txt.clear_flag(lv.obj.FLAG.HIDDEN) + def __stepValue(self, event, msg): + if msg == None: + watchface2_step_txt.set_text("0") else: - type = int(msg) - watchface2_no_temp_txt.add_flag(lv.obj.FLAG.HIDDEN) - watchface2_temp_img.clear_flag(lv.obj.FLAG.HIDDEN) - watchface2_temp_img.set_src("E:/static/watch_plate/style_2/%d_main2_weather.png"%(type)) + watchface2_step_txt.set_text(str(msg)) + + + # def __weather_type(self, event, msg): + # if msg == None: + # watchface2_temp_img.add_flag(lv.obj.FLAG.HIDDEN) + # watchface2_no_temp_txt.clear_flag(lv.obj.FLAG.HIDDEN) + # else: + # type = int(msg) + # watchface2_no_temp_txt.add_flag(lv.obj.FLAG.HIDDEN) + # watchface2_temp_img.clear_flag(lv.obj.FLAG.HIDDEN) + # watchface2_temp_img.set_src("E:/static/watch_plate/style_2/%d_main2_weather.png"%(type)) - def __weather_value(self, event, msg): - if msg == None: - watchface2_temp_degree.add_flag(lv.obj.FLAG.HIDDEN) - watchface2_no_temp_txt.clear_flag(lv.obj.FLAG.HIDDEN) - watchface2_temp_txt.add_flag(lv.obj.FLAG.HIDDEN) - else: - watchface2_no_temp_txt.add_flag(lv.obj.FLAG.HIDDEN) - watchface2_temp_txt.clear_flag(lv.obj.FLAG.HIDDEN) - watchface2_temp_degree.clear_flag(lv.obj.FLAG.HIDDEN) - watchface2_temp_txt.set_text(str(msg)) + # def __weather_value(self, event, msg): + # if msg == None: + # watchface2_temp_degree.add_flag(lv.obj.FLAG.HIDDEN) + # watchface2_no_temp_txt.clear_flag(lv.obj.FLAG.HIDDEN) + # watchface2_temp_txt.add_flag(lv.obj.FLAG.HIDDEN) + # else: + # watchface2_no_temp_txt.add_flag(lv.obj.FLAG.HIDDEN) + # watchface2_temp_txt.clear_flag(lv.obj.FLAG.HIDDEN) + # watchface2_temp_degree.clear_flag(lv.obj.FLAG.HIDDEN) + # watchface2_temp_txt.set_text(str(msg)) def Close(self): pass diff --git a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/ui_setting.py b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/ui_setting.py index 4befb4af..23952b43 100644 --- a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/ui_setting.py +++ b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/ui_setting.py @@ -802,18 +802,15 @@ class RestoreScreen(Screen): restore_confirm.add_event_cb(lambda e: self.confirm(e),lv.EVENT.CLICKED, None) restore_cancel.add_event_cb(lambda e: self.concel(e),lv.EVENT.CLICKED, None) - + def confirm(self, e): ret = 0 ret = ql_fs.path_exists("/ext/static/storage_file")#电话本 if ret == True: ql_fs.rmdirs("/ext/static/storage_file") ql_fs.mkdirs("/ext/static/storage_file") - # [XT*334588000000156*0003*DLT] + EventMesh.publish("alipay_unbind") EventMesh.publish(constants.PROTOCOL.DLT_SEND) - - - # EventMesh.publish("load_screen", {"screen": "setting"}) def concel(self, e): EventMesh.publish("load_screen", {"screen": "setting"}) @@ -930,8 +927,6 @@ class PoweroffScreen(Screen): def __init__(self): super().__init__() self.meta = poweroff_screen - self.timer = osTimer() - self.button_flag = 0 poweroff_confirm_img.add_event_cb(lambda e: self.confirm(e),lv.EVENT.CLICKED, None) poweroff_return.add_event_cb(lambda e: self.concel(e),lv.EVENT.CLICKED, None) @@ -971,8 +966,16 @@ class PoweroffConfirmScreen(Screen): super().__init__() self.meta = poweroff_confirm_screen self.timer = osTimer() + self.read_data = {} def initialization(self): - self.timer.start(2*1000,0,self.power_off) + step = EventMesh.publish("get_old_step_value") + if step != 0: + self.read_data = EventMesh.publish("get_storage_data") + self.read_data["old_step"] = step + EventMesh.publish("set_storage_data", self.read_data) + with open("/ext/static/storage_file/config.json","w",encoding="utf-8") as fd: + ujson.dump(self.read_data,fd) + self.timer.start(3*1000,0,self.power_off) def power_off(self,*args): Power.powerDown() @@ -1034,6 +1037,7 @@ class DialswitchScreen(Screen): def watchface01(self,e): btn1_switch.add_state(lv.STATE.CHECKED) btn2_switch.clear_state(lv.STATE.CHECKED) + self.read_data = EventMesh.publish("get_storage_data") self.read_data["watchface"] = "Watchface1" EventMesh.publish("set_storage_data", self.read_data) with open("/ext/static/storage_file/config.json","w",encoding="utf-8") as fd: @@ -1045,6 +1049,7 @@ class DialswitchScreen(Screen): def watchface02(self,e): btn1_switch.clear_state(lv.STATE.CHECKED) btn2_switch.add_state(lv.STATE.CHECKED) + self.read_data = EventMesh.publish("get_storage_data") self.read_data["watchface"] = "Watchface2" EventMesh.publish("set_storage_data", self.read_data) with open("/ext/static/storage_file/config.json","w",encoding="utf-8") as fd: diff --git a/3.code/1.watch/2.code/appAlipay.py b/3.code/1.watch/2.code/appAlipay.py index 065637e3..2375db3c 100644 --- a/3.code/1.watch/2.code/appAlipay.py +++ b/3.code/1.watch/2.code/appAlipay.py @@ -85,7 +85,8 @@ class Alipay(Abstract): print("post_processor_after_instantiation") - + EventMesh.subscribe("alipay_unbind", self.alipay_unbind) + EventMesh.subscribe("alipay_1", self.alipay_1) EventMesh.subscribe("get_payment_code", self.get_payment_code) EventMesh.subscribe("get_collect_code", self.get_collect_code) @@ -264,6 +265,9 @@ class Alipay(Abstract): def get_binding_code(self, event, msg): return self.result + + def alipay_unbind(self, event, msg): + self.alipay.unbind() def get_payment_code(self, event, msg): if self.is_init == 0 : diff --git a/3.code/1.watch/2.code/appWechat.py b/3.code/1.watch/2.code/appWechat.py index f3c6f7b0..6dd3defa 100644 --- a/3.code/1.watch/2.code/appWechat.py +++ b/3.code/1.watch/2.code/appWechat.py @@ -54,21 +54,21 @@ wechat_press_label.set_text("请按住说话") wechat_press_label.align(lv.ALIGN.CENTER, 10, 0) wechat_press_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT) -wechat_label = lv.label(wechat_screen) -wechat_label.center() -wechat_label.set_size(240, 40) -wechat_label.set_long_mode(lv.label.LONG.WRAP) -wechat_label.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0) -wechat_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT) +# wechat_label = lv.label(wechat_screen) +# wechat_label.center() +# wechat_label.set_size(240, 40) +# wechat_label.set_long_mode(lv.label.LONG.WRAP) +# wechat_label.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0) +# wechat_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT) -wechat_press_label_countdown = lv.label(wechat_screen) -wechat_press_label_countdown.set_pos(100, 100) -wechat_press_label_countdown.set_size(40, 40) -wechat_press_label_countdown.set_text(" ") -wechat_press_label_countdown.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT) -wechat_press_label_countdown.set_long_mode(lv.label.LONG.WRAP) -wechat_press_label_countdown.set_style_text_align(lv.TEXT_ALIGN.RIGHT, 0) +# wechat_press_label_countdown = lv.label(wechat_screen) +# wechat_press_label_countdown.set_pos(100, 100) +# wechat_press_label_countdown.set_size(40, 40) +# wechat_press_label_countdown.set_text(" ") +# wechat_press_label_countdown.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT) +# wechat_press_label_countdown.set_long_mode(lv.label.LONG.WRAP) +# wechat_press_label_countdown.set_style_text_align(lv.TEXT_ALIGN.RIGHT, 0) @@ -115,20 +115,20 @@ class WechatScreen(Screen): self.volum_size = 8 self.aud.setVolume(self.volum_size) self.meta = wechat_screen - wechat_press_btn.add_event_cb(lambda e: self.talking(e), - lv.EVENT.LONG_PRESSED, None) - wechat_press_btn.add_event_cb(lambda e: self.sending(e), - lv.EVENT.RELEASED, None) + # wechat_press_btn.add_event_cb(lambda e: self.talking(e), + # lv.EVENT.LONG_PRESSED, None) + # wechat_press_btn.add_event_cb(lambda e: self.sending(e), + # lv.EVENT.RELEASED, None) self.timer = osTimer() self.second_timer = osTimer() self.play_timer = osTimer() - wechat_label.set_text(" ") + self.startY = 0 self.startWidth = 0 self.check_json = 0 - self.wechat_list =lv.obj(wechat_screen) + self.wechat_list = wechat_screen EventMesh.subscribe("wechat_updata_list_show", self.wechat_updata_list_show) EventMesh.subscribe("get_wechat_data", self.get_wechat_data) EventMesh.subscribe("set_wechat_data", self.set_wechat_data) @@ -163,8 +163,8 @@ class WechatScreen(Screen): def wechat_updata_list_show(self, event, msg): if (self.wechat_list.has_flag(lv.obj.FLAG.HIDDEN)) == False: - wechat_label.clear_flag(lv.obj.FLAG.HIDDEN) - wechat_label.set_text("接收中") + # wechat_label.clear_flag(lv.obj.FLAG.HIDDEN) + # wechat_label.set_text("接收中") self.updata_list_show(2) self.timer.start(1 * 1000, 0, self.reciving) @@ -176,7 +176,7 @@ class WechatScreen(Screen): if self.wechat_num != 0: if index == 0: self.wechat_list.clear_flag(lv.obj.FLAG.HIDDEN) - wechat_label.add_flag(lv.obj.FLAG.HIDDEN) + # wechat_label.add_flag(lv.obj.FLAG.HIDDEN) elif index == 2 or index == 1: #读取json文件中的键作为label文本; #print("self.wechat_list.self.wechat_num:{}".format(self.wechat_num)) @@ -290,9 +290,10 @@ class WechatScreen(Screen): bottom_btn1.scroll_to_view(lv.ANIM.OFF) def initialization(self): - wechat_label.add_flag(lv.obj.FLAG.HIDDEN) - wechat_press_label_countdown.add_flag(lv.obj.FLAG.HIDDEN) - self.wechat_list.clear_flag(lv.obj.FLAG.HIDDEN) + # wechat_label.set_text(" ") + # wechat_label.add_flag(lv.obj.FLAG.HIDDEN) + # wechat_press_label_countdown.add_flag(lv.obj.FLAG.HIDDEN) + # self.wechat_list.clear_flag(lv.obj.FLAG.HIDDEN) #读取json文件中的字典放到self.phonebook中 #创建btn self.updata_list_show(1) @@ -305,10 +306,10 @@ class WechatScreen(Screen): 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))) + # 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)#不需要显示语音列表 @@ -328,10 +329,10 @@ class WechatScreen(Screen): #松开发送 def sending(self,e): if self.press_state == 1: - wechat_label.clear_flag(lv.obj.FLAG.HIDDEN) - wechat_label.set_text("发送中") - wechat_press_label_countdown.add_flag(lv.obj.FLAG.HIDDEN) - wechat_press_label_countdown.set_text(" ") + # wechat_label.clear_flag(lv.obj.FLAG.HIDDEN) + # wechat_label.set_text("发送中") + # wechat_press_label_countdown.add_flag(lv.obj.FLAG.HIDDEN) + # wechat_press_label_countdown.set_text(" ") if self.countdown >= 15: self.countdown = 15 @@ -433,8 +434,8 @@ class WechatScreen(Screen): #松手2秒后发送数据 def hide_label(self,*args): if self.ble_send != 1: - wechat_label.add_flag(lv.obj.FLAG.HIDDEN) - wechat_label.set_text(" ") + # wechat_label.add_flag(lv.obj.FLAG.HIDDEN) + # wechat_label.set_text(" ") self.updata_list_show(0) #获取是否在录音 @@ -459,7 +460,7 @@ class WechatScreen(Screen): if self.countdown >= 15: self.countdown = 15 - wechat_press_label_countdown.set_text("{}S".format(str(self.countdown))) + # wechat_press_label_countdown.set_text("{}S".format(str(self.countdown))) def done_return(self): EventMesh.publish("load_screen", {"screen": "main_menu"}) diff --git a/3.code/1.watch/2.code/main.py b/3.code/1.watch/2.code/main.py index 865c9b4f..e3501ad2 100644 --- a/3.code/1.watch/2.code/main.py +++ b/3.code/1.watch/2.code/main.py @@ -51,9 +51,6 @@ if __name__ == '__main__': print("init3:{}".format(utime.localtime())) from ext.btn_device_ec800m import BtnDevice from ui_main_menu import MainMenuScreen - - - # from ui_WatchFaceScreen import WatchFaceScreen from ext.appFactoryMode import FactoryModeLocationScreen,FactoryModeScreen @@ -80,7 +77,7 @@ if __name__ == '__main__': ui.add_screen(_ui.ContactsScreen()) from appWechat import WechatScreen,TK_ProtoCol,MESSAGE_ProtoCol,NewWechatPopupScreen ui.add_screen(WechatScreen()) - from alarm import ClkListScreen,ClockManager,NewEditClk,CLKTimeScreen,ClkPeriod,PopupAlarmScreen + from ext.alarm import ClkListScreen,ClockManager,NewEditClk,CLKTimeScreen,ClkPeriod,PopupAlarmScreen ui.add_screen(ClkListScreen()) ui.add_screen(_ui.CountdownEndScreen()) ui.add_screen(NewEditClk()) @@ -137,8 +134,8 @@ if __name__ == '__main__': import mgr as mgr print("init7:{}".format(utime.localtime())) - from mgr import ConfigStoreManager, LocationManager, SockManager,getVolumSizeManager, \ - NetManager,AddrBookManager,MsgdetailManager,PhoneCallingManager,getOldHrDataManager,getStorageDataManager,getBrightnessManager,getHrTimeManager + from mgr import ConfigStoreManager, LocationManager, SockManager,getVolumSizeManager,gethistoryDataManager, \ + NetManager,AddrBookManager,MsgdetailManager,PhoneCallingManager,getStorageDataManager,getBrightnessManager,getHrTimeManager print("init8:{}".format(utime.localtime())) @@ -176,7 +173,7 @@ if __name__ == '__main__': app.append_manager(mgr.getWeatherDataManager()) app.append_manager(PhoneCallingManager()) app.append_manager(ClockManager()) - app.append_manager(getOldHrDataManager()) + app.append_manager(gethistoryDataManager()) app.append_manager(getHrTimeManager()) app.append_manager(getBrightnessManager()) app.append_manager(getStorageDataManager()) diff --git a/3.code/1.watch/2.code/main_1.py b/3.code/1.watch/2.code/main_1.py index 9f23697d..e3501ad2 100644 --- a/3.code/1.watch/2.code/main_1.py +++ b/3.code/1.watch/2.code/main_1.py @@ -77,7 +77,7 @@ if __name__ == '__main__': ui.add_screen(_ui.ContactsScreen()) from appWechat import WechatScreen,TK_ProtoCol,MESSAGE_ProtoCol,NewWechatPopupScreen ui.add_screen(WechatScreen()) - from alarm import ClkListScreen,ClockManager,NewEditClk,CLKTimeScreen,ClkPeriod,PopupAlarmScreen + from ext.alarm import ClkListScreen,ClockManager,NewEditClk,CLKTimeScreen,ClkPeriod,PopupAlarmScreen ui.add_screen(ClkListScreen()) ui.add_screen(_ui.CountdownEndScreen()) ui.add_screen(NewEditClk()) @@ -134,8 +134,8 @@ if __name__ == '__main__': import mgr as mgr print("init7:{}".format(utime.localtime())) - from mgr import ConfigStoreManager, LocationManager, SockManager,getVolumSizeManager, \ - NetManager,AddrBookManager,MsgdetailManager,PhoneCallingManager,getOldHrDataManager,getStorageDataManager,getBrightnessManager,getHrTimeManager + from mgr import ConfigStoreManager, LocationManager, SockManager,getVolumSizeManager,gethistoryDataManager, \ + NetManager,AddrBookManager,MsgdetailManager,PhoneCallingManager,getStorageDataManager,getBrightnessManager,getHrTimeManager print("init8:{}".format(utime.localtime())) @@ -173,7 +173,7 @@ if __name__ == '__main__': app.append_manager(mgr.getWeatherDataManager()) app.append_manager(PhoneCallingManager()) app.append_manager(ClockManager()) - app.append_manager(getOldHrDataManager()) + app.append_manager(gethistoryDataManager()) app.append_manager(getHrTimeManager()) app.append_manager(getBrightnessManager()) app.append_manager(getStorageDataManager()) diff --git a/3.code/1.watch/2.code/mgr.py b/3.code/1.watch/2.code/mgr.py index 307b8889..2c5803e9 100644 --- a/3.code/1.watch/2.code/mgr.py +++ b/3.code/1.watch/2.code/mgr.py @@ -513,9 +513,11 @@ class DeviceInfoManager(Abstract): self.Spo2_Need_Open = 0 self.bat_time = 0 self.sms_full_flag = 0 + self.clear_step = 0 self.old_time = 0 self.UD_time = 0 + self.UD_timeout = 7*60 print("DeviceInfoManager:1") self.gsensor = SC7A20() @@ -591,7 +593,9 @@ class DeviceInfoManager(Abstract): :return: """ + self.timer_push = self.timer_push+1 + #if self.timer_push > 10 : # EventMesh.publish("time", self.get_time()) # EventMesh.publish("battery", self.get_battery()) @@ -611,11 +615,32 @@ class DeviceInfoManager(Abstract): self.get_hr_state = EventMesh.publish("get_hr_state") self.get_spo2_state = EventMesh.publish("get_spo2_state") - # print("hr_time:{} get_hr_state:{} get_spo2_state:{}".format(hr_time,self.get_hr_state,self.get_spo2_state)) - #电量小于20%5分钟提醒一次 + hour = 0 + min = 0 + hour = date_tmp[3] + min = date_tmp[4] + + if hour == 0:#清步数 + if min <= 1: + if self.clear_step == 0: + step = EventMesh.publish("get_old_step_value") + if step > 0: + EventMesh.publish("set_old_step_value",0) + self.gsensor.reset_step() + self.clear_step = 1 + else: + if self.clear_step == 1: + self.clear_step = 0 + else: + if self.clear_step == 1: + self.clear_step = 0 + + #电量小于20% 5分钟提醒一次 battery = EventMesh.publish("screen_get_battery") self.bat_time+=10 + # print("date_tmp:{} self.bat_time:{}".format(date_tmp,self.bat_time)) + if self.bat_time > 5*60: self.bat_time = 0 if battery == 20: @@ -1198,7 +1223,7 @@ class SockManager(Abstract): self.connect() def send(self, topic, msg): - # print("send msg:{}".format(msg)) + print("TCP:send data:{}".format(msg)) self.sock.send(msg) def recv(self): @@ -1222,7 +1247,7 @@ class SockManager(Abstract): if data[-1] != 0x5d and len(data)<10*1024: #']': continue self.connect_tmp = 1 #有数据,就认为是连接状态 - print("TCP:recv:len:{} type:{}".format(len(data),type(data))) + print("TCP:recv: data:{}".format(data)) EventMesh.publish(constants.EVENT.SET_CONNECT, 1) data_str = data.decode('ascii') data_str = data_str.split(']') @@ -1572,11 +1597,13 @@ class PhoneCallingManager(Abstract): def get_phonenum(self, event, msg): return self.phonenum -#获取心率 血氧历史数据 -class getOldHrDataManager(Abstract): +#获取心率 血氧 步数历史数据 +class gethistoryDataManager(Abstract): def __init__(self): self.oldHr = 0 self.oldspo2 = 0 + self.oldstep = 0 + self.old_step = 0 self.read_data = {} check_json= ql_fs.path_exists("/ext/static/storage_file/config.json") if check_json == True : @@ -1593,9 +1620,15 @@ class getOldHrDataManager(Abstract): self.oldspo2 = self.read_data["old_spo2"] else: self.oldspo2 = 0 + old_step = str("old_step") in self.read_data.keys() + if old_step == True: + self.oldstep = self.read_data["old_step"] + else: + self.oldstep = 0 else: self.oldHr = 0 self.oldspo2 = 0 + self.oldstep = 0 def post_processor_after_instantiation(self): EventMesh.subscribe("set_old_hr_data", self.save_hr_value) @@ -1603,6 +1636,9 @@ class getOldHrDataManager(Abstract): EventMesh.subscribe("set_old_spo2_data", self.save_spo2_value) EventMesh.subscribe("get_old_spo2_data", self.get_spo2_value) + EventMesh.subscribe("get_old_step_value", self.get_old_step_value) + EventMesh.subscribe("set_old_step_value", self.set_old_step_value) + def save_hr_value(self, event, msg): if msg >= 50: self.read_data = EventMesh.publish("get_storage_data") @@ -1629,6 +1665,17 @@ class getOldHrDataManager(Abstract): def get_spo2_value(self, event, msg): return self.oldspo2 + def set_old_step_value(self, event, msg): + self.oldstep = msg + + + def get_old_step_value(self, event, msg): + step = EventMesh.publish(constants.EVENT.GET_STEP) + self.old_step = self.oldstep + step[0] + return self.old_step + + + class getWeatherDataManager(Abstract): # 获取天气数据 diff --git a/3.code/1.watch/2.code/protocol.py b/3.code/1.watch/2.code/protocol.py index 59c31937..4fb472f6 100644 --- a/3.code/1.watch/2.code/protocol.py +++ b/3.code/1.watch/2.code/protocol.py @@ -87,7 +87,7 @@ class ProtoCol(Abstract): def handler(self, event, msg): self.password = EventMesh.publish(constants.EVENT.GET_PASSWORD) - self.imei = EventMesh.publish(constants.EVENT.GET_IMEI)#"867387060319166" #EventMesh.publish(constants.EVENT.GET_IMEI)#"867387060319166"#EventMesh.publish(constants.EVENT.GET_IMEI) #"867387060319166"#EventMesh.publish(constants.EVENT.GET_IMEI) #"867387060319166"#"867387060319188"#"867387060319177"#"867387060319166"#"860132060004322"#"867387060319166"#"860132060004322"#EventMesh.publish(constants.EVENT.GET_IMEI) + self.imei = EventMesh.publish(constants.EVENT.GET_IMEI)#"867387060319166"#EventMesh.publish(constants.EVENT.GET_IMEI)#"867387060319166" #EventMesh.publish(constants.EVENT.GET_IMEI)#"867387060319166"#EventMesh.publish(constants.EVENT.GET_IMEI) #"867387060319166"#EventMesh.publish(constants.EVENT.GET_IMEI) #"867387060319166"#"867387060319188"#"867387060319177"#"867387060319166"#"860132060004322"#"867387060319166"#"860132060004322"#EventMesh.publish(constants.EVENT.GET_IMEI) self.cid = EventMesh.publish(constants.EVENT.GET_CID) self.imsi = EventMesh.publish(constants.EVENT.GET_IMSI) self.key = EventMesh.publish(constants.EVENT.GET_KEY) @@ -200,7 +200,26 @@ class KA_ProtoCol(ProtoCol): date = date[2:] #print("date:",date) #步数 - step = EventMesh.publish(constants.EVENT.GET_STEP)[0] + old_step = 0 + step = 0 + step = EventMesh.publish("get_old_step_value") + if step != 0: + read_data = EventMesh.publish("get_storage_data") + b = str("old_step_new") in read_data.keys() + if b == True: + old_step = read_data["old_step_new"] + else: + old_step = 0 + if old_step != step: + # print("old_step:send:%d %d"%(old_step,step)) + read_data["old_step"] = step + read_data["old_step_new"] = step+10 + EventMesh.publish("set_storage_data", read_data) + with open("/ext/static/storage_file/config.json","w",encoding="utf-8") as fd: + ujson.dump(read_data,fd) + + old_step = step + # step = EventMesh.publish(constants.EVENT.GET_STEP)[0] # 电池电量百分比 bat_tmp = EventMesh.publish("screen_get_battery") battery_caption = bat_tmp[1] @@ -265,7 +284,24 @@ class UD_ProtoCol(ProtoCol): bat_tmp = EventMesh.publish("screen_get_battery") battery_caption = str(bat_tmp[1]) #步数 - step = str(EventMesh.publish(constants.EVENT.GET_STEP)[0]) + old_step = 0 + step = 0 + step = EventMesh.publish("get_old_step_value") + if step != 0: + read_data = EventMesh.publish("get_storage_data") + b = str("old_step_new") in read_data.keys() + if b == True: + old_step = read_data["old_step_new"] + else: + old_step = 0 + if old_step != step: + read_data["old_step"] = step + read_data["old_step_new"] = step + EventMesh.publish("set_storage_data", read_data) + with open("/ext/static/storage_file/config.json","w",encoding="utf-8") as fd: + ujson.dump(read_data,fd) + old_step = step + # step = str(EventMesh.publish(constants.EVENT.GET_STEP)[0]) #翻转次数 turn_count = "0" #终端状态 diff --git a/3.code/1.watch/2.code/static/IMAGE_BUTTON_DELKEY.png b/3.code/1.watch/2.code/static/IMAGE_BUTTON_DELKEY.png index bc007d7892f198e79cda71d433ff0649f8673920..05b4c687887334bc457ceb94d4a7dcd068942290 100644 GIT binary patch literal 629 zcmeAS@N?(olHy`uVBq!ia0vp^K0s{5!3-o1CZ1gZr0N2ELR|kdFp!Ldh5s8H|JTy` zpOW(b&71!~@c8ln;Nbs0KL1rz{+~VjpO5cHkel|BoE`@8IzN%a{Mv)&I9_ z`Cn4D;LdK-hy+D@;lmz(&GpH{A^!Cx!-IGe(MFY9=j`mNO62id1 zIL*_=F~sBe+v_)rnhZqP9@r<`xFY3x@s{iAqqn}-ACx+vd6W6sI@@rb^mFDnJvbZ| z&0y`YP-2+bvY^6;V^M%uvS8DfjjuHiMfUtnu4jo}rxTdPrSm#x@5-EwcQr+?bgb15 zw>hoa$$2|}&W-Mv$x<8sUds%f8Z#wvPv~B+P|IV{Twwk0-qrbOI*c)4p_~04Pct|vG;QS!tGMa6Z|~aNvZUp#h>!WV-eYTne7YiRrW^jX zxt1HWNkylrr}m||@J-fcwqhP>)YNW9iA8Bv$}Bgn$WfV7k9E< z&bVGC$KQ4Bc+m?3*K8fTZ(Y|8&l0?xuxVR*&ed~|e@?S`wQ(lrG+Zw^8 ztd_O>@q53IYyZzlN;=q<*B7hKdt*bcb+fE=(E^)Fq2r&;-|Z3qt(B7wI&E8W$annVD}RiyM-;MV%nj zfo!}?wrq=_F&KkW2b9uMXlZ-Qy}Sen^m5_e!oq#NwD;csIe+&#zn=3v&wY9c!;Ri5 zIh;*`kV8NkfE6R>7yE|`pyqHmtpLCz5-BWo90b9-*y%)!pHWh5G3}!Qds#Mt zPU^7a34}SEO@*b7S`aqM%XI}aoK$Ep^8l2jCy;sz&>z7Kq=~Y$>UCV$-wF!(cF|>2_LQ z%-o?lux95EXm4%NETGNXU&N}lshas8@0fuGO@X!6)#6&q`G~>9CnmvYG{V#CnxI>@ z@>ckLKKKU*BHCv>w-YI;cSHvm<5SImU2ST>rJtRVVSgno!Pea-7>q_Ve195$wqKL< z_dJ+}w2he<^!4M^Q3pc7p=td@6Bs~+ngILtmnLc4l55M8SL3N&dn8#X6hhsZuMry` zkB2sAfrz9ruky%;80hyd3}6Chst)Y8%NNm9b5@Sk*!2yMZNc3StRIFJ41xp!f*?r8 zR~qYaxqso@!YD~bpsNonR0Y=2c2z1ZC9|QJNe^$?io5Q;ZvvRM)@HOgt7O4Pt0bBE zoXwJxt}3vv4%;yl@XH1{S+IKD?a17=YwWaGp5K)pg}eKPtgmPRqcGll$7=dORbZz- z`xt$$ZrLEm3zjFZl3>Ng#ZR#Fc|E8)@g=!sI_keDdx|M{x}F~(RV-?mmd_Vo7P%;!fC4u|G@(Ep~`YOMzPgYqdBl>LDLx6ahut+WBhNWS%!_? zM9WMQ7r5f1RpPQ+=8~jS+cMk(2;XnF*7<*fr71;*SMiiEU)xLs(KyRFr9A$!G!Gx_rKgPH$*OKVB%~D#-X^r>wngw zqN1Q2Eb;nc2IgX5kIihVoC&D0m3~2~qmKwnl^EU3+L5gKf&^i|xLu<(7V!X*t`Q&4(R>{RBG2gc93c(}lVAL3$~;z+P5D zAj@2xEfjkZ5`cOJl@G#q;(fC@@=CU?f{shTMxbpYAP-C%K$y5+tiWNkqzoP+ke7je v0{;!Bb{4peSvc=!Z@t}Ok>8A)MQ8s9mgEQ`PuXD900000NkvXXu0mjf5M5rd diff --git a/3.code/1.watch/2.code/static/IMAGE_BUTTON_DIAL.png b/3.code/1.watch/2.code/static/IMAGE_BUTTON_DIAL.png index 1bd304a827ff3aaac1b18fc6d9615a0c9b15eb0c..df9dd1004741b7d7d43ddeb4f511768432fdd54e 100644 GIT binary patch delta 719 zcmdnSb&GX^c)bw^GXn#|!NjvGfYgKlpAc7u{|uxem;WyF|Ia`A|LB(gTk`(rasTID z`+x2K|NkHVe{A#LM*6?>wg1HpHV|KG;^k4gQXTKT`S=YP+w|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V^T8w{edkE_cebSf3D(_2V9W0tV#4myr`$)_6T3f2Kbt zpwaQN#B+o3;+Jox#cC!X$Hpu0M2y4nFgu%sMZv$#oiv}@Lv-9x0wPQeC_5#f9^%5< kt16D;&X_XN#f8&90k^eT(PoA~UjP6A07*qoM6N<$g3&(Ao&W#< diff --git a/3.code/1.watch/2.code/static/IMAGE_NUMBER_KEY5_ICON.png b/3.code/1.watch/2.code/static/IMAGE_NUMBER_KEY5_ICON.png index 90acbc7f25288a09bd45a110559689f65da86fc0..37ffa53cacf641ea97e0becf33b75d5da9093c2a 100644 GIT binary patch delta 617 zcmV-v0+#*t2lWJy7k@Gc1ONa4T(l zo>GZ@o+-2&LZ1N)WhWLulXuE?m=bvv_gJBIt#x4ml&GpcyDr)oiNQ8}>UTT=SE7N1 zi$i6}*5$y!4wQ8!Twtb(z#=d|oi%)37{}VVo=@r<*?+04%K9}-ur#TbRp|jXrmVw0 z{B=t>ln<)P722p3BhS zX6t&6X~y|Y4S+05-0`&fKw0Enyt~+9MlAq`S!T7ZTKI1SqfS~cPn zZ8K<9jO8cT4&iUXnZ);6<~>)qs7=|}P=k*=*xdgMVHsxM4FIhE00000NkvXXu0mjf Du{I+* delta 1004 zcmVq`_-7{;G>Z*22Dy)$Sa6Fe!6;?+B z2&+eys|ub+BURY!9)OH0j*$uQJUmokbMPZeRfUg$3QS@xCvZbsLKcj*1v1JY<< z3XjB;>G7DeI2FdQaEbQhmj_LSjWwFk+vEAGL$D|s7Yeve$fOKFvFNJn74EpVq#}NXE4C!?7-9ecj4}K3g%^7LYdbNiUNE4vfVqmvo_9X0-N-QYi%t} zczE-=aDOU&eGU?m7ltm*UyY%1D~@uslf46^y_O3ev)+%DmG&W>G*t@afI#@yejzl2w9&jb+0 z@Cfg6fjz1wB6N3rz@ys@V3)72MNKgyYg>`5RU;*sqQH8-xKVfd7+4jFX&S8-*@Zh1 zIe%%g7`b0GiUMPf*lV_1moK2dxA&h0*=x0ooIFgOKGQEC#0FIy7)!M8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~be{TAXm<$%EHFNf1I%3`J_VR2DG5byZxJeY34b*X`|W%O&NkMo?#jx}g()X5 zI$3*)Z{?oD0)YSyRXgCj^oBsnM|4gW9UyY!gNi zuQ$#_{_Af|aF2Iz0LN;+1e=sA36~HQy|aa@%YV2y>{7QIXHL|qPFZeUjr3(~cW+|( z?{bgjm9A+Ryp!D@$kFTqpHMp%&~2}SRI7_#|335r~jJ`?8JUxOQ0{~m|UOqs1D^Lg{rAj>lPu3W~s z<_2{YgFW+H<_pMK{pyq867n0|fDPU5$A9r}tHGA0BPndGwr0ad=nOL=36EL~H(*TB z&FfdueB^uhAFQ;7Qpsik)`Io1J(mo^@%w!ErTu60Ug*Zi@bJHw8H}^=e3l7|&DluQ zh_Thi)nWgn!}1nebshE$DL*q;vCcrWA`CFmz=Wy~DXVmP2!VKirGNyL<4$FEM{END z;Ws%G5KO2l$&ee#$CZx41VSQT$(u$3A9qz{8Yol_1((?!HUhHkaev@xdLNZxt6+zM zgQ9lWK3hj5x|M*K*_z(dBz6i~*g=nWO6jhO(h}w1^gZvArO|NjC&2&!002ovPDHLk FV1krHC58Y1 diff --git a/3.code/1.watch/2.code/static/IMAGE_NUMBER_KEY7_ICON.png b/3.code/1.watch/2.code/static/IMAGE_NUMBER_KEY7_ICON.png index db21533541f51a519842b44b6d6c88ad161eabdb..86893a4b31e6367cbfde1f96a4f77c51df38bae2 100644 GIT binary patch delta 495 zcmV2mAw&7k@Gc1ONa4T(LyNAPW0EBbc$0jn+p$Jv%R$hW|4mC{1P4h!ttR)MFSbvV2{6z{s7G0r_=-GK>K_70Zdf%(@z*tlXoV@3xO+rilWQ{PdfCcp zOp(9T1h!7DjZaNr^W5mJxkQBrutjnWO<=1?lRwu5 zHc%UpCa_s@F3~CuX4k`-CNLANJv?awGxhL6V45J9sfW*+z)F^PjS5jPQxDyvLKMu@ zL-(i<1hea*dsGO5nR?h2hzdb4lVNW%17*PMdU&M?tY~QYYfWIL9=1fHLJZ8*!y6$i z5iq+R-s=JzNGd7-fiH@{2hRGgBZdW}5V`&vITgeqMF~`W%ym{Z2y?hl_*-xzdDkf% lBa191;-={+e!$#kR+DWLmH(10pUaI_K>w(NkjxuW_A-Y$+e3}UU0ind5glN zw3IZrR(B?5HqS#X?XJ1(FPh)Wz@G0pe7~PLbCx-07@Wll4S%QfOc3@lAPzwI&)@&| z%K*TdMbTj{DcD~LKw>hH;!^W5FckdnbpDuMg5hX>?qODBH0c@GRTY+d0-_}9S#hb^ z0)}Mwa#bNosAt7S(-6QyR2=RJND_uvvC%BKm#T_!0xB>s=YrpW_4W3^`l#MZyH0ta zR*R%`{e=4dZGR`f0qg1RK>dx13HjFsPlG<^;Dq}AZ6_6&mjuZGi(IxsdDL9hsQo)S zpILcRaOiYoWaoJqb#mlnfTi!u!Soq3U8ZV((u$_K8r~MYay88f@Ns08_O= zo^F4HOcGdQZ8f@{KjAsz zQ#K-US&TQie5NG_Y;4qy%CjdhX16P$1EvH*pMP^exl$-{z`9;MMdRJuoQ=GT5ucJq zftBKc9I)Doi}={{jsr^Bwga>0El`2EA}};KfSc#dyeTwn2GV!sfHCE~nM9GAVb+HG zc;3{&!NevcWBHo3BtVUuAOlPkMO;6361L%C=UTxSblG_b4hdC(xgzlXO(!hZukfaM zOMfD$_FN3`QC0C#}NZI$&Xf!G? zR|H_BC+T@#>OBo`s1Yu&_EFA%`Q@Fn7cbmrJWU(n!hjxTL0Zt z==|bC`P`|xg@}$BwYI6gbhH8D2m5R3ic}>PX7Q7M`h7%v6h$s0000< KMNUMnLSTYOZPrHs diff --git a/3.code/1.watch/2.code/static/IMAGE_NUMBER_KEY8_ICON.png b/3.code/1.watch/2.code/static/IMAGE_NUMBER_KEY8_ICON.png index 9d58122f4907f038db0578a0293e572e7e7d0597..13ffa6b0a879137e874d2c3cb2705f934aaaffcb 100644 GIT binary patch delta 790 zcmV+x1L^$D3ZMp%7k@Gc1ONa4T(HB!U_x>M#d++yt@688^FtZHPMt@^ifi>bFtnWN34YoKg0E=aI|56!>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c#J-s1eF%+uUMe1D$7KSnx3gV% zG8!T+_kRd{{n!4xo{aH_8Z=$_T5OJpPeMdof>~oy377zT(Elqs8m@|-;$J$5;P42O z9)G)g2c3=eV&4nthwyaRE~$8!9hV8PIqeMUYAWgRk}yHfE!&WO_ze)EFq$yOacKDN zET+c)delyknSUJ4u5M3ox8?>aDnfx0x!wli#{uI&=9~FUG zONpv9|S z&@)DWMurB3hl4>!|KkoFJqBktnLQ=DZ#080M?=J>q$4D9x5?E;byRPNu-$tQos`OK zWirXI`g1jyo){NQEA8x%d+Y<)*eFdxSbtqv#`&tx#Vqsi@kK^nzPx~4Jbem_^K*h} z4{u*&99bX0l{3|ton9+H9Gsky{m%RH0(QBk0`uA#!8ARJrq%m;QTyc=LLp1T$<+;6 z`33R<)>L~A<0HeO=>xC71$QqWlMwzH`x6b{o)P{o=5`6puz=PId z8ruBhr4lNblobX) z^jz##^EK#KSJ$awEYMQeSc0u6qXIm6d0W%Jsay+--Kpp5W2+$qgm6~0HiN$DIiB@7v}FFpZt+F4Y19SJ(kRY6qQwJ34x0xV!3OC z>rO@GmDdT#Ub(}t#6J(dg?wCAnPo%B;}?IHd{d?xp3`Ru*I|mvD@zH;2|$^0u*f#Y zqqKxx3O1-umR9Ey1@|EVp$AiIuWqbCFMo7#9QRpCVS#XQ`ak-@?a|7;#bp2h002ov JPDHLkV1oV+f6)K{ diff --git a/3.code/1.watch/2.code/static/IMAGE_NUMBER_KEY9_ICON.png b/3.code/1.watch/2.code/static/IMAGE_NUMBER_KEY9_ICON.png index 856baa3bfc3239bbe1cfd4a92d8a1b3f22fcf4e5..4bc6134c3ee4008179ae7da8a0f1e5fac336a330 100644 GIT binary patch delta 644 zcmV-~0(<@E2#^Jk7k@Gc1ONa4T(9AmXfBrH+z#Iv%iaB_|M4DQe)-?az3=5bh)Ud}!hVXOU%ck-a(~N5FllGsckyH7B?U z7p#znBe0;#qSGpI01LU(y?ti+PG}BbHwLgewCN0>U9+xkz4#aK#V4%GiVCPum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()_Jq5$&kGMjQ+l3SRZQQTgx)bwa<3dM3Vo!x#Rzl8jfwSSz+&CV;hezA@Dx<#pYb<+oO z@`56O9dF!&zdU0ML}}&gNY7c$q5O3A6mIo)F+Ve}0ISO@BO91+Vgk)JD~C||?uSU$ zr*Qvt(*ZdD7-W87*~`c+Dvms00ly#Jm)n_e@56`aztO`XWaY0!lvd0A+r8cJc_)~k znvscwq<>^2>Ga6R&65S3ET5#$>qT>eW!8ezvvW}zG%?J&qggamfk}iW3oyDEbq-Db zF7;f#0O!!}?4B+uvQ`vw34^!$K-Xy0<}XOZi?0~ieN1c|7CxzyC^aETLf1NYzz(i4m-{)fxJfkkO9^A_T8Mo}f6Z2xY-+E{tJns8^ z^rdAj1JP)p4Vp#gFj!{QH0;3s%QGY;tOAob&cY6ievXcoW|pRV#EFUVadsaUpMdy< z|9|`)I{v_eG1mxtr;UzAvVIY}Pg#904wjc1-+%B5UvZNWg_P3Gqm zzJQ{&<#Ui3x~8%L8~1o{tnn+ZgwBw`m4DRl5AKEQ&tdkSRw!ttLJ1}tu)70yaPHVQ zi~-$jZ`x4}LNv^$>oU66q?>eV07*qoM6N<$f(!pc AUH||9 diff --git a/3.code/1.watch/2.code/static/IMAGE_NUMBER_KEYSTAR_ICON.png b/3.code/1.watch/2.code/static/IMAGE_NUMBER_KEYSTAR_ICON.png index 0e847382cb52a24ae3c31dfb3b630dbfc0e5f472..c3e133f2897826816e42e1dcfe8bf7748bd5bb89 100644 GIT binary patch delta 613 zcmV-r0-F7e3GoDw7k@Gc1ONa4T(po_Ck?On!ICJ<5HTynp=OC-42<@BJR9fjQ0!kI15iY=4@(uKm!=agN9(P2-bA zd1P{p2T5~uNhhzF=gMrNTXsfCEXZb(Cb&r{SPGVcsir&em?>g9m0e&KYx_mYl2X z#kydJeZd@}6$2Ee(;S1BoUkr9 znIa#1)`it_l}~(qQ@)rtK(IO&9;mnMx$3LDqvNVuY!3^p&7m{t8p~bL>X=vTI`DPL z6jJBkpp4F8$o0H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? z1*QU%NkFEYG`2WL2tnj?joOkD;M<)V?T$+Xq*`SqO+bX$PCjpO)M*I$Nm{NdL>jK+ zn}Qqd4jTbEs3J*BfQqm+vrWNK$syaZcZonhB_QPhX8$fXGw25Z{7ET2(%f)>Z=8M# X{PEk-S%$~x00000NkvXXu0mjf7tKEs diff --git a/3.code/1.watch/2.code/ui.py b/3.code/1.watch/2.code/ui.py index b0a4694a..0cc01257 100644 --- a/3.code/1.watch/2.code/ui.py +++ b/3.code/1.watch/2.code/ui.py @@ -206,7 +206,8 @@ class Screen(Abstract): pass PHONE_CALL_MAX_DATA = 22 -line_points = [{"x":0,"y":0},{"x":0,"y":35}] + +phone_line_points = [{"x":0,"y":0},{"x":0,"y":40}] phone_screen = None phone_line = None phone_label = None @@ -254,15 +255,15 @@ class PhoneScreen(Screen): phone_screen.add_style(style_screen, lv.PART.MAIN | lv.STATE.DEFAULT) phone_line = lv.line(phone_screen) - phone_line.set_points(line_points,2) - phone_line.set_pos(235,58) - phone_line.set_size(2,35) + phone_line.set_points(phone_line_points,2) + phone_line.set_pos(235,8) + phone_line.set_size(2,40) phone_line.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF) phone_line.add_style(style_line,0) phone_label = lv.label(phone_screen) - phone_label.set_pos(0, 45) - phone_label.set_size(0, 55) + phone_label.set_pos(0, 14) + phone_label.set_size(0, 48) phone_label.set_text(" ") phone_label.add_style(style_font_youyuan_40, lv.PART.MAIN | lv.STATE.DEFAULT) phone_label.set_long_mode(lv.label.LONG.CLIP) @@ -272,91 +273,92 @@ class PhoneScreen(Screen): phone_one.set_src("E:/static/IMAGE_NUMBER_KEY1_ICON.png") phone_one.add_flag(lv.obj.FLAG.CLICKABLE) phone_one.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_one.set_pos(3, 100) + phone_one.set_pos(3, 60) + phone_one.set_size(76, 50) phone_two = lv.img(phone_screen) - phone_two.set_size(76, 40) + phone_two.set_size(76, 50) phone_two.set_src("E:/static/IMAGE_NUMBER_KEY2_ICON.png") phone_two.add_flag(lv.obj.FLAG.CLICKABLE) phone_two.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_two.set_pos(82, 100) + phone_two.set_pos(82, 60) phone_three = lv.img(phone_screen) - phone_three.set_size(76, 40) + phone_three.set_size(76, 50) phone_three.set_src("E:/static/IMAGE_NUMBER_KEY3_ICON.png") phone_three.add_flag(lv.obj.FLAG.CLICKABLE) phone_three.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_three.set_pos(161, 100) + phone_three.set_pos(161, 60) phone_four = lv.img(phone_screen) - phone_four.set_size(76, 40) + phone_four.set_size(76, 50) phone_four.set_src("E:/static/IMAGE_NUMBER_KEY4_ICON.png") phone_four.add_flag(lv.obj.FLAG.CLICKABLE) phone_four.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_four.set_pos(3, 142) + phone_four.set_pos(3, 112) phone_five = lv.img(phone_screen) - phone_five.set_size(76, 40) + phone_five.set_size(76, 50) phone_five.set_src("E:/static/IMAGE_NUMBER_KEY5_ICON.png") phone_five.add_flag(lv.obj.FLAG.CLICKABLE) phone_five.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_five.set_pos(82, 142) + phone_five.set_pos(82, 112) phone_six = lv.img(phone_screen) - phone_six.set_size(76, 40) + phone_six.set_size(76, 50) phone_six.set_src("E:/static/IMAGE_NUMBER_KEY6_ICON.png") phone_six.add_flag(lv.obj.FLAG.CLICKABLE) phone_six.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_six.set_pos(161, 142) + phone_six.set_pos(161, 112) phone_seven = lv.img(phone_screen) - phone_seven.set_size(76, 40) + phone_seven.set_size(76, 50) phone_seven.set_src("E:/static/IMAGE_NUMBER_KEY7_ICON.png") phone_seven.add_flag(lv.obj.FLAG.CLICKABLE) phone_seven.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_seven.set_pos(3, 184) + phone_seven.set_pos(3, 164) phone_eight = lv.img(phone_screen) - phone_eight.set_size(76, 40) + phone_eight.set_size(76, 50) phone_eight.set_src("E:/static/IMAGE_NUMBER_KEY8_ICON.png") phone_eight.add_flag(lv.obj.FLAG.CLICKABLE) phone_eight.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_eight.set_pos(82, 184) + phone_eight.set_pos(82, 164) phone_nine = lv.img(phone_screen) - phone_nine.set_size(76, 40) + phone_nine.set_size(76, 50) phone_nine.set_src("E:/static/IMAGE_NUMBER_KEY9_ICON.png") phone_nine.add_flag(lv.obj.FLAG.CLICKABLE) phone_nine.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_nine.set_pos(161, 184) + phone_nine.set_pos(161, 164) phone_start = lv.img(phone_screen) - phone_start.set_size(76, 40) + phone_start.set_size(76, 50) phone_start.set_src("E:/static/IMAGE_NUMBER_KEYSTAR_ICON.png") phone_start.add_flag(lv.obj.FLAG.CLICKABLE) phone_start.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_start.set_pos(3, 226) + phone_start.set_pos(3, 216) phone_zero = lv.img(phone_screen) - phone_zero.set_size(76, 40) + phone_zero.set_size(76, 50) phone_zero.set_src("E:/static/IMAGE_NUMBER_KEY0_ICON.png") phone_zero.add_flag(lv.obj.FLAG.CLICKABLE) phone_zero.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_zero.set_pos(82, 226) + phone_zero.set_pos(82, 216) phone_hash = lv.img(phone_screen) - phone_hash.set_size(76, 40) + phone_hash.set_size(76, 50) phone_hash.set_src("E:/static/IMAGE_NUMBER_KEYHASH_ICON.png") phone_hash.add_flag(lv.obj.FLAG.CLICKABLE) phone_hash.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_hash.set_pos(161, 226) + phone_hash.set_pos(161, 216) phone_call = lv.img(phone_screen) - phone_call.set_size(76, 40) + phone_call.set_size(76, 50) phone_call.set_src("E:/static/IMAGE_BUTTON_DIAL.png") phone_call.add_flag(lv.obj.FLAG.CLICKABLE) phone_call.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_call.set_pos(3, 268) + phone_call.set_pos(3, 270) phone_call_btn = lv.img(phone_screen) phone_call_btn.set_size(76, 52) @@ -364,11 +366,11 @@ class PhoneScreen(Screen): phone_call_btn.set_pos(3, 268) phone_contact = lv.img(phone_screen) - phone_contact.set_size(64, 40) + phone_contact.set_size(64, 50) phone_contact.set_src("E:/static/IMAGE_BUTTON_DIAL_CONTACT.png") phone_contact.add_flag(lv.obj.FLAG.CLICKABLE) phone_contact.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_contact.set_pos(87, 268) + phone_contact.set_pos(87, 270) phone_contact_btn = lv.img(phone_screen) phone_contact_btn.set_size(76, 52) @@ -376,11 +378,11 @@ class PhoneScreen(Screen): phone_contact_btn.set_pos(87, 268) phone_delete = lv.img(phone_screen) - phone_delete.set_size(76, 40) + phone_delete.set_size(76, 50) phone_delete.set_src("E:/static/IMAGE_BUTTON_DELKEY.png") phone_delete.add_flag(lv.obj.FLAG.CLICKABLE) phone_delete.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) - phone_delete.set_pos(161, 268) + phone_delete.set_pos(161, 270) phone_delete_btn = lv.img(phone_screen) phone_delete_btn.set_size(76, 52) @@ -592,8 +594,8 @@ class PhoneScreen(Screen): len_t = len(self.phone_list)*40 if len_t > 230: len_t = 230 - phone_label.set_size(len_t,45) - phone_label.set_pos(230-len_t,60) + phone_label.set_size(len_t,48) + phone_label.set_pos(230-len_t,14) phone_label.set_text(self.phone_num) def done_return(self): @@ -1141,7 +1143,7 @@ class PopupScreen(Screen): 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.jpg") + msg_list_t_done_img.set_src("E:/static/IMAGE_NOTICE_NONE.png") msg_list_t_done_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT) no_msg_text = lv.label(msg_list_t) @@ -2009,56 +2011,57 @@ class WeatherScreen(Screen): weather_detail_label,weather_location_label,no_connect_label ,no_connect_label1 connect = EventMesh.publish(constants.EVENT.GET_CONNECT) #获取网络状态 self.weather_data = EventMesh.publish("get_weather_data") - if connect != 0: - no_data = self.weather_data[8] - if no_data != 0: - no_weather_img.add_flag(lv.obj.FLAG.HIDDEN) - weather_img.clear_flag(lv.obj.FLAG.HIDDEN) - no_connect_label.set_text(" ") - no_connect_label1.set_text(" ") - # print("self.weather_data:{}".format(self.weather_data)) - type = self.weather_data[3] - if type == None: - weather_img.set_src("E:/static/update.png")#天气类型 - else: - weather_img.set_src("E:/static/{}_weather.png".format(type))#天气类型 + if weather_screen != None: + if connect != 0 and self.weather_data != None: + no_data = self.weather_data[8] + if no_data != 0 : + no_weather_img.add_flag(lv.obj.FLAG.HIDDEN) + weather_img.clear_flag(lv.obj.FLAG.HIDDEN) + no_connect_label.set_text(" ") + no_connect_label1.set_text(" ") + # print("self.weather_data:{}".format(self.weather_data)) + type = self.weather_data[3] + if type == None: + weather_img.set_src("E:/static/update.png")#天气类型 + else: + weather_img.set_src("E:/static/{}_weather.png".format(type))#天气类型 - temp = self.weather_data[4] - if temp == None: - weather_tem_label.set_text("_ _") - else: - weather_tem_label.set_text("{}".format(temp)) + temp = self.weather_data[4] + if temp == None: + weather_tem_label.set_text("_ _") + else: + weather_tem_label.set_text("{}".format(temp)) - date = self.weather_data[0] - if date != '{}': - date_month = date.split('-')[1] - date_day = date.split('-')[2] - weather_detail_label.set_text("{}/{}".format(date_month,date_day))#天气更新时间 - else: + date = self.weather_data[0] + if date != '{}': + date_month = date.split('-')[1] + date_day = date.split('-')[2] + weather_detail_label.set_text("{}/{}".format(date_month,date_day))#天气更新时间 + else: + weather_detail_label.set_text("-/-") + + city = self.weather_data[7] + if city != '{}': + weather_location_label.set_text("{}".format(city))#城市 + else: + weather_location_label.set_text("--") + else:#已联网未获取到天气数据 + weather_location_label.set_text(" ") weather_detail_label.set_text("-/-") + weather_tem_label.set_text("_ _") - city = self.weather_data[7] - if city != '{}': - weather_location_label.set_text("{}".format(city))#城市 - else: - weather_location_label.set_text("--") - else:#已联网未获取到天气数据 + no_connect_label.set_text("未获取网络数据") + no_connect_label1.set_text("请稍候重试") + + else: weather_location_label.set_text(" ") weather_detail_label.set_text("-/-") weather_tem_label.set_text("_ _") - - no_connect_label.set_text("未获取网络数据") - no_connect_label1.set_text("请稍候重试") - - else: - weather_location_label.set_text(" ") - weather_detail_label.set_text("-/-") - weather_tem_label.set_text("_ _") - - no_weather_img.clear_flag(lv.obj.FLAG.HIDDEN) - weather_img.add_flag(lv.obj.FLAG.HIDDEN) - no_connect_label.set_text("找不到服务器") - no_connect_label1.set_text("请联网后重试") + + no_weather_img.clear_flag(lv.obj.FLAG.HIDDEN) + weather_img.add_flag(lv.obj.FLAG.HIDDEN) + no_connect_label.set_text("找不到服务器") + no_connect_label1.set_text("请联网后重试") def done_return(self): EventMesh.publish("load_screen", {"screen": "toolbox"}) diff --git a/3.code/1.watch/2.code/ui_WatchFaceScreen.py b/3.code/1.watch/2.code/ui_WatchFaceScreen.py index 1cb64da2..a09b73ce 100644 --- a/3.code/1.watch/2.code/ui_WatchFaceScreen.py +++ b/3.code/1.watch/2.code/ui_WatchFaceScreen.py @@ -11,11 +11,21 @@ import ujson from ui_main_menu import MainMenu2_Watchface -style_font_youyuan_20 = lv.style_t() -style_font_youyuan_20.init() -style_font_youyuan_20.set_text_color(lv.color_make(0xff, 0xff, 0xff)) -style_font_youyuan_20.set_text_font_v2("font_22.bin",22,0) +# style_font_youyuan_20 = lv.style_t() +# style_font_youyuan_20.init() +# style_font_youyuan_20.set_text_color(lv.color_make(0xff, 0xff, 0xff)) +# style_font_youyuan_20.set_text_font_v2("font_22.bin",22,0) +watchface_style_default = lv.style_t() +watchface_style_default.init() +watchface_style_default.set_text_color(lv.color_make(0xff, 0xff, 0xff)) +watchface_style_default.set_text_font_v2("font_22.bin",22,0) + + +style_font_youyuan_28 = lv.style_t() +style_font_youyuan_28.init() +style_font_youyuan_28.set_text_color(lv.color_make(0xFF, 0xFF, 0xFF)) +style_font_youyuan_28.set_text_font(lv.font_28_dial) Watchface = lv.obj() @@ -80,7 +90,7 @@ style_font_youyuan_70_black.set_text_color(lv.color_make(0x32, 0xc8, 0xdb)) style_font_youyuan_70_black.set_text_font(lv.font_70_bold) watchface1_time1_text = lv.label(Watchface1) -watchface1_time1_text.set_pos(20, 60) +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("12:00") @@ -88,27 +98,27 @@ watchface1_time1_text.add_style(style_font_youyuan_70_black, lv.PART.MAIN|lv.STA #日期 watchface1_date_span = lv.label(Watchface1) -watchface1_date_span.set_pos(24, 131) -watchface1_date_span.set_size(84, 30) +watchface1_date_span.set_pos(24, 118) +watchface1_date_span.set_size(140, 30) watchface1_date_span.set_align(lv.TEXT_ALIGN.LEFT) watchface1_date_span.set_text("12月9日") -watchface1_date_span.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) +watchface1_date_span.add_style(style_font_youyuan_28, lv.PART.MAIN|lv.STATE.DEFAULT) #星期 watchface1_week_span = lv.label(Watchface1) -watchface1_week_span.set_pos(24, 163) -watchface1_week_span.set_size(70, 30) +watchface1_week_span.set_pos(24, 153) +watchface1_week_span.set_size(100, 30) watchface1_week_span.set_align(lv.TEXT_ALIGN.LEFT) watchface1_week_span.set_text("星期四") -watchface1_week_span.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) +watchface1_week_span.add_style(style_font_youyuan_28, lv.PART.MAIN|lv.STATE.DEFAULT) watchface1_step_span = lv.label(Watchface1) -watchface1_step_span.set_pos(170, 163) -watchface1_step_span.set_size(70, 30) +watchface1_step_span.set_pos(158, 154) +watchface1_step_span.set_size(78, 30) watchface1_step_span.set_align(lv.TEXT_ALIGN.LEFT) watchface1_step_span.set_text("0") -watchface1_step_span.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) +watchface1_step_span.add_style(style_font_youyuan_28, lv.PART.MAIN|lv.STATE.DEFAULT) @@ -117,7 +127,7 @@ watchface1_HB_span.set_pos(55, 235) watchface1_HB_span.set_size(80, 30) watchface1_HB_span.set_align(lv.TEXT_ALIGN.LEFT) watchface1_HB_span.set_text("0") -watchface1_HB_span.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) +watchface1_HB_span.add_style(style_font_youyuan_28, lv.PART.MAIN|lv.STATE.DEFAULT) @@ -126,7 +136,7 @@ watchface1_SPO2_span.set_pos(160, 235) watchface1_SPO2_span.set_size(80, 30) watchface1_SPO2_span.set_align(lv.TEXT_ALIGN.LEFT) watchface1_SPO2_span.set_text("0") -watchface1_SPO2_span.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) +watchface1_SPO2_span.add_style(style_font_youyuan_28, lv.PART.MAIN|lv.STATE.DEFAULT) class WatchFace1(): @@ -160,9 +170,10 @@ class WatchFace1(): if spo2Value : self.__oldSpo2Value(None, spo2Value) # print("main get_step msg:{}".format(msg)) - step = EventMesh.publish(constants.EVENT.GET_STEP) - if step : - self.__stepValue(None, step[0]) + + # step = EventMesh.publish(constants.EVENT.GET_STEP) + step = EventMesh.publish("get_old_step_value") + self.__stepValue(None, step) def timerout_update(self): @@ -188,9 +199,9 @@ class WatchFace1(): if spo2Value : self.__oldSpo2Value(None, spo2Value) # print("main get_step msg:{}".format(msg)) - step = EventMesh.publish(constants.EVENT.GET_STEP) - if step : - self.__stepValue(None, step[0]) + # step = EventMesh.publish(constants.EVENT.GET_STEP) + step = EventMesh.publish("get_old_step_value") + self.__stepValue(None, step) def __time(self, event, msg): #时间 @@ -227,7 +238,10 @@ class WatchFace1(): watchface1_SPO2_span.set_text(str(msg)) def __stepValue(self, event, msg): - watchface1_step_span.set_text(str(msg)) + if msg == None: + watchface1_step_span.set_text("0") + else: + watchface1_step_span.set_text(str(msg)) def Close(self): pass @@ -294,69 +308,49 @@ style_font_youyuan_70_red.set_text_font(lv.font_70_bold) x = 30 y = 80 watchface2_time1_hour1_text = lv.label(Watchface2) -watchface2_time1_hour1_text.set_pos(40, 80) +watchface2_time1_hour1_text.set_pos(10, 80) watchface2_time1_hour1_text.set_size(50, 70) watchface2_time1_hour1_text.set_align(lv.TEXT_ALIGN.LEFT) watchface2_time1_hour1_text.set_text("1") watchface2_time1_hour1_text.add_style(style_font_youyuan_70_red, lv.PART.MAIN|lv.STATE.DEFAULT) watchface2_time1_hour2_text = lv.label(Watchface2) -watchface2_time1_hour2_text.set_pos(90, 80) +watchface2_time1_hour2_text.set_pos(55, 80) watchface2_time1_hour2_text.set_size(50, 70) watchface2_time1_hour2_text.set_align(lv.TEXT_ALIGN.LEFT) watchface2_time1_hour2_text.set_text("2") watchface2_time1_hour2_text.add_style(style_font_youyuan_70_red, lv.PART.MAIN|lv.STATE.DEFAULT) watchface2_time2_min1_text = lv.label(Watchface2) -watchface2_time2_min1_text.set_pos(40, 156) +watchface2_time2_min1_text.set_pos(10, 156) watchface2_time2_min1_text.set_size(50, 70) watchface2_time2_min1_text.set_align(lv.TEXT_ALIGN.LEFT) watchface2_time2_min1_text.set_text("0") watchface2_time2_min1_text.add_style(style_font_youyuan_70_red, lv.PART.MAIN|lv.STATE.DEFAULT) watchface2_time2_min2_text = lv.label(Watchface2) -watchface2_time2_min2_text.set_pos(90, 156) +watchface2_time2_min2_text.set_pos(55, 156) watchface2_time2_min2_text.set_size(50, 70) watchface2_time2_min2_text.set_align(lv.TEXT_ALIGN.LEFT) watchface2_time2_min2_text.set_text("0") watchface2_time2_min2_text.add_style(style_font_youyuan_70_red, lv.PART.MAIN|lv.STATE.DEFAULT) -# create style watchface2_style_default -# watchface2_style_default = lv.style_t() -# watchface2_style_default.init() -# watchface2_style_default.set_radius(0) -# watchface2_style_default.set_bg_color(lv.color_make(0x21,0x95,0xf6)) -# watchface2_style_default.set_bg_grad_color(lv.color_make(0x21,0x95,0xf6)) -# watchface2_style_default.set_bg_grad_dir(lv.GRAD_DIR.NONE) -# watchface2_style_default.set_bg_opa(0) -# watchface2_style_default.set_border_color(lv.color_make(0x00,0x00,0x00)) -# watchface2_style_default.set_border_width(0) -# watchface2_style_default.set_border_opa(255) -# watchface2_style_default.set_pad_left(0) -# watchface2_style_default.set_pad_right(0) -# watchface2_style_default.set_pad_top(0) -# watchface2_style_default.set_pad_bottom(0) -# watchface2_style_default.set_text_font_v2("font_22.bin",22,0) #将外部字体库与该style对象绑定 - -watchface2_style_default = lv.style_t() -watchface2_style_default.init() -watchface2_style_default.set_text_color(lv.color_make(0xff, 0xff, 0xff)) -watchface2_style_default.set_text_font_v2("font_22.bin",22,0) + #日期 watchface2_date_span = lv.label(Watchface2) -watchface2_date_span.set_pos(30+56+20+56, 100) -watchface2_date_span.set_size(84, 35) +watchface2_date_span.set_pos(30+56+20+6, 90) +watchface2_date_span.set_size(240-(30+56+20+6), 35) watchface2_date_span.set_align(lv.TEXT_ALIGN.LEFT) watchface2_date_span.set_text("12月9日") -watchface2_date_span.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) +watchface2_date_span.add_style(style_font_youyuan_28, lv.PART.MAIN|lv.STATE.DEFAULT) #星期 watchface2_week = lv.img(Watchface2) -watchface2_week.set_pos(int(30+15),int(y+20+56+56+30)) +watchface2_week.set_pos(int(30+56+20+25),int(y+56+30)) watchface2_week.set_size(90,30) watchface2_week.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF) watchface2_week.set_src("E:/static/watch_plate/style_2/week/0_week.png") @@ -364,34 +358,19 @@ watchface2_week.add_style(style_watchface_img_default, lv.PART.MAIN|lv.STATE.DEF -#天气 -watchface2_temp_img = lv.img(Watchface2) -watchface2_temp_img.set_pos(int(x+56+56+20),int(y+56+20)) -watchface2_temp_img.set_size(65,45) -watchface2_temp_img.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF) -watchface2_temp_img.set_src("E:/static/watch_plate/style_2/0_main2_weather.png") -watchface2_temp_img.add_style(style_watchface_img_default, lv.PART.MAIN|lv.STATE.DEFAULT) - -watchface2_temp_degree = lv.img(Watchface2) -watchface2_temp_degree.set_pos(int(x+56+56+65),int(215)) -watchface2_temp_degree.set_size(10,10) -watchface2_temp_degree.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF) -watchface2_temp_degree.set_src("E:/static/watch_plate/style_2/degree.png") -watchface2_temp_degree.add_style(style_watchface_img_default, lv.PART.MAIN|lv.STATE.DEFAULT) - -watchface2_temp_txt = lv.label(Watchface2) -watchface2_temp_txt.set_pos(int(x+56+56+39),int(215)) -watchface2_temp_txt.set_size(240-(x+56+56+34),30) -watchface2_temp_txt.set_align(lv.TEXT_ALIGN.LEFT) -watchface2_temp_txt.set_text("00") -watchface2_temp_txt.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) - -watchface2_no_temp_txt = lv.label(Watchface2) -watchface2_no_temp_txt.set_pos(30+56+56+20, 176) -watchface2_no_temp_txt.set_size(80, 35) -watchface2_no_temp_txt.set_align(lv.TEXT_ALIGN.LEFT) -watchface2_no_temp_txt.set_text("无数据") -watchface2_no_temp_txt.add_style(style_font_youyuan_20, lv.PART.MAIN|lv.STATE.DEFAULT) +watchface2_step_img = lv.img(Watchface2) +watchface2_step_img.set_pos(int(95),int(260)) +watchface2_step_img.set_size(26,21) +watchface2_step_img.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF) +watchface2_step_img.set_src("E:/static/watch_plate/style_2/step.png") +watchface2_step_img.add_style(style_watchface_img_default, lv.PART.MAIN|lv.STATE.DEFAULT) + +watchface2_step_txt = lv.label(Watchface2) +watchface2_step_txt.set_pos(125, 260) +watchface2_step_txt.set_size(80, 35) +watchface2_step_txt.set_align(lv.TEXT_ALIGN.LEFT) +watchface2_step_txt.set_text("0") +watchface2_step_txt.add_style(style_font_youyuan_28, lv.PART.MAIN|lv.STATE.DEFAULT) class WatchFace2(): NAME = "Watchface2" @@ -417,28 +396,8 @@ class WatchFace2(): if time: self.__time(None, time) - connect = EventMesh.publish(constants.EVENT.GET_CONNECT) #获取网络状态 - self.weather_data = EventMesh.publish("get_weather_data") - if connect == 1 and self.weather_data != None: - no_data = self.weather_data[8] - if no_data != 0: - type = self.weather_data[3] - if type == None: - self.__weather_type(None,None) - else: - self.__weather_type(None,type) - - temp = self.weather_data[4] - if temp == None: - self.__weather_value(None,None) - else: - self.__weather_value(None,temp) - else: - self.__weather_type(None,None) - self.__weather_value(None,None) - else: - self.__weather_type(None,None) - self.__weather_value(None,None) + step = EventMesh.publish("get_old_step_value") + self.__stepValue(None, step) def timerout_update(self): @@ -455,29 +414,9 @@ class WatchFace2(): #print("publish_time:"+time) if time: self.__time(None, time) - - connect = EventMesh.publish(constants.EVENT.GET_CONNECT) #获取网络状态 - self.weather_data = EventMesh.publish("get_weather_data") - if connect != 0: - no_data = self.weather_data[8] - if no_data != 0: - type = self.weather_data[3] - if type == None: - self.__weather_type(None,None) - else: - self.__weather_type(None,type) - - temp = self.weather_data[4] - if temp == None: - self.__weather_value(None,None) - else: - self.__weather_value(None,temp) - else: - self.__weather_type(None,None) - self.__weather_value(None,None) - else: - self.__weather_type(None,None) - self.__weather_value(None,None) + + step = EventMesh.publish("get_old_step_value") + self.__stepValue(None, step) def __time(self, event, msg): #时间 @@ -513,27 +452,33 @@ class WatchFace2(): watchface2_res_stat_battery_img.set_src("E:/static/vbat_%d.png"%(msg[1]))#"E:/vbat_60.png" pass - - def __weather_type(self, event, msg): - if msg == None: - watchface2_temp_img.add_flag(lv.obj.FLAG.HIDDEN) - watchface2_no_temp_txt.clear_flag(lv.obj.FLAG.HIDDEN) + def __stepValue(self, event, msg): + if msg == None: + watchface2_step_txt.set_text("0") else: - type = int(msg) - watchface2_no_temp_txt.add_flag(lv.obj.FLAG.HIDDEN) - watchface2_temp_img.clear_flag(lv.obj.FLAG.HIDDEN) - watchface2_temp_img.set_src("E:/static/watch_plate/style_2/%d_main2_weather.png"%(type)) + watchface2_step_txt.set_text(str(msg)) + + + # def __weather_type(self, event, msg): + # if msg == None: + # watchface2_temp_img.add_flag(lv.obj.FLAG.HIDDEN) + # watchface2_no_temp_txt.clear_flag(lv.obj.FLAG.HIDDEN) + # else: + # type = int(msg) + # watchface2_no_temp_txt.add_flag(lv.obj.FLAG.HIDDEN) + # watchface2_temp_img.clear_flag(lv.obj.FLAG.HIDDEN) + # watchface2_temp_img.set_src("E:/static/watch_plate/style_2/%d_main2_weather.png"%(type)) - def __weather_value(self, event, msg): - if msg == None: - watchface2_temp_degree.add_flag(lv.obj.FLAG.HIDDEN) - watchface2_no_temp_txt.clear_flag(lv.obj.FLAG.HIDDEN) - watchface2_temp_txt.add_flag(lv.obj.FLAG.HIDDEN) - else: - watchface2_no_temp_txt.add_flag(lv.obj.FLAG.HIDDEN) - watchface2_temp_txt.clear_flag(lv.obj.FLAG.HIDDEN) - watchface2_temp_degree.clear_flag(lv.obj.FLAG.HIDDEN) - watchface2_temp_txt.set_text(str(msg)) + # def __weather_value(self, event, msg): + # if msg == None: + # watchface2_temp_degree.add_flag(lv.obj.FLAG.HIDDEN) + # watchface2_no_temp_txt.clear_flag(lv.obj.FLAG.HIDDEN) + # watchface2_temp_txt.add_flag(lv.obj.FLAG.HIDDEN) + # else: + # watchface2_no_temp_txt.add_flag(lv.obj.FLAG.HIDDEN) + # watchface2_temp_txt.clear_flag(lv.obj.FLAG.HIDDEN) + # watchface2_temp_degree.clear_flag(lv.obj.FLAG.HIDDEN) + # watchface2_temp_txt.set_text(str(msg)) def Close(self): pass diff --git a/3.code/1.watch/2.code/ui_setting.py b/3.code/1.watch/2.code/ui_setting.py index 4befb4af..23952b43 100644 --- a/3.code/1.watch/2.code/ui_setting.py +++ b/3.code/1.watch/2.code/ui_setting.py @@ -802,18 +802,15 @@ class RestoreScreen(Screen): restore_confirm.add_event_cb(lambda e: self.confirm(e),lv.EVENT.CLICKED, None) restore_cancel.add_event_cb(lambda e: self.concel(e),lv.EVENT.CLICKED, None) - + def confirm(self, e): ret = 0 ret = ql_fs.path_exists("/ext/static/storage_file")#电话本 if ret == True: ql_fs.rmdirs("/ext/static/storage_file") ql_fs.mkdirs("/ext/static/storage_file") - # [XT*334588000000156*0003*DLT] + EventMesh.publish("alipay_unbind") EventMesh.publish(constants.PROTOCOL.DLT_SEND) - - - # EventMesh.publish("load_screen", {"screen": "setting"}) def concel(self, e): EventMesh.publish("load_screen", {"screen": "setting"}) @@ -930,8 +927,6 @@ class PoweroffScreen(Screen): def __init__(self): super().__init__() self.meta = poweroff_screen - self.timer = osTimer() - self.button_flag = 0 poweroff_confirm_img.add_event_cb(lambda e: self.confirm(e),lv.EVENT.CLICKED, None) poweroff_return.add_event_cb(lambda e: self.concel(e),lv.EVENT.CLICKED, None) @@ -971,8 +966,16 @@ class PoweroffConfirmScreen(Screen): super().__init__() self.meta = poweroff_confirm_screen self.timer = osTimer() + self.read_data = {} def initialization(self): - self.timer.start(2*1000,0,self.power_off) + step = EventMesh.publish("get_old_step_value") + if step != 0: + self.read_data = EventMesh.publish("get_storage_data") + self.read_data["old_step"] = step + EventMesh.publish("set_storage_data", self.read_data) + with open("/ext/static/storage_file/config.json","w",encoding="utf-8") as fd: + ujson.dump(self.read_data,fd) + self.timer.start(3*1000,0,self.power_off) def power_off(self,*args): Power.powerDown() @@ -1034,6 +1037,7 @@ class DialswitchScreen(Screen): def watchface01(self,e): btn1_switch.add_state(lv.STATE.CHECKED) btn2_switch.clear_state(lv.STATE.CHECKED) + self.read_data = EventMesh.publish("get_storage_data") self.read_data["watchface"] = "Watchface1" EventMesh.publish("set_storage_data", self.read_data) with open("/ext/static/storage_file/config.json","w",encoding="utf-8") as fd: @@ -1045,6 +1049,7 @@ class DialswitchScreen(Screen): def watchface02(self,e): btn1_switch.clear_state(lv.STATE.CHECKED) btn2_switch.add_state(lv.STATE.CHECKED) + self.read_data = EventMesh.publish("get_storage_data") self.read_data["watchface"] = "Watchface2" EventMesh.publish("set_storage_data", self.read_data) with open("/ext/static/storage_file/config.json","w",encoding="utf-8") as fd: -- 2.17.1