K01:
authordxy15521469561 <1731678236@qq.com>
Tue, 31 Oct 2023 01:13:01 +0000 (09:13 +0800)
committerdxy15521469561 <1731678236@qq.com>
Tue, 31 Oct 2023 01:13:01 +0000 (09:13 +0800)
UI界面调整
K5主页面调整

42 files changed:
2.sdk/Helios_SDK/services/microPython/ports/quectel/core/source/modVideoCall_juphoon.c
2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/mgr.py
2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/ui.py
2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/ui_WatchFaceScreen.py
2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/ui_setting.py
2.sdk/project/D10/sdk/services/microPython/ports/quectel/core/mgr.py
2.sdk/project/K01/sdk/services/microPython/ports/quectel/core/Makefile
2.sdk/project/K01/sdk/services/microPython/ports/quectel/core/alarm.py
2.sdk/project/K01/sdk/services/microPython/ports/quectel/core/appWechat.py
2.sdk/project/K01/sdk/services/microPython/ports/quectel/core/constants.py
2.sdk/project/K01/sdk/services/microPython/ports/quectel/core/main_init.py
2.sdk/project/K01/sdk/services/microPython/ports/quectel/core/mgr.py
2.sdk/project/K01/sdk/services/microPython/ports/quectel/core/pp_main.py [new file with mode: 0644]
2.sdk/project/K01/sdk/services/microPython/ports/quectel/core/protocol.py
2.sdk/project/K01/sdk/services/microPython/ports/quectel/core/ui.py
2.sdk/project/K01/sdk/services/microPython/ports/quectel/core/ui_main_menu.py
2.sdk/project/K01/sdk/services/microPython/ports/quectel/core/ui_setting.py
2.sdk/project/K01/usr/static/IMAGE_BUTTON_DELKEY.png
2.sdk/project/K01/usr/static/IMAGE_BUTTON_DIAL.png
2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY0_ICON.png
2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY1_ICON.png
2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY2_ICON.png
2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY3_ICON.png
2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY4_ICON.png
2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY5_ICON.png
2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY6_ICON.png
2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY7_ICON.png
2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY8_ICON.png
2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY9_ICON.png
2.sdk/project/K01/usr/static/IMAGE_ONE_PAGE_FRIEND.png [new file with mode: 0644]
2.sdk/project/K01/usr/static/bg.png
2.sdk/project/K01/usr/static/jia_icon.png
2.sdk/project/K01/usr/static/jing_icon.png
2.sdk/project/K01/usr/static/phnone_nine_icon.png
2.sdk/project/K01/usr/static/phone_seven_icon.png
2.sdk/project/K01/usr/static/pp_friend01.png [new file with mode: 0644]
2.sdk/project/K01/usr/static/pp_friend02.png [new file with mode: 0644]
2.sdk/project/K01/usr/static/pp_friend03.png [new file with mode: 0644]
2.sdk/project/K01/usr/static/ui_setting.png [new file with mode: 0644]
2.sdk/project/K01/usr/static/xing_icon.png
2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/ui.py
2.sdk/project/K5/sdk/services/microPython/ports/quectel/core/ui_setting.py

index 891be47..0eea018 100644 (file)
@@ -603,14 +603,14 @@ def voice_callback(args):
             EventMesh.publish("set_interrup_incall",0)
             return
 
-        # EventMesh.publish("set_interrup_incall",0)
-        # EventMesh.publish("set_UI_high_priority",0)
+        EventMesh.publish("set_interrup_incall",0)
+        EventMesh.publish("set_UI_high_priority",0)
         
 
-        # screen_NAME = EventMesh.publish("get_screen_NAME")
-        # if screen_NAME != None:
-        #     if screen_NAME != "dialing_noplay_popup":
-        #         EventMesh.publish("load_screen", {"screen": "main_menu"})  
+        screen_NAME = EventMesh.publish("get_screen_NAME")
+        if screen_NAME != None:
+            if screen_NAME != "dialing_noplay_popup":
+                EventMesh.publish("load_screen", {"screen": "main_menu"})  
         
         EventMesh.publish("set_sos_info_call")  
         print('voicecall disconnect end')
index 155398f..b196f05 100644 (file)
@@ -466,37 +466,37 @@ class PhoneScreen(Screen):
             self.meta = phone_screen
 
             phone_one.add_event_cb(lambda e: EventMesh.callback_wrapper(self.one(e)),
-                                     lv.EVENT.SHORT_CLICKED, None)
+                                     lv.EVENT.CLICKED, None)
             # phone_one.add_event_cb(lambda e: EventMesh.callback_wrapper(self.one(e)),
             #                          lv.EVENT.PRESSING, None)
 
             phone_two.add_event_cb(lambda e: EventMesh.callback_wrapper(self.two(e)),
-                                        lv.EVENT.SHORT_CLICKED, None)
+                                        lv.EVENT.CLICKED, None)
             # phone_two.add_event_cb(lambda e: EventMesh.callback_wrapper(self.two(e)),
             #                             lv.EVENT.PRESSING, None)
             
             phone_three.add_event_cb(lambda e: EventMesh.callback_wrapper(self.three(e)),
-                                        lv.EVENT.SHORT_CLICKED, None)
+                                        lv.EVENT.CLICKED, None)
             # phone_three.add_event_cb(lambda e: EventMesh.callback_wrapper(self.three(e)),
             #                             lv.EVENT.PRESSING, None)
             
             phone_four.add_event_cb(lambda e: EventMesh.callback_wrapper(self.four(e)),
-                                        lv.EVENT.SHORT_CLICKED, None)
+                                        lv.EVENT.CLICKED, None)
             # phone_four.add_event_cb(lambda e: EventMesh.callback_wrapper(self.four(e)),
             #                             lv.EVENT.PRESSING, None)
             
             phone_five.add_event_cb(lambda e: EventMesh.callback_wrapper(self.five(e)),
-                                        lv.EVENT.SHORT_CLICKED, None)
+                                        lv.EVENT.CLICKED, None)
             # phone_five.add_event_cb(lambda e: EventMesh.callback_wrapper(self.five(e)),
             #                             lv.EVENT.PRESSING, None)
             
             phone_six.add_event_cb(lambda e: EventMesh.callback_wrapper(self.six(e)),
-                                        lv.EVENT.SHORT_CLICKED, None)
+                                        lv.EVENT.CLICKED, None)
             # phone_six.add_event_cb(lambda e: EventMesh.callback_wrapper(self.six(e)),
             #                             lv.EVENT.PRESSING, None)
             
             phone_seven.add_event_cb(lambda e: EventMesh.callback_wrapper(self.seven(e)),
-                                        lv.EVENT.SHORT_CLICKED, None)
+                                        lv.EVENT.CLICKED, None)
             phone_seven.add_event_cb(lambda e: EventMesh.callback_wrapper(self.seven_longpress(e)),
                                         lv.EVENT.LONG_PRESSED, None)
             phone_seven.add_event_cb(lambda e: EventMesh.callback_wrapper(self.seven_release(e)),
@@ -505,12 +505,12 @@ class PhoneScreen(Screen):
             #                             lv.EVENT.PRESSING, None)
             
             phone_eight.add_event_cb(lambda e: EventMesh.callback_wrapper(self.eight(e)),
-                                        lv.EVENT.SHORT_CLICKED, None)
+                                        lv.EVENT.CLICKED, None)
             # phone_eight.add_event_cb(lambda e: EventMesh.callback_wrapper(self.eight(e)),
             #                             lv.EVENT.PRESSING, None)
             
             phone_nine.add_event_cb(lambda e: EventMesh.callback_wrapper(self.nine(e)),
-                                        lv.EVENT.SHORT_CLICKED, None)
+                                        lv.EVENT.CLICKED, None)
             phone_nine.add_event_cb(lambda e: EventMesh.callback_wrapper(self.nine_longpress(e)),
                                         lv.EVENT.LONG_PRESSED, None)
             phone_nine.add_event_cb(lambda e: EventMesh.callback_wrapper(self.nine_release(e)),
@@ -519,7 +519,7 @@ class PhoneScreen(Screen):
             #                             lv.EVENT.PRESSING, None)
             
             phone_zero.add_event_cb(lambda e: EventMesh.callback_wrapper(self.zero(e)),
-                                        lv.EVENT.SHORT_CLICKED, None)
+                                        lv.EVENT.CLICKED, None)
             phone_zero.add_event_cb(lambda e: EventMesh.callback_wrapper(self.zero_longpress(e)),
                                         lv.EVENT.LONG_PRESSED, None)
             phone_zero.add_event_cb(lambda e: EventMesh.callback_wrapper(self.zero_release(e)),
@@ -528,15 +528,13 @@ class PhoneScreen(Screen):
             #                             lv.EVENT.PRESSING, None)
 
             phone_call_btn.add_event_cb(lambda e: EventMesh.callback_wrapper(self.call(e)),
-                                        lv.EVENT.SHORT_CLICKED, None)
+                                        lv.EVENT.CLICKED, None)
             phone_call_btn.add_event_cb(lambda e: EventMesh.callback_wrapper(self.call(e)),
                                         lv.EVENT.PRESSING, None)
             # # phone_contact_btn.add_event_cb(lambda e: EventMesh.callback_wrapper(self.contact(e)),
             #                             lv.EVENT.CLICKED, None)
             phone_delete_btn.add_event_cb(lambda e: EventMesh.callback_wrapper(self.delete(e)),
-                                        lv.EVENT.SHORT_CLICKED, None)
-            phone_delete_btn.add_event_cb(lambda e: EventMesh.callback_wrapper(self.delete(e)),
-                                        lv.EVENT.PRESSING, None)
+                                        lv.EVENT.CLICKED, None)
             
             
             # # phone_start.add_event_cb(lambda e: EventMesh.callback_wrapper(self.start(e)),
@@ -577,14 +575,9 @@ class PhoneScreen(Screen):
         self.count+=1
     
     def one(self,e):
-        code = e.get_code()
-        if code == lv.EVENT.SHORT_CLICKED:
-            if len(self.phone_list) >= PHONE_CALL_MAX_DATA:
-                #self.phone_list.pop(0)
-                return
-            self.phone_list.append("1")                
-            self.phone_num = ''.join(self.phone_list)
-            self.show_num()
+        self.phone_list.append("1")                
+        self.phone_num = ''.join(self.phone_list)
+        self.show_num()
     
     def two(self,e):
         if len(self.phone_list) >= PHONE_CALL_MAX_DATA:
@@ -736,7 +729,7 @@ class PhoneScreen(Screen):
             #print("PRESSING")
             self.is_sliding += 1
 
-        elif  code == lv.EVENT.SHORT_CLICKED:
+        elif  code == lv.EVENT.CLICKED:
             #utime.sleep_ms(10)
             print("1self.is_sliding",self.is_sliding)
             if self.is_sliding <= 5 and self.is_sliding != 0:#如果是在滑动中则不需要点击事件
@@ -782,7 +775,7 @@ class PhoneScreen(Screen):
                 else:#未插卡
                     EventMesh.publish("load_screen", {"screen": "no_sim_popup_screen"})
         
-        self.is_sliding = 0
+            self.is_sliding = 0
 
     def show_num(self):
         #print("self.phone_num ",self.phone_num,self.phone_list)
@@ -1064,6 +1057,23 @@ class CallLogScreen(Screen):
                     EventMesh.publish("load_screen", {"screen": "no_valied_num_screen"})#无效的号码 请重新输入
 
             self.is_sliding = 0
+
+    def done_DOWN(self):#下滑
+        if self.call_log_detail_list != None:
+            scroll_y = self.call_log_detail_list.get_scroll_y()
+            print("scroll_y:{}".format(scroll_y))
+            self.call_log_detail_list.scroll_to_y(scroll_y-CALL_LOG_LIST_SIZE,lv.ANIM.ON)
+
+        
+        #setting_cont.scroll_to_view(lv.ANIM.ON)
+        pass
+    def done_UP(self):#上滑
+        if self.call_log_detail_list != None:
+            scroll_y = self.call_log_detail_list.get_scroll_y()
+            print("scroll_y:{}".format(scroll_y))
+            self.call_log_detail_list.scroll_to_y(scroll_y+CALL_LOG_LIST_SIZE,lv.ANIM.ON)
+        pass
+
     def done_return(self):
         EventMesh.publish("load_screen", {"screen": "main_menu"})
 
@@ -2514,6 +2524,21 @@ class PopupScreen(Screen):
                 EventMesh.publish("save_msg_content", content) 
                 EventMesh.publish("load_screen", {"screen": "msg_detail"})
             self.is_sliding =0
+    def done_DOWN(self):#下滑
+        if self.sms_detail_list != None:
+            scroll_y = self.sms_detail_list.get_scroll_y()
+            print("scroll_y:{}".format(scroll_y))
+            self.sms_detail_list.scroll_to_y(scroll_y-SMS_LIST_ONE_ICON,lv.ANIM.ON)
+
+        
+        #setting_cont.scroll_to_view(lv.ANIM.ON)
+        pass
+    def done_UP(self):#上滑
+        if self.sms_detail_list != None:
+            scroll_y = self.sms_detail_list.get_scroll_y()
+            print("scroll_y:{}".format(scroll_y))
+            self.sms_detail_list.scroll_to_y(scroll_y+SMS_LIST_ONE_ICON,lv.ANIM.ON)
+        pass
 
     def done_left_to_right(self):
         EventMesh.publish("load_screen", {"screen": "main_menu"})
@@ -2933,6 +2958,7 @@ class HeartrateScreen(Screen):
             EventMesh.publish("set_hr_state",0)#0代表关闭测试
             print("stop debug10")
             EventMesh.publish(constants.EVENT.STOP_HEART)
+        EventMesh.publish("load_screen", {"screen": "health"})
 
     def btn1_release(self):
         EventMesh.publish("load_screen", {"screen": "health"})
@@ -3119,6 +3145,19 @@ class ToolboxScreen(Screen):
                 EventMesh.publish("load_screen",  {"screen": "{}".format(msg)})
                 
             self.is_sliding =0
+    def done_DOWN(self):#下滑
+        scroll_y = toolbox_cont.get_scroll_y()
+        print("scroll_y:{}".format(scroll_y))
+        toolbox_cont.scroll_to_y(scroll_y-TOOL_ICON_OFFSET_SIZE,lv.ANIM.ON)
+
+        
+        #setting_cont.scroll_to_view(lv.ANIM.ON)
+        pass
+    def done_UP(self):#上滑
+        scroll_y = toolbox_cont.get_scroll_y()
+        print("scroll_y:{}".format(scroll_y))
+        toolbox_cont.scroll_to_y(scroll_y+TOOL_ICON_OFFSET_SIZE,lv.ANIM.ON)
+        pass
 
     def done_left_to_right(self):
         EventMesh.publish("load_screen", {"screen": "main_menu"})
@@ -4478,6 +4517,21 @@ class ContactsScreen(Screen):
         "dialing_noplay_popup"
         EventMesh.publish("load_screen", {"screen": "dialing_noplay_popup"})
 
+    def done_DOWN(self):#下滑
+        if self.contact_detail_list != None:
+            scroll_y = self.contact_detail_list.get_scroll_y()
+            print("scroll_y:{}".format(scroll_y))
+            self.contact_detail_list.scroll_to_y(scroll_y-CONTACTS_LIST_SIZE,lv.ANIM.ON)
+
+        
+        #setting_cont.scroll_to_view(lv.ANIM.ON)
+        pass
+    def done_UP(self):#上滑
+        if self.contact_detail_list != None:
+            scroll_y = self.contact_detail_list.get_scroll_y()
+            print("scroll_y:{}".format(scroll_y))
+            self.contact_detail_list.scroll_to_y(scroll_y+CONTACTS_LIST_SIZE,lv.ANIM.ON)
+        pass
 
     def done_left_to_right(self):
         EventMesh.publish("load_screen", {"screen": "main_menu"})
@@ -5650,7 +5704,7 @@ class CountdownScreen(Screen):
                         countdown_stop_img.clear_flag(lv.obj.FLAG.HIDDEN)
                         countdown_reset_img.clear_flag(lv.obj.FLAG.HIDDEN)
                 EventMesh.publish("set_countdown_off_state", [0,self.g_state])
-                self.is_sliding =0
+            self.is_sliding =0
     def stop(self):
         global countdown_screen ,countdown_title,countdown_hour ,countdown_mao ,countdown_mao ,countdown_mao1 ,\
             countdown_sec ,countdown_hour_up ,countdown_hour_up_btn ,countdown_hour_down ,countdown_hour_down_btn ,\
index 28ab093..fb0130a 100644 (file)
@@ -72,7 +72,7 @@ watchface1_res_stat_battery_img.add_style(style_watchface_img_default, lv.PART.M
  
 watchface1_res_stat_battery_line = lv.line(Watchface1)
 watchface1_res_stat_battery_line.set_points(power_line_points,2)
-watchface1_res_stat_battery_line.set_pos(int(191),int(13))
+watchface1_res_stat_battery_line.set_pos(int(192),int(20))
 watchface1_res_stat_battery_line.set_size(0,16)#高度12
 watchface1_res_stat_battery_line.add_style(power_line_red,0)
 
@@ -286,8 +286,8 @@ class WatchFace1():
                 line_len = 30
             if line_len <= 6:
                 line_len = 6
-            set_x = int(199+line_len//2)
-            watchface1_res_stat_battery_line.set_pos(int(set_x),int(8))
+            set_x = int(188+line_len//2)
+            watchface1_res_stat_battery_line.set_pos(int(set_x),int(18))
             watchface1_res_stat_battery_line.set_size(line_len,15)
             watchface1_res_stat_battery_line.set_style_line_width(line_len,lv.PART.MAIN)
             if line_len <= 6:
@@ -360,7 +360,7 @@ watchface2_res_stat_battery_img.add_style(style_watchface_img_default, lv.PART.M
  
 watchface2_res_stat_battery_line = lv.line(Watchface2)
 watchface2_res_stat_battery_line.set_points(power_line_points,2)
-watchface2_res_stat_battery_line.set_pos(int(191),int(13))
+watchface2_res_stat_battery_line.set_pos(int(192),int(20))
 watchface2_res_stat_battery_line.set_size(0,16)#高度12
 watchface2_res_stat_battery_line.add_style(power_line_red,0)
 
@@ -523,7 +523,7 @@ class WatchFace2():
         #print(msg)
         if msg[0] == '1':
             
-            watchface2_res_stat_battery_line.set_pos(int(0),int(0))
+            watchface2_res_stat_battery_line.set_pos(int(0),int(15))
             watchface2_res_stat_battery_line.set_size(0,0)
             watchface2_res_stat_battery_line.set_style_line_width(0,lv.PART.MAIN)
             watchface2_res_stat_battery_img.set_src("E:/static/charge_ing.png")
@@ -538,9 +538,9 @@ class WatchFace2():
                 line_len = 30
             if line_len <= 6:
                 line_len = 6
-            set_x = int(199+line_len//2)
-            watchface2_res_stat_battery_line.set_pos(int(set_x),int(8))
-            watchface2_res_stat_battery_line.set_size(line_len,16)
+            set_x = int(188+line_len//2)
+            watchface2_res_stat_battery_line.set_pos(int(set_x),int(20))
+            watchface2_res_stat_battery_line.set_size(line_len,5)
             watchface2_res_stat_battery_line.set_style_line_width(line_len,lv.PART.MAIN)
             if line_len <= 6:
                 watchface2_res_stat_battery_line.set_style_line_color(lv.color_make(0xff,0x00,0x00),0)
index 855d1fb..34669aa 100644 (file)
@@ -296,10 +296,17 @@ class SettingScreen(Screen):
         EventMesh.publish("load_screen", {"screen": "main_menu"})
 
     def done_DOWN(self):#下滑
-        setting_cont.scroll_to_view(lv.ANIM.ON)
+        scroll_y = setting_cont.get_scroll_y()
+        print("scroll_y:{}".format(scroll_y))
+        setting_cont.scroll_to_y(scroll_y-SETTING_ICON_OFFSET_SIZE,lv.ANIM.ON)
+
+        
+        #setting_cont.scroll_to_view(lv.ANIM.ON)
         pass
     def done_UP(self):#上滑
-        setting_cont.scroll_to_view(lv.ANIM.ON)
+        scroll_y = setting_cont.get_scroll_y()
+        print("scroll_y:{}".format(scroll_y))
+        setting_cont.scroll_to_y(scroll_y+SETTING_ICON_OFFSET_SIZE,lv.ANIM.ON)
         pass
 ##################################################################
 # -------------------------------------------language screen----------------------------------------------------------
index 3ae8466..3e626ed 100644 (file)
@@ -1007,6 +1007,19 @@ class DeviceInfoManager(Abstract):
         else:
             self.no_smi_count = 0
 
+        msg_nums = sms.getMsgNums() #获取短信条数
+        print("msg_nums",msg_nums)
+        if(msg_nums != -1):
+            sms_data = sms.getSaveLoc()
+            sms_max = sms_data[0][2]
+            if msg_nums >= sms_max-1:
+                self.sms_full_flag+=10
+                if self.sms_full_flag >= 60:
+                    self.sms_full_flag=0
+                    EventMesh.publish("remove_all_sms_cb")#
+            else:
+                self.sms_full_flag = 0
+
         """定时测量心率,血氧,体温"""
         WEAR = EventMesh.publish(constants.EVENT.GET_WEAR)#佩戴数据
         self.get_hr_state = EventMesh.publish("get_hr_state")
@@ -3371,12 +3384,12 @@ class deleteSmsManager(Abstract):#删除信息
 
     def post_processor_after_instantiation(self):
         EventMesh.subscribe("delete_sms_event", self.delete_sms_event)#删除短信
-        EventMesh.subscribe("delete_sms_thread", self.delete_sms_thread)#
+        EventMesh.subscribe("remove_all_sms_cb", self.remove_all_sms_cb)#
 
     def delete_sms_event(self, event, msg): 
         EventMesh.publish_async("remove_all_sms_cb","",1*1024)
 
-    def delete_sms_thread(self, event, msg):
+    def remove_all_sms_cb(self, event, msg):
         sms.deleteMsg(1,4)
 
 #闹钟信息
index d681196..76d9803 100644 (file)
@@ -972,6 +972,7 @@ frozen_mpy_list =   $(BUILD)/_boot.mpy \
                                        $(BUILD)/calculator.mpy \
                                        $(BUILD)/versions.mpy \
                                        $(BUILD)/websocket_test.mpy \
+                                       $(BUILD)/pp_main.mpy \
 
 endif
 
index d5727ee..5775680 100644 (file)
@@ -401,10 +401,7 @@ label_ok.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0)
 
 #闹钟信息
 alarm_list = [{'hour': 16, 'repeart': 10, 'idx': 0, 'enabled': 0, 'days': [0,1,2,3,4,5,6], 'minute': 39},
-               {'hour': 16, 'repeart': 10, 'idx': 1, 'enabled': 0, 'days': [0,1,2,3,4,5,6], 'minute': 39},
-               {'hour': 16, 'repeart': 10, 'idx': 1, 'enabled': 0, 'days': [0,1,2,3,4,5,6], 'minute': 39},
-               {'hour': 16, 'repeart': 10, 'idx': 1, 'enabled': 0, 'days': [], 'minute': 39},
-               {'hour': 16, 'repeart': 10, 'idx': 1, 'enabled': 0, 'days': [], 'minute': 39},]
+               {'hour': 16, 'repeart': 10, 'idx': 1, 'enabled': 0, 'days': [0,1,2,3,4,5,6], 'minute': 39}]
 #用于显示闹钟列表不包含开关机信息
 
 class ClockManager(Abstract):
index a1ee4d7..9160e3c 100644 (file)
@@ -883,7 +883,7 @@ class WechatScreen(Screen):
             self.wechat_show = self.wechat_num
             self.wechat_recode_list["num"] = self.wechat_num
             print("talking1.0")
-            self.record_test.start("/usr/static/storage_file/{}.wav".format(self.wechat_num),16) 
+            self.record_test.start("/usr/static/storage_file/{}.amr".format(self.wechat_num),16) 
             self.second_timer.start(1000, 1, self.reduce_second)
             self.press_state = 1
             self.ble_send = 1
index 6fcbf68..878752d 100644 (file)
@@ -90,6 +90,12 @@ class PROTOCOL:
     SILENCETIMEFS_SEND ="SILENCETIMEFS_SEND"
     SILENCETIMEFS_RECV = "SILENCETIMEFS_RECV"
 
+    PP_SEND = "PP_SEND"
+    PP_RECV = "PP_RECV"
+
+    PP_INFOR_SEND = "pp_SEND"
+    PP_INFOR_RECV = "pp_RECV"
+
 
 class EVENT:
     CHANNEL_SOCKET_SEND = "CHANNEL_SOCKET_SEND"
index 1d20bea..4852f45 100644 (file)
@@ -61,6 +61,7 @@ def main_init():
     from mgr import cameraAlbumManager,setclassTimeManager,setkeyboardManager,testSmsSetIPManager,ConfigStoreManager,sosInfoCallManager,getBootOffManager,getSosFlagManager,CountdownManager, LocationManager, getVolumSizeManager,gethistoryDataManager,getUpLoadDataManager, getplayAudiodStateManager,\
     AddrBookManager,MsgdetailManager,PhoneCallingManager,getOldTimeManager,getStorageDataManager,getBrightnessManager,getHrTimeManager,getTempTimeManager,getLowBatManager
    
+    from pp_main import ppMainScreen,ppMainPopupScreen
     # import ui as _ui
     print("init4:{}".format(utime.localtime()))
  
@@ -132,6 +133,8 @@ def main_init():
     ui.add_screen(FactoryModeScreen())
     ui.add_screen(FactoryModeBatTestScreen())
     ui.add_screen(PopupAlarmScreen())
+    ui.add_screen(ppMainScreen())
+    ui.add_screen(ppMainPopupScreen())
     ui.add_screen(_ui.LowPowerScreen())
     ui.add_screen(_ui.NewMessageScreen())
     ui.add_screen(_ui.sosScreen())
@@ -158,6 +161,7 @@ def main_init():
     ui.add_screen(_ui.restore_confirmScreen())
     ui.add_screen(_ui.down_Screen())
     ui.add_screen(_ui.up_Screen())
+
     ui.add_screen(NewWechatPopupScreen())
     ui.add_screen(HealthScreen())
     # ui.add_screen(_ui.Setting3Screen())  
@@ -165,7 +169,7 @@ def main_init():
     
     from protocol import SILENCETIMEFS_ProtoCol,WLKEY_ProtoCol,SILENCETIME2_ProtoCol,KEYBRD_ProtoCol,LK_ProtoCol,PING_ProtoCol,HEART_ProtoCol,OXYGEN_ProtoCol,OXYGEN_One_ProtoCol,HRSTART_ProtoCol,CENTER_ProtoCol,UPLOAD_ProtoCol,\
         TEMP_ProtoCol,DLT_ProtoCol,WT_ProtoCol,UD_ProtoCol,REMIND_ProtoCol, CR_ProtoCol,KA_ProtoCol,FIND_ProtoCol,POWEROFF_ProtoCol,Time_ProtoCol,\
-            ProtoColResolver,PHL_ProtoCol,MONITOR_ProtoCol,bootoff_ProtoCol,WDSTART_ProtoCol,LOWBAT_ProtoCol,sosHome_dial_ProtoCol,SockManager,NetManager
+        pp_ProtoCol,ppinfo_ProtoCol, ProtoColResolver,PHL_ProtoCol,MONITOR_ProtoCol,bootoff_ProtoCol,WDSTART_ProtoCol,LOWBAT_ProtoCol,sosHome_dial_ProtoCol,SockManager,NetManager
     
     import mgr as mgr
     print("init7:{}".format(utime.localtime()))
@@ -257,6 +261,8 @@ def main_init():
     pcr.add_support(SILENCETIME2_ProtoCol())
     pcr.add_support(WLKEY_ProtoCol())
     pcr.add_support(SILENCETIMEFS_ProtoCol())
+    pcr.add_support(pp_ProtoCol())
+    pcr.add_support(ppinfo_ProtoCol())
     EventMesh.publish("load_screen", {"screen": "poweron"})
     sm = SockManager()
     sm.add_support_resolver(pcr)
index cec448a..a5971d5 100644 (file)
@@ -602,14 +602,14 @@ def voice_callback(args):
             EventMesh.publish("set_interrup_incall",0)
             return
 
-        # EventMesh.publish("set_interrup_incall",0)
-        # EventMesh.publish("set_UI_high_priority",0)
+        EventMesh.publish("set_interrup_incall",0)
+        EventMesh.publish("set_UI_high_priority",0)
         
 
-        # screen_NAME = EventMesh.publish("get_screen_NAME")
-        # if screen_NAME != None:
-        #     if screen_NAME != "dialing_noplay_popup":
-        #         EventMesh.publish("load_screen", {"screen": "main_menu"})  
+        screen_NAME = EventMesh.publish("get_screen_NAME")
+        if screen_NAME != None:
+            if screen_NAME != "dialing_noplay_popup":
+                EventMesh.publish("load_screen", {"screen": "main_menu"})  
         
         EventMesh.publish("set_sos_info_call")  
         print('voicecall disconnect end')
@@ -2011,7 +2011,7 @@ class LocationManager(Abstract):
         while True:
             if self.location_queue.empty() == False:
                 TYPE = self.location_queue.get()
-                #print("Location_send3:{}".format(TYPE))
+                print("Location_send3:{}-{}".format(TYPE,send_data))
                 EventMesh.publish(TYPE,send_data)
             else :
                 break
@@ -2092,10 +2092,10 @@ class LocationManager(Abstract):
                         rmc_data = quecgnss.get_rmc()
                         gga_data = quecgnss.get_gga()
                         vtg_data = quecgnss.get_vtg()
-                        print("gsv:{}".format(quecgnss.get_gsv()))
-                        print("gga:{}".format(quecgnss.get_gga()))
-                        print("rmc:{}".format(quecgnss.get_rmc()))
-                        print("vtg:{}".format(quecgnss.get_vtg())) 
+                        # print("gsv:{}".format(quecgnss.get_gsv()))
+                        # print("gga:{}".format(quecgnss.get_gga()))
+                        # print("rmc:{}".format(quecgnss.get_rmc()))
+                        # print("vtg:{}".format(quecgnss.get_vtg())) 
                         for i in range(len(gsv_data)) :
                             
                             if i % 2 == 0:
diff --git a/2.sdk/project/K01/sdk/services/microPython/ports/quectel/core/pp_main.py b/2.sdk/project/K01/sdk/services/microPython/ports/quectel/core/pp_main.py
new file mode 100644 (file)
index 0000000..46f8bc3
--- /dev/null
@@ -0,0 +1,215 @@
+##########################
+# //碰碰交友
+
+import utime
+import osTimer
+import lvgl as lv
+import EventMesh
+from machine import Timer
+import voiceCall
+import osTimer
+import constants
+from misc import Power
+import pm
+import ujson
+import audio
+import ql_fs
+import audio
+import sms
+from machine import Pin
+from lcd import lcd,lcd_ctrl,tp_cst816
+from misc import PWM
+import uos
+import gc
+import _thread
+from queue import Queue
+import camera
+from ui import style_screen,Screen,style_font_youyuan_20,style_img
+LCD_X = 128
+LCD_Y = 128
+ppmain_screen = None
+ppmain_img = None
+ppmain_name = None
+ppmain_call_label = None
+ppmain_imgbtn = None
+class ppMainScreen(Screen):
+    NAME = "pp_main"
+    
+    def __init__(self):
+        super().__init__()
+        self.meta = None
+    def initialization(self):
+        
+        global ppmain_screen,ppmain_img,ppmain_name ,ppmain_imgbtn 
+        if ppmain_screen == None:
+            ppmain_screen = lv.obj()
+            print("ppMainScreen")
+            ppmain_screen.add_style(style_screen, lv.PART.MAIN | lv.STATE.DEFAULT)
+
+            # dialing_img = lv.img(ppmain_screen)
+            # dialing_img.set_pos(80, 20)
+            # dialing_img.set_size(64, 64)
+            # dialing_img.set_src("U:/static/IMAGE_NOTICE_CALL.png")
+            # dialing_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
+            
+            ppmain_call_label = lv.label(ppmain_screen)
+            ppmain_call_label.set_pos(35, 24)
+            ppmain_call_label.set_size(LCD_X-35, 40)
+            ppmain_call_label.set_text("碰碰好友")
+            ppmain_call_label.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0)
+            ppmain_call_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
+
+            ppmain_imgbtn = lv.img(ppmain_screen) #64 
+            ppmain_imgbtn.set_size(20, 20)
+            ppmain_imgbtn.set_src("U:/static/pp_friend01.png")
+            ppmain_imgbtn.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+            ppmain_imgbtn.set_pos(10, 20)
+           
+            
+            ppmain_name = lv.label(ppmain_screen)
+            ppmain_name.set_pos(0, 0)
+            ppmain_name.set_size(LCD_X, 60)
+            ppmain_name.set_text(" ")
+            ppmain_name.add_flag(lv.obj.FLAG.CLICKABLE)
+            ppmain_name.set_long_mode(lv.label.LONG.DOT)
+            ppmain_name.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0)
+            ppmain_name.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
+            ppmain_name.add_event_cb(lambda e: EventMesh.callback_wrapper(self.hangup(e)),
+                                    lv.EVENT.CLICKED, None)
+
+            self.meta = ppmain_screen
+    def hangup(self,*argc):
+        EventMesh.publish("load_screen", {"screen": "pp_popup"})
+        EventMesh.publish(constants.EVENT.START_LOCATION,constants.PROTOCOL.PP_SEND) #开始WT定位
+       
+        pass
+
+    def done_return(self):
+        EventMesh.publish("load_screen", {"screen": "main_menu"})
+
+    def btn1_release(self):
+        EventMesh.publish("load_screen", {"screen": "main_menu"})
+
+    def btn8_press(self):
+        EventMesh.publish("load_screen", {"screen": "main_menu"})
+
+
+
+ppPopup_screen = None
+ppPopup_call_label = None
+ppPopup_imgbtn = None
+class ppMainPopupScreen(Screen):#弹窗提示
+    NAME = "pp_popup"
+    
+    def __init__(self):
+        super().__init__()
+        self.meta = None
+        self.timer=osTimer()
+        self.timer_out=osTimer()
+        self.meta_type = "popup"
+        self.count = 0
+
+    def initialization(self):
+        self.count = 0
+        global ppPopup_screen,ppmain_img,ppmain_name ,ppPopup_imgbtn 
+        if ppPopup_screen == None:
+            ppPopup_screen = lv.obj()
+            print("ppPopup_screen")
+            ppPopup_screen.add_style(style_screen, lv.PART.MAIN | lv.STATE.DEFAULT)
+
+            ppPopup_call_label = lv.label(ppPopup_screen)
+            ppPopup_call_label.set_pos(0, 89)
+            ppPopup_call_label.set_size(LCD_X-0, 39)
+            ppPopup_call_label.set_text("搜索好友中,请稍候...")
+            ppPopup_call_label.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0)
+            ppPopup_call_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
+
+            ppPopup_imgbtn = lv.img(ppPopup_screen) #64 
+            ppPopup_imgbtn.set_size(109, 79)
+            ppPopup_imgbtn.set_src("U:/static/pp_friend02.png")
+            ppPopup_imgbtn.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+            ppPopup_imgbtn.set_pos(14, 5)
+
+            self.meta = ppPopup_screen
+        self.timer.start(1*1000,1,self.fun)
+        self.timer_out.start(40*1000,0,self.timeout_fun)
+    def fun(self,*argc):
+        EventMesh.publish("system_sleep_rest")#防止黑屏
+
+    def timeout_fun(self,*argc):
+        screen_NAME = EventMesh.publish("get_screen_NAME")
+        if screen_NAME != None:
+            if screen_NAME == "pp_popup":
+                EventMesh.publish("load_screen", {"screen": "main_menu"})
+    def Close(self):
+        self.timer.stop()
+
+    def done_return(self):
+        EventMesh.publish("load_screen", {"screen": "main_menu"})
+
+    def btn1_release(self):
+        EventMesh.publish("load_screen", {"screen": "main_menu"})
+
+    def btn8_press(self):
+        EventMesh.publish("load_screen", {"screen": "main_menu"})
+
+
+addppPopup_screen = None
+addppPopup_call_label = None
+addppPopup_imgbtn = None
+class addppPopupScreen(Screen):#弹窗提示
+    NAME = "addpp_popup"
+    
+    def __init__(self):
+        super().__init__()
+        self.timer=osTimer()
+        self.meta = None
+        self.meta_type = "popup"
+        self.count = 0
+    def initialization(self):
+        self.count = 0
+        global addppPopup_screen,addppPopup_imgbtn 
+        if addppPopup_screen == None:
+            addppPopup_screen = lv.obj()
+            print("addpp_popup")
+            addppPopup_screen.add_style(style_screen, lv.PART.MAIN | lv.STATE.DEFAULT)
+
+            addppPopup_call_label = lv.label(addppPopup_screen)
+            addppPopup_call_label.set_pos(0, 94)
+            addppPopup_call_label.set_size(LCD_X-0, 34)
+            addppPopup_call_label.set_text(" ")
+            addppPopup_call_label.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0)
+            addppPopup_call_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
+
+            addppPopup_imgbtn = lv.img(addppPopup_screen) #64 
+            addppPopup_imgbtn.set_size(73, 78)
+            addppPopup_imgbtn.set_src("U:/static/pp_friend03.png")
+            addppPopup_imgbtn.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+            addppPopup_imgbtn.set_pos(27, 10)
+
+            self.meta = addppPopup_screen
+        self.timer.start(1*1000,1,self.fun)
+        addppPopup_call_label.set_text(str(self.meta_info))
+
+    def fun(self,*argc):
+        self.count+=1
+        if self.count > 5:
+            self.count = 0
+            self.timer.stop()
+            EventMesh.publish("return_prev_screen")
+    
+    def Close(self):
+        self.count = 0
+        self.timer.stop()
+        
+    def done_return(self):
+        EventMesh.publish("load_screen", {"screen": "main_menu"})
+
+    def btn1_release(self):
+        EventMesh.publish("load_screen", {"screen": "main_menu"})
+
+    def btn8_press(self):
+        EventMesh.publish("load_screen", {"screen": "main_menu"})
+
+
index 4dce1e7..9fc1175 100644 (file)
@@ -19,13 +19,13 @@ import osTimer
 import machine
 
 import _thread
-import usys
 
+import usys
 
 def server_init(server_type = None):
     #服务器选择1,防走丢,2大锤,3三基同创,4童信 5云米
     if server_type == None:
-        server_type = 1
+        server_type = 5
     #print("server_init:server_type:{}".format(server_type))
     d_server_addr = "api.xcloudtech.com"
     d_server_port = 9000
@@ -539,7 +539,7 @@ class UD_ProtoCol(ProtoCol):
         if self.UD_count>=6:
             self.UD_count = 0
             EventMesh.publish(constants.PROTOCOL.WT_SEND,msg)
-
+        # EventMesh.publish(constants.EVENT.START_LOCATION,constants.PROTOCOL.UD_SEND) #开始ud定位
         send_data ="UD,"+msg
         send_len = len(send_data)
         #wt_data = "%s"%(send_data)
@@ -1536,7 +1536,7 @@ class SILENCETIME2_ProtoCol(ProtoCol):
 
 #键盘开关
 class KEYBRD_ProtoCol(ProtoCol):
-    """免打扰"""
+    """键盘开关"""
     TYPE = "KEYBRD"
     def send(self, event, msg):
         # [XT*334588000000156*0006*SILENCETIME2]
@@ -1555,8 +1555,95 @@ class KEYBRD_ProtoCol(ProtoCol):
         """
         # b'[SZKW*867387060319166*000A*KEYBRD]'
         # print("KEYBRD!!!!!!!!!!!!!",msg)
+        msg = msg[1:-1]
+        msg_tmp = msg.decode('ascii')
+        msg_tmp_d = int(str(msg_tmp.split('KEYBRD,')[1]))
+        
+        EventMesh.publish("set_key_board",["key_board",msg_tmp_d])
+
         EventMesh.publish(constants.PROTOCOL.KEYBRD_SEND)  
 
+#碰碰交友
+class pp_ProtoCol(ProtoCol):
+    """碰碰交友"""
+    TYPE = "PP"
+    def send(self, event, msg):
+        print("PP_ProtoCol:send:")
+         # [SZKW*867387060319491*0008*PP]
+        if(msg != ""):
+            time = msg.split(",")[1]
+            data = machine.RTC().datetime()
+            hour = "%02d"%(data[4])+"%02d"%(data[5])
+            print("PP_ProtoCol:send:{}-{}-{}".format(msg,type(msg),time))
+            msg_tmp = "PP," +"%s,"%(time)+ msg
+            
+            data_len = len(msg_tmp)
+            MD5_head_data = self.PID+"*%s*%04X*PP"%(self.imei,data_len)
+            MD5_SIGN = self.pack_MD5_head(MD5_head_data)
+            send_data = self.PID+"*%s*%04X*%s"%(self.imei,data_len,msg_tmp)
+            data = "[%s%s]"%(str(MD5_SIGN),send_data)
+
+            print("PP_ProtoCol:msg_tmp:%s"%(data))
+            # 通过socket发送到服务器端
+            EventMesh.publish(constants.EVENT.CHANNEL_SOCKET_SEND, data)
+
+    def recv(self, event, msg):
+        """
+        @param event:
+        @param msg: 接收到的下行数据
+        """
+        # b'[SZKW*867387060319166*000A*KEYBRD]'
+        print("PP!!!!!!!!!!!!!",msg)
+
+        msg = msg[1:-1]
+        msg_tmp = msg.decode('ascii')
+        msg_tmp_d = str(msg_tmp.split('pp,')[1])
+
+        len_data = len(str(msg_tmp_d))
+        if len_data > 1:
+            EventMesh.publish("load_screen", {"screen": "addpp_popup","meta":msg_tmp_d})
+            pass
+        elif msg_tmp_d == "1":#对方已加过好友
+            pass
+        elif msg_tmp_d == "2":#自己已加过好友
+            pass
+        # EventMesh.publish(constants.PROTOCOL.PP_SEND)  
+#碰碰交友
+class ppinfo_ProtoCol(ProtoCol):
+    """碰碰交友"""
+    TYPE = "pp"
+    def send(self, event, msg):
+        # [XT*334588000000156*0006*SILENCETIME2]
+        send_data = self.PID+"*%s*0002*pp"%(self.imei)
+        MD5_SIGN = self.pack_MD5_head(send_data)
+        data = "[%s%s]"%(str(MD5_SIGN),send_data)
+        # print("KEYBRD:data:%s"%(data))
+        # print("KEYBRD!!!!!!!!!!!!!",msg)
+        # 通过socket发送到服务器端
+        EventMesh.publish(constants.EVENT.CHANNEL_SOCKET_SEND,data)
+
+    def recv(self, event, msg):
+        """
+        @param event:
+        @param msg: 接收到的下行数据
+        """
+        # b'[SZKW*867387060319166*000A*KEYBRD]'
+        print("PP recv!!!!!!!!!!!!!",msg)
+
+        msg = msg[1:-1]
+        msg_tmp = msg.decode('ascii')
+        msg_tmp_d = str(msg_tmp.split('pp,')[1])
+
+        len_data = len(str(msg_tmp_d))
+        if len_data > 1:
+            EventMesh.publish("load_screen", {"screen": "addpp_popup","meta":msg_tmp_d})
+            pass
+        elif msg_tmp_d == "1":#对方已加过好友
+            pass
+        elif msg_tmp_d == "2":#自己已加过好友
+            pass
+        # EventMesh.publish(constants.PROTOCOL.PP_SEND)  
+
 class ProtoColResolver(object):
     def __init__(self):
         self.protocol_list = []
@@ -1568,7 +1655,7 @@ class ProtoColResolver(object):
     def handler(self, data):
         # 这里接收数据
         
-        # print("handler -> {}".format(data))
+        print("handler -> {}".format(data))
         # if data.startswith('Init;'):
         #     data = data[5:]
         #     EventMesh.publish(constants.EVENT.SET_KEY, {"value": ujson.loads(data)['KEY']})
index 807e631..c4793c3 100644 (file)
@@ -7240,7 +7240,7 @@ down_show_volume_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 down_show_setting_img = lv.img(down_show_screen)#设置
 down_show_setting_img.set_size(25, 25)
 down_show_setting_img.set_pos(13+25+13+25+13, 90)
-down_show_setting_img.set_src("U:/static/menu_version.png")
+down_show_setting_img.set_src("U:/static/ui_setting.png")
 down_show_setting_img.add_flag(lv.obj.FLAG.CLICKABLE)
 down_show_setting_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
index 2153338..017ead1 100644 (file)
@@ -122,7 +122,7 @@ label_text.set_text("{}".format(MainMenu2_num))
 MainMenu2_img_add_friends = lv.img(MainMenu2_toolbox)
 MainMenu2_img_add_friends.set_size(80,80)
 MainMenu2_img_add_friends.set_pos(24,10)
-MainMenu2_img_add_friends.set_src("U:/static/IMAGE_ONE_PAGE_TOOLS.png")
+MainMenu2_img_add_friends.set_src("U:/static/IMAGE_ONE_PAGE_FRIEND.png")
 MainMenu2_img_add_friends.add_flag(lv.obj.FLAG.CLICKABLE)
 MainMenu2_img_add_friends.add_style(style_MainMenu_img_default, lv.PART.MAIN | lv.STATE.DEFAULT)
 
@@ -367,7 +367,7 @@ class MainMenuScreen(Screen):
         MainMenu2_img_phone.add_event_cb(lambda e: EventMesh.callback_wrapper(self.img_cb(e,  "Phone")), lv.EVENT.CLICKED, None)
         MainMenu2_img_toolbox.add_event_cb(lambda e: EventMesh.callback_wrapper(self.img_cb(e, "toolbox")), lv.EVENT.CLICKED, None)
         MainMenu2_img_setting.add_event_cb(lambda e: EventMesh.callback_wrapper(self.img_cb(e, "setting")), lv.EVENT.CLICKED, None)
-        MainMenu2_img_add_friends.add_event_cb(lambda e: EventMesh.callback_wrapper(self.img_cb(e, "toolbox")), lv.EVENT.CLICKED, None)
+        MainMenu2_img_add_friends.add_event_cb(lambda e: EventMesh.callback_wrapper(self.img_cb(e, "pp_main")), lv.EVENT.CLICKED, None)
         # MainMenu2_img_camera_video.add_event_cb(lambda e: EventMesh.callback_wrapper(self.img_cb(e, "camera_video")), lv.EVENT.CLICKED, None)
         # MainMenu2_img_camera.add_event_cb(lambda e: EventMesh.callback_wrapper(self.img_cb(e, "camera")), lv.EVENT.CLICKED, None)
         # MainMenu2_img_camera_album.add_event_cb(lambda e: EventMesh.callback_wrapper(self.img_cb(e, "camera_album")), lv.EVENT.CLICKED, None)
index 6e5a033..0be8c84 100644 (file)
@@ -330,35 +330,35 @@ setting_version_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
 setting_cont_y+=setting_cont_offset
 
-setting_update_img_btn_1 = lv.btn(setting_cont)
-setting_update_img_btn_1.set_pos(int(0),int(setting_cont_y-5))
-setting_update_img_btn_1.set_size(120,35)
-setting_update_img_btn_1.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
-setting_update_img_btn_1.add_style(style_screen_btn_1_main_main_default, lv.PART.MAIN|lv.STATE.DEFAULT)
-setting_update_img_btn_1.add_flag(lv.obj.FLAG.CLICKABLE)
-
-setting_update_label = lv.label(setting_cont)
-setting_update_label.set_text("系统升级")
-# setting_update_label.add_flag(lv.obj.FLAG.CLICKABLE)
-setting_update_label.set_size(128-34, 35)
-setting_update_label.set_pos(34, setting_cont_y+5)
-setting_update_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
-setting_update_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
-
-setting_update_label_btn = lv.label(setting_cont)
-setting_update_label_btn.set_text(" ")
-# setting_update_label_btn.add_flag(lv.obj.FLAG.CLICKABLE)
-setting_update_label_btn.set_size(128, 45)
-setting_update_label_btn.set_pos(0, setting_cont_y)
-setting_update_label_btn.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
-setting_update_label_btn.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
-
-setting_update_img = lv.img(setting_cont)
-setting_update_img.set_pos(4, setting_cont_y)
-setting_update_img.set_size(set_icon_x, set_icon_y)
-# setting_update_img.add_flag(lv.obj.FLAG.CLICKABLE)
-setting_update_img.set_src("U:/static/menu_upgrade.png")
-setting_update_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+# setting_update_img_btn_1 = lv.btn(setting_cont)
+# setting_update_img_btn_1.set_pos(int(0),int(setting_cont_y-5))
+# setting_update_img_btn_1.set_size(120,35)
+# setting_update_img_btn_1.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
+# setting_update_img_btn_1.add_style(style_screen_btn_1_main_main_default, lv.PART.MAIN|lv.STATE.DEFAULT)
+# setting_update_img_btn_1.add_flag(lv.obj.FLAG.CLICKABLE)
+
+# setting_update_label = lv.label(setting_cont)
+# setting_update_label.set_text("系统升级")
+# # setting_update_label.add_flag(lv.obj.FLAG.CLICKABLE)
+# setting_update_label.set_size(128-34, 35)
+# setting_update_label.set_pos(34, setting_cont_y+5)
+# setting_update_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
+# setting_update_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
+
+# setting_update_label_btn = lv.label(setting_cont)
+# setting_update_label_btn.set_text(" ")
+# # setting_update_label_btn.add_flag(lv.obj.FLAG.CLICKABLE)
+# setting_update_label_btn.set_size(128, 45)
+# setting_update_label_btn.set_pos(0, setting_cont_y)
+# setting_update_label_btn.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
+# setting_update_label_btn.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
+
+# setting_update_img = lv.img(setting_cont)
+# setting_update_img.set_pos(4, setting_cont_y)
+# setting_update_img.set_size(set_icon_x, set_icon_y)
+# # setting_update_img.add_flag(lv.obj.FLAG.CLICKABLE)
+# setting_update_img.set_src("U:/static/menu_upgrade.png")
+# setting_update_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
 
 
@@ -392,7 +392,7 @@ class SettingScreen(Screen):
         setting_restore_img_btn_1.add_event_cb(lambda e: EventMesh.callback_wrapper(self.ui_setting_cb(e, "restore")), (lv.EVENT.CLICKED ), None)
         setting_poweroff_img_btn_1.add_event_cb(lambda e: EventMesh.callback_wrapper(self.ui_setting_cb(e, "poweroff")), (lv.EVENT.CLICKED ), None)
         setting_restart_img_btn_1.add_event_cb(lambda e: EventMesh.callback_wrapper(self.ui_setting_cb(e, "restart")), lv.EVENT.CLICKED, None)
-        setting_update_img_btn_1.add_event_cb(lambda e: EventMesh.callback_wrapper(self.ui_setting_cb(e, "update")), (lv.EVENT.CLICKED ), None)
+        # setting_update_img_btn_1.add_event_cb(lambda e: EventMesh.callback_wrapper(self.ui_setting_cb(e, "update")), (lv.EVENT.CLICKED ), None)
         setting_version_img_btn_1.add_event_cb(lambda e: EventMesh.callback_wrapper(self.ui_setting_cb(e, "version")), (lv.EVENT.CLICKED ), None)
         setting_dialswitch_img_btn_1.add_event_cb(lambda e: EventMesh.callback_wrapper(self.ui_setting_cb(e, "dialswitch")), lv.EVENT.CLICKED, None)
 
@@ -417,7 +417,7 @@ class SettingScreen(Screen):
         setting_restore_img_btn_1.add_event_cb(lambda e: EventMesh.callback_wrapper(self.ui_setting_cb(e, "restore")), lv.EVENT.PRESSING, None)
         setting_poweroff_img_btn_1.add_event_cb(lambda e: EventMesh.callback_wrapper(self.ui_setting_cb(e, "poweroff")), lv.EVENT.PRESSING, None)
         setting_restart_img_btn_1.add_event_cb(lambda e: EventMesh.callback_wrapper(self.ui_setting_cb(e, "restart")), lv.EVENT.PRESSING, None)
-        setting_update_img_btn_1.add_event_cb(lambda e: EventMesh.callback_wrapper(self.ui_setting_cb(e, "update")), lv.EVENT.PRESSING, None)
+        # setting_update_img_btn_1.add_event_cb(lambda e: EventMesh.callback_wrapper(self.ui_setting_cb(e, "update")), lv.EVENT.PRESSING, None)
         setting_version_img_btn_1.add_event_cb(lambda e: EventMesh.callback_wrapper(self.ui_setting_cb(e, "version")), lv.EVENT.PRESSING, None)
    
     def initialization(self):
@@ -450,7 +450,7 @@ class SettingScreen(Screen):
             self.is_sliding =0
             
     def done_return(self):
-        EventMesh.publish("load_screen", {"screen": "main_menu"})
+        EventMesh.publish("return_prev_screen")
 
     def btn1_release(self):
         EventMesh.publish("return_setiing")
index 9bde723..b39bbbd 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/IMAGE_BUTTON_DELKEY.png and b/2.sdk/project/K01/usr/static/IMAGE_BUTTON_DELKEY.png differ
index 0f6b415..5137fc8 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/IMAGE_BUTTON_DIAL.png and b/2.sdk/project/K01/usr/static/IMAGE_BUTTON_DIAL.png differ
index 502ff78..e9fc48f 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY0_ICON.png and b/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY0_ICON.png differ
index 4c01263..5be7802 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY1_ICON.png and b/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY1_ICON.png differ
index d017c48..02e843d 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY2_ICON.png and b/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY2_ICON.png differ
index 3a9e055..5beb1b7 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY3_ICON.png and b/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY3_ICON.png differ
index d5fd395..8d8a7db 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY4_ICON.png and b/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY4_ICON.png differ
index 39aea82..ebb9d43 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY5_ICON.png and b/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY5_ICON.png differ
index fa0c0ec..0b9282c 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY6_ICON.png and b/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY6_ICON.png differ
index 726fd75..7c5b9d1 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY7_ICON.png and b/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY7_ICON.png differ
index d157f88..40833b9 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY8_ICON.png and b/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY8_ICON.png differ
index e9ce23a..513fa90 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY9_ICON.png and b/2.sdk/project/K01/usr/static/IMAGE_NUMBER_KEY9_ICON.png differ
diff --git a/2.sdk/project/K01/usr/static/IMAGE_ONE_PAGE_FRIEND.png b/2.sdk/project/K01/usr/static/IMAGE_ONE_PAGE_FRIEND.png
new file mode 100644 (file)
index 0000000..c6d7316
Binary files /dev/null and b/2.sdk/project/K01/usr/static/IMAGE_ONE_PAGE_FRIEND.png differ
index 831069b..6a770c5 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/bg.png and b/2.sdk/project/K01/usr/static/bg.png differ
index cdc33e3..18a5b30 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/jia_icon.png and b/2.sdk/project/K01/usr/static/jia_icon.png differ
index 6725c9d..6219162 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/jing_icon.png and b/2.sdk/project/K01/usr/static/jing_icon.png differ
index 2436cb4..22c723f 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/phnone_nine_icon.png and b/2.sdk/project/K01/usr/static/phnone_nine_icon.png differ
index 5965beb..6b102c9 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/phone_seven_icon.png and b/2.sdk/project/K01/usr/static/phone_seven_icon.png differ
diff --git a/2.sdk/project/K01/usr/static/pp_friend01.png b/2.sdk/project/K01/usr/static/pp_friend01.png
new file mode 100644 (file)
index 0000000..2cfe1b3
Binary files /dev/null and b/2.sdk/project/K01/usr/static/pp_friend01.png differ
diff --git a/2.sdk/project/K01/usr/static/pp_friend02.png b/2.sdk/project/K01/usr/static/pp_friend02.png
new file mode 100644 (file)
index 0000000..e48840b
Binary files /dev/null and b/2.sdk/project/K01/usr/static/pp_friend02.png differ
diff --git a/2.sdk/project/K01/usr/static/pp_friend03.png b/2.sdk/project/K01/usr/static/pp_friend03.png
new file mode 100644 (file)
index 0000000..43c42dc
Binary files /dev/null and b/2.sdk/project/K01/usr/static/pp_friend03.png differ
diff --git a/2.sdk/project/K01/usr/static/ui_setting.png b/2.sdk/project/K01/usr/static/ui_setting.png
new file mode 100644 (file)
index 0000000..40559aa
Binary files /dev/null and b/2.sdk/project/K01/usr/static/ui_setting.png differ
index 2350f54..07f37ba 100644 (file)
Binary files a/2.sdk/project/K01/usr/static/xing_icon.png and b/2.sdk/project/K01/usr/static/xing_icon.png differ
index 00e9ba1..8be1392 100644 (file)
@@ -1032,7 +1032,14 @@ class DialingScreen(Screen):
         EventMesh.publish("set_UI_high_priority", 0)
         EventMesh.publish("set_hangup_mode", 1)
         voiceCall.callEnd()
-        self.timer.start(5000,0,self.call_end)
+        EventMesh.publish("set_interrup_incall",0)
+        EventMesh.publish("set_UI_high_priority",0)
+        
+
+        screen_NAME = EventMesh.publish("get_screen_NAME")
+        if screen_NAME != None:
+            if screen_NAME != "dialing_noplay_popup":
+                EventMesh.publish("load_screen", {"screen": "main_menu"})  
 
     def Close(self):
         self.timer.stop()
@@ -1548,7 +1555,14 @@ class DialingNoPlayPopupScreen(Screen):#正在拨号中...未打出
             EventMesh.publish("set_sos_flag",0)
             EventMesh.publish("set_sos_num",0)
             EventMesh.publish("set_hangup_mode",0)
-        EventMesh.publish("return_prev_screen") #返回上一级
+        EventMesh.publish("set_interrup_incall",0)
+        EventMesh.publish("set_UI_high_priority",0)
+        
+
+        screen_NAME = EventMesh.publish("get_screen_NAME")
+        if screen_NAME != None:
+            if screen_NAME != "dialing_noplay_popup":
+                EventMesh.publish("load_screen", {"screen": "main_menu"})  
 
     def Close(self):
         self.timer1.stop()
@@ -2983,7 +2997,14 @@ class IncomingCallScreen(Screen):
         self.aud.stop()
         self.call_timer.stop()
         voiceCall.callEnd()
+        EventMesh.publish("set_interrup_incall",0)
+        EventMesh.publish("set_UI_high_priority",0)
+        
 
+        screen_NAME = EventMesh.publish("get_screen_NAME")
+        if screen_NAME != None:
+            if screen_NAME != "dialing_noplay_popup":
+                EventMesh.publish("load_screen", {"screen": "main_menu"})  
 
     def btn1_release(self):
         pass
@@ -3547,6 +3568,14 @@ class OnCallScreen(Screen):
         EventMesh.publish("set_UI_high_priority", 0)
         self.timer.stop()
         voiceCall.callEnd()
+        EventMesh.publish("set_interrup_incall",0)
+        EventMesh.publish("set_UI_high_priority",0)
+        
+
+        screen_NAME = EventMesh.publish("get_screen_NAME")
+        if screen_NAME != None:
+            if screen_NAME != "dialing_noplay_popup":
+                EventMesh.publish("load_screen", {"screen": "main_menu"})  
         
     def Close(self):
         self.timer.stop()
index 546cc49..2e5f8a5 100644 (file)
@@ -239,22 +239,22 @@ setting_version_img.set_src("E:/static/setting/menu_version.png")
 setting_version_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 setting_cont_y+=90
 
-setting_update = lv.btn(setting_cont)
-setting_update.set_pos(0, setting_cont_y)
-setting_update.set_size(0, 0)
-setting_update_label = lv.label(setting_update)
-setting_update_label.set_text("系统升级")
-setting_update.set_style_pad_all(0, lv.STATE.DEFAULT)
-setting_update_label.align(lv.ALIGN.LEFT_MID, 70, 0)
-setting_update_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
-setting_update_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_update.add_style(style_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_update_img = lv.img(setting_cont)
-setting_update_img.set_pos(0, setting_cont_y)
-setting_update_img.set_size(232, 80)
-setting_update_img.add_flag(lv.obj.FLAG.CLICKABLE)
-setting_update_img.set_src("E:/static/setting/menu_upgrade.png")
-setting_update_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+# setting_update = lv.btn(setting_cont)
+# setting_update.set_pos(0, setting_cont_y)
+# setting_update.set_size(0, 0)
+# setting_update_label = lv.label(setting_update)
+# setting_update_label.set_text("系统升级")
+# setting_update.set_style_pad_all(0, lv.STATE.DEFAULT)
+# setting_update_label.align(lv.ALIGN.LEFT_MID, 70, 0)
+# setting_update_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
+# setting_update_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
+# setting_update.add_style(style_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
+# setting_update_img = lv.img(setting_cont)
+# setting_update_img.set_pos(0, setting_cont_y)
+# setting_update_img.set_size(232, 80)
+# setting_update_img.add_flag(lv.obj.FLAG.CLICKABLE)
+# setting_update_img.set_src("E:/static/setting/menu_upgrade.png")
+# setting_update_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
 class SettingScreen(Screen):
     NAME = "setting"
@@ -263,31 +263,44 @@ class SettingScreen(Screen):
         super().__init__()
         self.meta = setting_screen
         # setting_language.add_event_cb(lambda e: self.load_screen(e, {"screen": "language"}), lv.EVENT.CLICKED, None)
-        setting_dialswitch.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "dialswitch"})), lv.EVENT.CLICKED, None)
+        setting_dialswitch.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, {"screen": "dialswitch"})), lv.EVENT.CLICKED, None)
         # setting_themeswitch.add_event_cb(lambda e: self.load_screen(e, {"screen": "themeswitch"}), lv.EVENT.CLICKED, None)
-        setting_imei.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "imei"})), lv.EVENT.CLICKED, None)
-        setting_app.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "app"})), lv.EVENT.CLICKED, None)
-        setting_bright.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "brightness"})), lv.EVENT.CLICKED, None)
-        setting_volume.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "totalvolume"})), lv.EVENT.CLICKED, None)
-        setting_restore.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "restore"})), lv.EVENT.CLICKED, None)
-        setting_poweroff.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "poweroff"})), lv.EVENT.CLICKED, None)
-        setting_update.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "update"})), lv.EVENT.CLICKED, None)
-        setting_version.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "version"})), lv.EVENT.CLICKED, None)
+        setting_imei.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, {"screen": "imei"})), lv.EVENT.CLICKED, None)
+        setting_app.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, {"screen": "app"})), lv.EVENT.CLICKED, None)
+        setting_bright.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, {"screen": "brightness"})), lv.EVENT.CLICKED, None)
+        setting_volume.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, {"screen": "totalvolume"})), lv.EVENT.CLICKED, None)
+        setting_restore.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, {"screen": "restore"})), lv.EVENT.CLICKED, None)
+        setting_poweroff.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, {"screen": "poweroff"})), lv.EVENT.CLICKED, None)
+        # setting_update.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "update"})), lv.EVENT.CLICKED, None)
+        setting_version.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, {"screen": "version"})), lv.EVENT.CLICKED, None)
 
         # img regist btton
         # setting_language.add_event_cb(lambda e: self.load_screen(e, {"screen": "language"}), lv.EVENT.CLICKED, None)
-        setting_dialswitch_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "dialswitch"})), lv.EVENT.CLICKED, None)
+        setting_dialswitch_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, {"screen": "dialswitch"})), lv.EVENT.CLICKED, None)
         # setting_themeswitch.add_event_cb(lambda e: self.load_screen(e, {"screen": "themeswitch"}), lv.EVENT.CLICKED, None)
-        setting_imei_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "imei"})), lv.EVENT.CLICKED, None)
-        setting_app_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "app"})), lv.EVENT.CLICKED, None)
-        setting_bright_img.add_event_cb(lambda e:EventMesh.callback_wrapper( self.load_screen(e, {"screen": "brightness"})), lv.EVENT.CLICKED, None)
-        setting_volume_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "totalvolume"})), lv.EVENT.CLICKED, None)
-        setting_restore_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "restore"})), lv.EVENT.CLICKED, None)
-        setting_poweroff_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "poweroff"})), lv.EVENT.CLICKED, None)
-        setting_update_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "update"})), lv.EVENT.CLICKED, None)
-        setting_version_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "version"})), lv.EVENT.CLICKED, None)
-
-    
+        setting_imei_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, {"screen": "imei"})), lv.EVENT.CLICKED, None)
+        setting_app_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, {"screen": "app"})), lv.EVENT.CLICKED, None)
+        setting_bright_img.add_event_cb(lambda e:EventMesh.callback_wrapper( self.setting_cb(e, {"screen": "brightness"})), lv.EVENT.CLICKED, None)
+        setting_volume_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, {"screen": "totalvolume"})), lv.EVENT.CLICKED, None)
+        setting_restore_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, {"screen": "restore"})), lv.EVENT.CLICKED, None)
+        setting_poweroff_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, {"screen": "poweroff"})), lv.EVENT.CLICKED, None)
+        # setting_update_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "update"})), lv.EVENT.CLICKED, None)
+        setting_version_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, {"screen": "version"})), lv.EVENT.CLICKED, None)
+
+    def setting_cb(self,e,msg):
+        code = e.get_code()
+        if code == lv.EVENT.PRESSING:
+            #print("PRESSING")
+            self.is_sliding += 1
+
+        elif  code == lv.EVENT.CLICKED:
+            #utime.sleep_ms(10)
+            print("1self.is_sliding",self.is_sliding)
+            if self.is_sliding <= 5 and self.is_sliding != 0:#如果是在滑动中则不需要点击事件
+                self.is_sliding = 0
+                EventMesh.publish("load_screen", {"screen":"{}".format(msg)})
+                
+            self.is_sliding =0
 
     def done_return(self):
         EventMesh.publish("load_screen", {"screen": "main_menu"})