浏览代码

1、增加恢复出厂设置功能,如果能读到头像文件,把头像也擦除(恢复默认头像),重启之后能选择语言;
2、上电选择语言之后,保存好选择,供下次上电使用;
3、默认时间日期设置为2000年1月1日,00:00:00,星期六

robbin 12 小时之前
父节点
当前提交
5bb76499ac

+ 2 - 0
application/aem_watch/src/application/boot_binding/aem_boot_binding.c

@@ -75,6 +75,8 @@ static void item_event_handler(lv_event_t *e)
 #ifndef CONFIG_SIMULATOR
     aem_share_set_bind_status(BINDING);
 #endif    
+    aem_os_settings_data_write();  //Saving setting
+    
     aem_app_run(AEM_APP_ID_LAUNCH);
     aem_app_close(AEM_APP_ID_BOOT_BINDING);
 }

+ 1 - 1
application/aem_watch/src/application/settings/aem_system_operate.c

@@ -73,7 +73,7 @@ static void create_ui(void)
         lv_obj_set_style_pad_bottom(s_ui->page, SETTINGS_PAD_BOTTOM, LV_PART_MAIN);
         aem_title_create(s_ui->page, true, res_manager_get_string_from_id(ID_KEY_SETTINGS_SYSTEM));
 
-        for (int i = 0; i < AEM_RESET; i++)
+        for (int i = 0; i < AEM_RESTART; i++)
         {
             lv_obj_t *item = aem_icon_double_label_item_create(s_ui->page, get_img[i], res_manager_get_string_from_id(get_str[i]), NULL);
             if (item)

+ 9 - 0
application/aem_watch/src/application/settings/aem_system_tips.c

@@ -30,6 +30,9 @@ const uint16_t system_tips_pad_top = 46;
 const uint8_t system_tips_btn_x = 100;
 const int8_t system_tips_btn_y = -40;
 
+extern uint32_t flash_read(const char *name, uint32_t offset, void *data, uint32_t size);
+extern uint32_t flash_erase(const char *name);  // 擦除Flash
+
 static const void* loading_img[LOADING_IMG_CNT] =
 {
     &IMG_SCENE_WIDGET_PIC_0,
@@ -60,6 +63,8 @@ static const void* loading_img[LOADING_IMG_CNT] =
 
 static void btn_click_cb(lv_obj_t *btn)
 {
+    uint8_t photo_data_size_buff[3] = {0};
+
     if (btn == s_ui->cancel)
     {
         aem_app_goback();
@@ -88,6 +93,10 @@ static void btn_click_cb(lv_obj_t *btn)
         }
         case AEM_RESET:
         {
+            if (flash_read("profile_photo_name", 0, photo_data_size_buff, 3) == 0)  //if can read photo name, then erase it
+            {
+                flash_erase("profile_photo_name");
+            }
             on_off.type = AEM_POWER_OFF_RETURN_FACTORY;
             aem_power_off_main(&on_off);
             break;

+ 4 - 4
application/aem_watch/src/user_cfg/device_info_cfg.h

@@ -7,12 +7,12 @@
 
 #if DMG_LCM
 #define MAJOR_VERSION 0x01
-#define MINOR_VERSION 0x01
-#define MICRO_VERSION 0x0D
+#define MINOR_VERSION 0x02
+#define MICRO_VERSION 0x00
 #else
-#define MAJOR_VERSION 0x02
+#define MAJOR_VERSION 0x03
 #define MINOR_VERSION 0x00
-#define MICRO_VERSION 0x0D
+#define MICRO_VERSION 0x01
 #endif
 
 #define DEVICE_ID "CJ01"//3085

+ 1 - 1
thirdparty/lib/aem/config/aem_project.h

@@ -4,7 +4,7 @@
 #pragma warning(error : 4013)
 #endif
 #define AEM_VERSION "BL_Develop_NOR"
-#define BUILD_TIME "202510091650"
+#define BUILD_TIME "202511061600"
 #define AEM_GUI_FWK_LIB_VER "2.0.0.0"
 #define APP_DOWNLOAD_URL "https://customer.com"
 #define AEM_APP_TRANS_ANIMATION 1

+ 5 - 5
zephyr/drivers/input/sd8563_timer_acts.c

@@ -401,12 +401,12 @@ static void _sd8563_set_time(const struct device *i2c_dev,
 	{
         //BCD code
 		write_cmd[1] = 0;  //sec
-		write_cmd[2] = 0x35;  //min
-		write_cmd[3] = 0x11;  //hour
-		write_cmd[4] = 0x12;  //day
+		write_cmd[2] = 0x00;  //min
+		write_cmd[3] = 0x00;  //hour
+		write_cmd[4] = 0x01;  //day
 		write_cmd[5] = 0x06;  //week
-		write_cmd[6] = 0x10;  //mon
-		write_cmd[7] = 0x24;  //year
+		write_cmd[6] = 0x01;  //mon
+		write_cmd[7] = 0x00;  //year
 
 		printk("power on set time and date\n");
 	}