Ver código fonte

1、用APP的形式重新做了bluetooth,能解决重新连接新手机时无法跳过二维码扫描的问题。蓝牙连接的信息提示先不做
2、修改about以及二维码中的信息内容
3、系统设置里只保留了”恢复出厂设置“、”关于设备“
4、调整一些字体大小

mohliy 3 meses atrás
pai
commit
03633c923f
36 arquivos alterados com 913 adições e 169 exclusões
  1. BIN
      application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/bt_watch.enG
  2. BIN
      application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/bt_watch.res
  3. BIN
      application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/bt_watch.sty
  4. BIN
      application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/bt_watch.zhC
  5. 1 1
      application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/txt/bt_watch_36.txt
  6. 1 1
      application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/txt/bt_watch_36_zhC.txt
  7. BIN
      application/aem_watch/resource/360x360/applist/png/icon/蓝牙连接.png
  8. BIN
      application/aem_watch/resource/360x360/bluetooth/蓝牙.png
  9. BIN
      application/aem_watch/resource/360x360/bluetooth/连接新手机.png
  10. 171 0
      application/aem_watch/resource/360x360/bt_watch.ui
  11. 3 3
      application/aem_watch/resource/360x360/bt_watch_enG.c
  12. 2 1
      application/aem_watch/resource/360x360/bt_watch_sty.h
  13. 4 4
      application/aem_watch/resource/360x360/bt_watch_zhC.c
  14. 3 0
      application/aem_watch/resource/360x360/res_include.h
  15. 141 113
      application/aem_watch/resource/360x360/res_style_bitmap.c
  16. BIN
      application/aem_watch/resource/multiLang_translate_table.xls
  17. 2 2
      application/aem_watch/simulator/LVGL.Simulator/LVGL.Simulator.vcxproj
  18. 9 6
      application/aem_watch/simulator/LVGL.Simulator/LVGL.Simulator.vcxproj.filters
  19. 12 5
      application/aem_watch/simulator/LVGL.Simulator/bt_watch_simulator.c
  20. 2 1
      application/aem_watch/src/application/CMakeLists.txt
  21. 6 0
      application/aem_watch/src/application/bluetooth/CMakeLists.txt
  22. 440 0
      application/aem_watch/src/application/bluetooth/aem_bluetooth.c
  23. 75 0
      application/aem_watch/src/application/bluetooth/aem_bluetooth.h
  24. 1 1
      application/aem_watch/src/application/boot_binding/aem_boot_binding_main.c
  25. 2 1
      application/aem_watch/src/application/boot_binding/aem_boot_binding_qrcode.c
  26. 2 2
      application/aem_watch/src/application/quick_settings/aem_quick_setting_bluetooth_setting.c
  27. 15 13
      application/aem_watch/src/application/settings/aem_about_watch.c
  28. 1 1
      application/aem_watch/src/application/settings/aem_bt_connect_more.c
  29. 5 5
      application/aem_watch/src/application/settings/aem_settings.c
  30. 1 1
      application/aem_watch/src/application/settings/aem_system_operate.c
  31. 4 4
      application/aem_watch/src/user_cfg/device_info_cfg.h
  32. 3 2
      thirdparty/lib/aem/adapter/peripheral/aem_adapter_dev.c
  33. 2 0
      thirdparty/lib/aem/adapter/peripheral/aem_adapter_dev.h
  34. 1 1
      thirdparty/lib/aem/config/aem_project.h
  35. 2 0
      thirdparty/lib/aem/include/aem_app_id.h
  36. 2 1
      thirdparty/lib/aem/include/aem_core_if.h

BIN
application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/bt_watch.enG


BIN
application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/bt_watch.res


BIN
application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/bt_watch.sty


BIN
application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/bt_watch.zhC


+ 1 - 1
application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/txt/bt_watch_36.txt

@@ -1 +1 @@
-0X20-0X77,0X78,0X79,0X7A,0XE1,0XE2,0XE3,0XE4,0XE7,0XE8,0XE9,0XEA,0XED,0XF1,0XF3,0XF4,0XF5,0XF6,0XFA,0XFC,0X107,0X119,0X11F,0X131,0X142,0X15B,0X15F,0X411,0X413,0X414,0X415,0X416,0X417,0X41A,0X41C,0X41D,0X41F,0X421,0X422,0X423,0X424,0X427,0X430,0X432,0X433,0X434,0X435,0X436,0X437,0X438,0X439,0X43A,0X43B,0X43C,0X43D,0X43E,0X43F,0X440,0X441,0X442,0X443,0X444,0X445,0X447,0X449,0X44B,0X44C,0X44F,0X5D0,0X5D1,0X5D2,0X5D3,0X5D4,0X5D5,0X5D6,0X5D7,0X5D8,0X5D9,0X5DC,0X5DD,0X5DE,0X5DF,0X5E0,0X5E1,0X5E2,0X5E4,0X5E5,0X5E6,0X5E7,0X5E8,0X5E9,0X5EA,0X623,0X625,0X627,0X628,0X629,0X62A,0X62B,0X62C,0X62D,0X62E,0X62F,0X631,0X632,0X633,0X634,0X635,0X636,0X637,0X638,0X639,0X63A,0X641,0X642,0X643,0X644,0X645,0X646,0X647,0X648,0X649,0X64A,0X686,0X698,0X6A9,0X6AF,0X6CC,0X200C,0X4E50,0X5065,0X50CF,0X5165,0X51FA,0X529B,0X529F,0X52A8,0X52A9,0X5357,0X5386,0X538B,0X5438,0X547C,0X5668,0X56FE,0X5929,0X5934,0X5973,0X5E38,0X5EB7,0X5F55,0X5FC3,0X6027,0X624B,0X627E,0X6307,0X65E5,0X65F6,0X671F,0X673A,0X6C14,0X6C27,0X6D3B,0X7247,0X7387,0X7535,0X76F8,0X7720,0X7761,0X79D2,0X7B52,0X7B97,0X7F6E,0X8017,0X8840,0X8868,0X8BA1,0X8BB0,0X8BBE,0X8BDD,0X8BED,0X8F93,0X8FD0,0X9488,0X949F,0X95F4,0X95F9,0X97F3
+0X20-0X77,0X78,0X79,0X7A,0XE1,0XE2,0XE3,0XE4,0XE7,0XE8,0XE9,0XEA,0XED,0XF1,0XF3,0XF4,0XF5,0XF6,0XFA,0XFC,0X105,0X107,0X119,0X11F,0X131,0X142,0X15B,0X15F,0X411,0X413,0X414,0X415,0X416,0X417,0X41A,0X41C,0X41D,0X41F,0X421,0X422,0X423,0X424,0X427,0X430,0X432,0X433,0X434,0X435,0X436,0X437,0X438,0X439,0X43A,0X43B,0X43C,0X43D,0X43E,0X43F,0X440,0X441,0X442,0X443,0X444,0X445,0X447,0X449,0X44B,0X44C,0X44E,0X44F,0X5D0,0X5D1,0X5D2,0X5D3,0X5D4,0X5D5,0X5D6,0X5D7,0X5D8,0X5D9,0X5DC,0X5DD,0X5DE,0X5DF,0X5E0,0X5E1,0X5E2,0X5E4,0X5E5,0X5E6,0X5E7,0X5E8,0X5E9,0X5EA,0X623,0X625,0X627,0X628,0X629,0X62A,0X62B,0X62C,0X62D,0X62E,0X62F,0X631,0X632,0X633,0X634,0X635,0X636,0X637,0X638,0X639,0X63A,0X641,0X642,0X643,0X644,0X645,0X646,0X647,0X648,0X649,0X64A,0X686,0X698,0X6A9,0X6AF,0X6CC,0X200C,0X4E50,0X5065,0X50CF,0X5165,0X51FA,0X529B,0X529F,0X52A8,0X52A9,0X5357,0X5386,0X538B,0X5438,0X547C,0X5668,0X56FE,0X5929,0X5934,0X5973,0X5E38,0X5EB7,0X5F55,0X5FC3,0X6027,0X624B,0X627E,0X6307,0X63A5,0X65E5,0X65F6,0X671F,0X673A,0X6C14,0X6C27,0X6D3B,0X7247,0X7259,0X7387,0X7535,0X76F8,0X7720,0X7761,0X79D2,0X7B52,0X7B97,0X7F6E,0X8017,0X84DD,0X8840,0X8868,0X8BA1,0X8BB0,0X8BBE,0X8BDD,0X8BED,0X8F93,0X8FD0,0X8FDE,0X9488,0X949F,0X95F4,0X95F9,0X97F3

+ 1 - 1
application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/txt/bt_watch_36_zhC.txt

@@ -1 +1 @@
-,0X4E50,0X5065,0X50CF,0X5165,0X51FA,0X529B,0X529F,0X52A8,0X52A9,0X5357,0X5386,0X538B,0X5438,0X547C,0X5668,0X56FE,0X5929,0X5934,0X5973,0X5E38,0X5EB7,0X5F55,0X5FC3,0X6027,0X624B,0X627E,0X6307,0X65E5,0X65F6,0X671F,0X673A,0X6C14,0X6C27,0X6D3B,0X7247,0X7387,0X7535,0X76F8,0X7720,0X7761,0X79D2,0X7B52,0X7B97,0X7F6E,0X8017,0X8840,0X8868,0X8BA1,0X8BB0,0X8BBE,0X8BDD,0X8BED,0X8F93,0X8FD0,0X9488,0X949F,0X95F4,0X95F9,0X97F3
+,0X4E50,0X5065,0X50CF,0X5165,0X51FA,0X529B,0X529F,0X52A8,0X52A9,0X5357,0X5386,0X538B,0X5438,0X547C,0X5668,0X56FE,0X5929,0X5934,0X5973,0X5E38,0X5EB7,0X5F55,0X5FC3,0X6027,0X624B,0X627E,0X6307,0X63A5,0X65E5,0X65F6,0X671F,0X673A,0X6C14,0X6C27,0X6D3B,0X7247,0X7259,0X7387,0X7535,0X76F8,0X7720,0X7761,0X79D2,0X7B52,0X7B97,0X7F6E,0X8017,0X84DD,0X8840,0X8868,0X8BA1,0X8BB0,0X8BBE,0X8BDD,0X8BED,0X8F93,0X8FD0,0X8FDE,0X9488,0X949F,0X95F4,0X95F9,0X97F3

BIN
application/aem_watch/resource/360x360/applist/png/icon/蓝牙连接.png


BIN
application/aem_watch/resource/360x360/bluetooth/蓝牙.png


BIN
application/aem_watch/resource/360x360/bluetooth/连接新手机.png


+ 171 - 0
application/aem_watch/resource/360x360/bt_watch.ui

@@ -1461,6 +1461,53 @@
                     <property name="strid" value="key_settings_set_time_date" />
                 </element>
             </element>
+            <element class="resgroup_resource">
+                <property name="name" value="res_bluetooth" />
+                <property name="id" value="33304" />
+                <property name="x" value="0x0000" />
+                <property name="y" value="0x0000" />
+                <property name="width" value="0x0014" />
+                <property name="height" value="0x0014" />
+                <property name="background" value="0x00c8c8c8" />
+                <property name="opaque" value="0x0000" />
+                <property name="transparency" value="0x00ff" />
+                <property name="visible" value="0x0001" />
+                <property name="editable" value="1" />
+                <element class="picture_resource">
+                    <property name="name" value="pic_icon" />
+                    <property name="id" value="33305" />
+                    <property name="x" value="0x0000" />
+                    <property name="y" value="0x0000" />
+                    <property name="width" value="0x004a" />
+                    <property name="height" value="0x004a" />
+                    <property name="visible" value="0x0011" />
+                    <property name="compress" value="0x0000" />
+                    <property name="PNG_A8" value="0x0000" />
+                    <property name="ARGB" value="0x0000" />
+                    <element class="layer">
+                        <property name="0" value=".\applist\png\icon\蓝牙连接.png" />
+                    </element>
+                </element>
+                <element class="string_resource">
+                    <property name="name" value="str_text" />
+                    <property name="id" value="33306" />
+                    <property name="x" value="0x0064" />
+                    <property name="y" value="0x0000" />
+                    <property name="width" value="0x0064" />
+                    <property name="height" value="0x0024" />
+                    <property name="foreground" value="0x00ffffff" />
+                    <property name="background" value="0x00000000" />
+                    <property name="visible" value="0x0001" />
+                    <property name="align" value="0x000e" />
+                    <property name="mode" value="0x0002" />
+                    <property name="size" value="0x0024" />
+                    <property name="scroll" value="0x0" />
+                    <property name="direction" value="-1" />
+                    <property name="space" value="0x0064" />
+                    <property name="pixel" value="0x0001" />
+                    <property name="strid" value="key_settings_bt" />
+                </element>
+            </element>
         </element>
     </scene>
     <scene>
@@ -21867,6 +21914,127 @@
             </element>
         </element>
     </scene>
+    <scene>
+        <property name="name" value="SCENE_BLUETOOTH" />
+        <property name="id" value="33297" />
+        <property name="direction" value="0" />
+        <property name="key1" value="1" />
+        <property name="key2" value="2" />
+        <property name="key3" value="3" />
+        <property name="key4" value="4" />
+        <property name="key5" value="5" />
+        <property name="key6" value="6" />
+        <property name="key7" value="7" />
+        <property name="key8" value="8" />
+        <property name="key9" value="9" />
+        <property name="key10" value="10" />
+        <property name="key11" value="11" />
+        <property name="key12" value="12" />
+        <property name="key13" value="13" />
+        <property name="key14" value="14" />
+        <property name="key15" value="15" />
+        <property name="key16" value="16" />
+        <element class="resgroup_resource">
+            <property name="name" value="window" />
+            <property name="id" value="33298" />
+            <property name="x" value="0x0000" />
+            <property name="y" value="0x0000" />
+            <property name="width" value="0x0168" />
+            <property name="height" value="0x0168" />
+            <property name="background" value="0x00c8c8c8" />
+            <property name="opaque" value="0x0000" />
+            <property name="transparency" value="0x00ff" />
+            <property name="visible" value="0x0001" />
+            <property name="editable" value="1" />
+            <element class="picture_resource">
+                <property name="name" value="PIC_BLUETOOTH" />
+                <property name="id" value="33299" />
+                <property name="x" value="0x0045" />
+                <property name="y" value="0x0064" />
+                <property name="width" value="0x003c" />
+                <property name="height" value="0x003c" />
+                <property name="visible" value="0x0011" />
+                <property name="compress" value="0x0000" />
+                <property name="PNG_A8" value="0x0000" />
+                <property name="ARGB" value="0x0000" />
+                <element class="layer">
+                    <property name="0" value=".\bluetooth\蓝牙.png" />
+                </element>
+            </element>
+            <element class="picture_resource">
+                <property name="name" value="PIC_CONNECT_MORE" />
+                <property name="id" value="33300" />
+                <property name="x" value="0x0045" />
+                <property name="y" value="0x00c1" />
+                <property name="width" value="0x003c" />
+                <property name="height" value="0x003c" />
+                <property name="visible" value="0x0011" />
+                <property name="compress" value="0x0000" />
+                <property name="PNG_A8" value="0x0000" />
+                <property name="ARGB" value="0x0000" />
+                <element class="layer">
+                    <property name="0" value=".\bluetooth\连接新手机.png" />
+                </element>
+            </element>
+            <element class="string_resource">
+                <property name="name" value="str_bt_headset" />
+                <property name="id" value="33301" />
+                <property name="x" value="0x009a" />
+                <property name="y" value="0x007a" />
+                <property name="width" value="0x0064" />
+                <property name="height" value="0x0014" />
+                <property name="foreground" value="0x00000000" />
+                <property name="background" value="0x00ffffff" />
+                <property name="visible" value="0x0001" />
+                <property name="align" value="0x000e" />
+                <property name="mode" value="0x0002" />
+                <property name="size" value="0x000c" />
+                <property name="scroll" value="0x0" />
+                <property name="direction" value="-1" />
+                <property name="space" value="0x0064" />
+                <property name="pixel" value="0x0001" />
+                <property name="strid" value="key_settings_bt_headset" />
+            </element>
+            <element class="string_resource">
+                <property name="name" value="str_bt_connect" />
+                <property name="id" value="33302" />
+                <property name="x" value="0x0096" />
+                <property name="y" value="0x003e" />
+                <property name="width" value="0x0068" />
+                <property name="height" value="0x0014" />
+                <property name="foreground" value="0x00000000" />
+                <property name="background" value="0x00ffffff" />
+                <property name="visible" value="0x0001" />
+                <property name="align" value="0x000e" />
+                <property name="mode" value="0x0002" />
+                <property name="size" value="0x000c" />
+                <property name="scroll" value="0x0" />
+                <property name="direction" value="-1" />
+                <property name="space" value="0x0064" />
+                <property name="pixel" value="0x0001" />
+                <property name="strid" value="key_settings_bt" />
+            </element>
+            <element class="string_resource">
+                <property name="name" value="str_connect_more" />
+                <property name="id" value="33303" />
+                <property name="x" value="0x009c" />
+                <property name="y" value="0x00d4" />
+                <property name="width" value="0x0063" />
+                <property name="height" value="0x0014" />
+                <property name="foreground" value="0x00000000" />
+                <property name="background" value="0x00ffffff" />
+                <property name="visible" value="0x0001" />
+                <property name="align" value="0x000e" />
+                <property name="mode" value="0x0002" />
+                <property name="size" value="0x000c" />
+                <property name="scroll" value="0x0" />
+                <property name="direction" value="-1" />
+                <property name="space" value="0x0064" />
+                <property name="pixel" value="0x0001" />
+                <property name="strid" value="key_settings_system_connect_to" />
+            </element>
+        </element>
+    </scene>
     <resource>
         <picture value=".\blood_pressure\number\0.png" />
         <picture value=".\blood_pressure\number\1.png" />
@@ -22640,6 +22808,9 @@
         <picture value=".\set_time_date\时间.png" />
         <picture value=".\set_time_date\日期.png" />
         <picture value=".\applist\png\icon\时间日期.png" />
+        <picture value=".\bluetooth\蓝牙.png" />
+        <picture value=".\bluetooth\连接新手机.png" />
+        <picture value=".\applist\png\icon\蓝牙连接.png" />
         <txt value="..\multilang_translate_table.xls" />
         <string value="key_setupwizard_language" />
         <string value="key_setupwizard_download_app" />

+ 3 - 3
application/aem_watch/resource/360x360/bt_watch_enG.c

@@ -464,7 +464,7 @@ static const uint8_t STR_231[] = {0x52, 0x65, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e
 
 static const uint8_t STR_232[] = {0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x0}; 
 
-static const uint8_t STR_233[] = {0x53, 0x75, 0x72, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x61, 0x74, 0x63, 0x68, 0x3f, 0x0}; 
+static const uint8_t STR_233[] = {0x53, 0x75, 0x72, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x3f, 0x0}; 
 
 static const uint8_t STR_234[] = {0x52, 0x69, 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x0}; 
 
@@ -488,9 +488,9 @@ static const uint8_t STR_243[] = {0x53, 0x74, 0x61, 0x72, 0x74, 0x0};
 
 static const uint8_t STR_244[] = {0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x0}; 
 
-static const uint8_t STR_245[] = {0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x0}; 
+static const uint8_t STR_245[] = {0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x0}; 
 
-static const uint8_t STR_246[] = {0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x20, 0x44, 0x6f, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x3f, 0x0}; 
+static const uint8_t STR_246[] = {0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x20, 0x44, 0x6f, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x3f, 0x0}; 
 
 static const uint8_t STR_247[] = {0x54, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x0}; 
 

+ 2 - 1
application/aem_watch/resource/360x360/bt_watch_sty.h

@@ -37,6 +37,7 @@
 #define  RES_AI_VOICE    0x92c3b0b8
 #define  RES_RECORDER    0x2be6d1a7
 #define  RES_SET_TIME_DATE    0x1de9d9d8
+#define  RES_BLUETOOTH    0x65f7c071
 #define  SCENE_WORKOUT    0x7d6da2dc
 #define  PIC_WORKOUT_BG    0x256e75ce
 #define  PIC_ROUND_BG    0x49fd00dd
@@ -261,7 +262,6 @@
 #define  STR_SCALLOPING    0x88ab325a
 #define  STR_CUBE_FLIP    0x3b06407f
 #define  STR_CASCADE_ZOOM    0xd9217588
-#define  RES_BLUETOOTH    0x65f7c071
 #define  PIC_EARPHONE    0x81d6ebab
 #define  PIC_CONNECT_MORE    0x724bff49
 #define  STR_BT_HEADSET    0x815c557d
@@ -1085,6 +1085,7 @@
 #define  STR_SET_TIME_DATE    0x61769b87
 #define  STR_SET_TIME    0x7cd1484
 #define  STR_SET_DATE    0x2f38573b
+#define  SCENE_BLUETOOTH    0xdec0857f
 #define  STR_BT_CONNECT_MORE    0xad6733b
 #define  STR_BT_BLUETOOTH    0x2c134409
 #define  SCENE_RECORDER    0x348a22e9

+ 4 - 4
application/aem_watch/resource/360x360/bt_watch_zhC.c

@@ -392,7 +392,7 @@ static const uint8_t STR_195[] = {0xe5, 0xb1, 0x8f, 0xe5, 0xb9, 0x95, 0xe5, 0xb7
 
 static const uint8_t STR_196[] = {0xe9, 0x94, 0x81, 0xe5, 0xae, 0x9a, 0xe5, 0x90, 0x8e, 0xe7, 0x82, 0xb9, 0xe5, 0x87, 0xbb, 0xe5, 0xb1, 0x8f, 0xe5, 0xb9, 0x95, 0xe5, 0xb0, 0x86, 0xe6, 0x97, 0xa0, 0xe5, 0x93, 0x8d, 0xe5, 0xba, 0x94, 0x0}; 
 
-static const uint8_t STR_197[] = {0xe5, 0x85, 0xb3, 0xe4, 0xba, 0x8e, 0xe6, 0x89, 0x8b, 0xe8, 0xa1, 0xa8, 0x0}; 
+static const uint8_t STR_197[] = {0xe5, 0x85, 0xb3, 0xe4, 0xba, 0x8e, 0xe8, 0xae, 0xbe, 0xe5, 0xa4, 0x87, 0x0}; 
 
 static const uint8_t STR_198[] = {0xe8, 0xae, 0xbe, 0xe5, 0xa4, 0x87, 0xe5, 0x90, 0x8d, 0xe7, 0xa7, 0xb0, 0x0}; 
 
@@ -448,7 +448,7 @@ static const uint8_t STR_223[] = {0xe6, 0x8c, 0x87, 0xe9, 0x92, 0x88, 0x0};
 
 static const uint8_t STR_224[] = {0xe5, 0x85, 0xb3, 0xe6, 0x9c, 0xba, 0x0}; 
 
-static const uint8_t STR_225[] = {0xe7, 0xa1, 0xae, 0xe5, 0xae, 0x9a, 0xe8, 0xa6, 0x81, 0xe5, 0x85, 0xb3, 0xe9, 0x97, 0xad, 0xe6, 0x89, 0x8b, 0xe8, 0xa1, 0xa8, 0xe5, 0x90, 0x97, 0xef, 0xbc, 0x9f, 0x0}; 
+static const uint8_t STR_225[] = {0xe7, 0xa1, 0xae, 0xe5, 0xae, 0x9a, 0xe8, 0xa6, 0x81, 0xe5, 0x85, 0xb3, 0xe9, 0x97, 0xad, 0xe8, 0xae, 0xbe, 0xe5, 0xa4, 0x87, 0xe5, 0x90, 0x97, 0xef, 0xbc, 0x9f, 0x0}; 
 
 static const uint8_t STR_226[] = {0xe7, 0x9c, 0x81, 0xe7, 0x94, 0xb5, 0xe6, 0xa8, 0xa1, 0xe5, 0xbc, 0x8f, 0x0}; 
 
@@ -460,11 +460,11 @@ static const uint8_t STR_229[] = {0xe6, 0x8a, 0xac, 0xe8, 0x85, 0x95, 0xe4, 0xba
 
 static const uint8_t STR_230[] = {0xe6, 0x81, 0xa2, 0xe5, 0xa4, 0x8d, 0xe5, 0x87, 0xba, 0xe5, 0x8e, 0x82, 0x0}; 
 
-static const uint8_t STR_231[] = {0xe6, 0x81, 0xa2, 0xe5, 0xa4, 0x8d, 0xe5, 0x87, 0xba, 0xe5, 0x8e, 0x82, 0xe5, 0xb0, 0x86, 0xe4, 0xbc, 0x9a, 0xe5, 0x88, 0xa0, 0xe6, 0x8e, 0x89, 0xe6, 0x89, 0x8b, 0xe8, 0xa1, 0xa8, 0xe4, 0xb8, 0xad, 0xe7, 0x9a, 0x84, 0xe6, 0x89, 0x80, 0xe6, 0x9c, 0x89, 0xe6, 0x95, 0xb0, 0xe6, 0x8d, 0xae, 0xe3, 0x80, 0x82, 0x0}; 
+static const uint8_t STR_231[] = {0xe6, 0x81, 0xa2, 0xe5, 0xa4, 0x8d, 0xe5, 0x87, 0xba, 0xe5, 0x8e, 0x82, 0xe5, 0xb0, 0x86, 0xe4, 0xbc, 0x9a, 0xe5, 0x88, 0xa0, 0xe6, 0x8e, 0x89, 0xe8, 0xae, 0xbe, 0xe5, 0xa4, 0x87, 0xe4, 0xb8, 0xad, 0xe7, 0x9a, 0x84, 0xe6, 0x89, 0x80, 0xe6, 0x9c, 0x89, 0xe6, 0x95, 0xb0, 0xe6, 0x8d, 0xae, 0xe3, 0x80, 0x82, 0x0}; 
 
 static const uint8_t STR_232[] = {0xe9, 0x87, 0x8d, 0xe5, 0x90, 0xaf, 0x0}; 
 
-static const uint8_t STR_233[] = {0xe7, 0xa1, 0xae, 0xe5, 0xae, 0x9a, 0xe8, 0xa6, 0x81, 0xe9, 0x87, 0x8d, 0xe5, 0x90, 0xaf, 0xe6, 0x89, 0x8b, 0xe8, 0xa1, 0xa8, 0xe5, 0x90, 0x97, 0xef, 0xbc, 0x9f, 0x0}; 
+static const uint8_t STR_233[] = {0xe7, 0xa1, 0xae, 0xe5, 0xae, 0x9a, 0xe8, 0xa6, 0x81, 0xe9, 0x87, 0x8d, 0xe5, 0x90, 0xaf, 0xe8, 0xae, 0xbe, 0xe5, 0xa4, 0x87, 0xe5, 0x90, 0x97, 0xef, 0xbc, 0x9f, 0x0}; 
 
 static const uint8_t STR_234[] = {0xe9, 0x93, 0x83, 0xe5, 0xa3, 0xb0, 0xe9, 0x9f, 0xb3, 0xe9, 0x87, 0x8f, 0x0}; 
 

+ 3 - 0
application/aem_watch/resource/360x360/res_include.h

@@ -32,6 +32,7 @@ extern lv_img_dsc_t IMG_SCENE_APPLIST_RES_LAUNCH_PIC_ICON;
 extern lv_img_dsc_t IMG_SCENE_APPLIST_RES_AI_VOICE_PIC_ICON; 
 extern lv_img_dsc_t IMG_SCENE_APPLIST_RES_RECORDER_PIC_ICON; 
 extern lv_img_dsc_t IMG_SCENE_APPLIST_RES_SET_TIME_DATE_PIC_ICON; 
+extern lv_img_dsc_t IMG_SCENE_APPLIST_RES_BLUETOOTH_PIC_ICON; 
 extern lv_img_dsc_t IMG_SCENE_WORKOUT_PIC_WORKOUT_BG; 
 extern lv_img_dsc_t IMG_SCENE_WORKOUT_PIC_ROUND_BG; 
 extern lv_img_dsc_t IMG_SCENE_WORKOUT_PIC_OUTDOOR_RUNNING; 
@@ -682,6 +683,8 @@ extern lv_img_dsc_t IMG_SCENE_NINI_CHARGER_PIC_MINI_CHAR_BG;
 extern lv_img_dsc_t IMG_SCENE_SHOW_LOGO_PIC_APP_LOGO; 
 extern lv_img_dsc_t IMG_SCENE_SET_TIME_DATE_PIC_SET_TIME; 
 extern lv_img_dsc_t IMG_SCENE_SET_TIME_DATE_PIC_SET_DATE; 
+extern lv_img_dsc_t IMG_SCENE_BLUETOOTH_PIC_BLUETOOTH; 
+extern lv_img_dsc_t IMG_SCENE_BLUETOOTH_PIC_CONNECT_MORE; 
 
 typedef enum{ 
 	ID_KEY_OTA_DOWNLOADING,

Diferenças do arquivo suprimidas por serem muito extensas
+ 141 - 113
application/aem_watch/resource/360x360/res_style_bitmap.c


BIN
application/aem_watch/resource/multiLang_translate_table.xls


+ 2 - 2
application/aem_watch/simulator/LVGL.Simulator/LVGL.Simulator.vcxproj

@@ -175,6 +175,7 @@
     <ClInclude Include="..\..\src\application\alarm\aem_alarm_settime.h" />
     <ClInclude Include="..\..\src\application\barometer\aem_barometer.h" />
     <ClInclude Include="..\..\src\application\barometer\aem_barometer_set.h" />
+    <ClInclude Include="..\..\src\application\bluetooth\aem_bluetooth.h" />
     <ClInclude Include="..\..\src\application\boot_binding\aem_boot_binding.h" />
     <ClInclude Include="..\..\src\application\boot_binding\aem_language_list_zoom_item.h" />
     <ClInclude Include="..\..\src\application\breathe\aem_breathe.h" />
@@ -396,6 +397,7 @@
     <ClCompile Include="..\..\src\application\aod\aem_aod_pointer.c" />
     <ClCompile Include="..\..\src\application\barometer\aem_barometer.c" />
     <ClCompile Include="..\..\src\application\barometer\aem_barometer_set.c" />
+    <ClCompile Include="..\..\src\application\bluetooth\aem_bluetooth.c" />
     <ClCompile Include="..\..\src\application\boot_binding\aem_boot_binding.c" />
     <ClCompile Include="..\..\src\application\boot_binding\aem_boot_binding_main.c" />
     <ClCompile Include="..\..\src\application\boot_binding\aem_boot_binding_qrcode.c" />
@@ -472,9 +474,7 @@
     <ClCompile Include="..\..\src\application\settings\aem_aod_watchface_set.c" />
     <ClCompile Include="..\..\src\application\settings\aem_app_view.c" />
     <ClCompile Include="..\..\src\application\settings\aem_battery_manager.c" />
-    <ClCompile Include="..\..\src\application\settings\aem_bluetooth.c" />
     <ClCompile Include="..\..\src\application\settings\aem_bt_connect_more.c" />
-    <ClCompile Include="..\..\src\application\settings\aem_bt_operate.c" />
     <ClCompile Include="..\..\src\application\settings\aem_display.c" />
     <ClCompile Include="..\..\src\application\settings\aem_not_disturb.c" />
     <ClCompile Include="..\..\src\application\settings\aem_screen_time.c" />

+ 9 - 6
application/aem_watch/simulator/LVGL.Simulator/LVGL.Simulator.vcxproj.filters

@@ -728,6 +728,9 @@
     <ClInclude Include="..\..\src\application\set_time_date\aem_set_time_date.h">
       <Filter>aem_watch\application\set_time_date</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\application\bluetooth\aem_bluetooth.h">
+      <Filter>aem_watch\application\bluetooth</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <Manifest Include="LVGL.Simulator.manifest" />
@@ -1256,12 +1259,6 @@
     <ClCompile Include="..\..\src\application\settings\aem_battery_manager.c">
       <Filter>aem_watch\application\settings</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\src\application\settings\aem_bluetooth.c">
-      <Filter>aem_watch\application\settings</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\src\application\settings\aem_bt_operate.c">
-      <Filter>aem_watch\application\settings</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\src\application\settings\aem_display.c">
       <Filter>aem_watch\application\settings</Filter>
     </ClCompile>
@@ -1589,6 +1586,9 @@
     <ClCompile Include="..\..\src\application\set_time_date\aem_set_time_date.c">
       <Filter>aem_watch\application\set_time_date</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\application\bluetooth\aem_bluetooth.c">
+      <Filter>aem_watch\application\bluetooth</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="LVGL.Simulator.rc" />
@@ -1994,6 +1994,9 @@
     <Filter Include="aem_watch\application\set_time_date">
       <UniqueIdentifier>{c6d1a7d5-4298-4802-80c5-df587eca3964}</UniqueIdentifier>
     </Filter>
+    <Filter Include="aem_watch\application\bluetooth">
+      <UniqueIdentifier>{af0db16a-1e83-459a-a1f5-79c0f6e6527c}</UniqueIdentifier>
+    </Filter>
   </ItemGroup>
   <ItemGroup>
     <Library Include="..\lib\aem_gui_fwk.lib" />

+ 12 - 5
application/aem_watch/simulator/LVGL.Simulator/bt_watch_simulator.c

@@ -53,6 +53,7 @@ extern void aem_compass_create(void);
 extern void aem_flashlight_create(void);
 extern void aem_stopwatch_app_create(void);
 extern void aem_set_time_date_app_create(void);
+extern void aem_bluetooth_app_create(void);
 extern void aem_phone_create(void);
 extern void aem_sleep_create(void);
 extern void aem_weather_create(void);
@@ -99,6 +100,12 @@ aem_app_info_desc_t aem_app_info_begin[] =
             .key_id = ID_KEY_SETTINGS_SET_TIME_DATE,
             .icon = &IMG_SCENE_APPLIST_RES_SET_TIME_DATE_PIC_ICON,
         },
+        {
+            .app_id = AEM_APP_ID_SET_BLUETOOTH,
+            .app_entry = aem_bluetooth_app_create,
+            .key_id = ID_KEY_SETTINGS_BT,
+            .icon = &IMG_SCENE_APPLIST_RES_BLUETOOTH_PIC_ICON,
+        },
         {
             .app_id = AEM_APP_ID_FLASHLIGHT,
             .app_entry = aem_flashlight_create,
@@ -306,7 +313,7 @@ extern int aem_set_watchface_create(void *user_data);
 extern int aem_aod_display_create(void *user_data);
 extern int aem_aod_watchface_create(void *user_data);
 extern int aem_sliding_effect_create(void *user_data);
-extern int aem_bluetooth_create(void *user_data);
+//extern int aem_bluetooth_create(void *user_data);
 extern int aem_bt_operate_create(void *user_data);
 extern int aem_bt_connect_more_create(void *user_data);
 extern int aem_sound_vibration_create(void *user_data);
@@ -426,10 +433,10 @@ aem_act_list_desc_t aem_app_activity_begin[] =
             .act_id = AEM_SLIDING_EFFECT,
             .activity_entry = aem_sliding_effect_create,
         },
-        {
-            .act_id = AEM_SET_BLUETOOTH,
-            .activity_entry = aem_bluetooth_create,
-        },
+        //{
+        //    .act_id = AEM_SET_BLUETOOTH,
+        //    .activity_entry = aem_bluetooth_create,
+        //},
         //{
         //    .act_id = AEM_SET_BT_OPERATE,
         //    .activity_entry = aem_bt_operate_create,

+ 2 - 1
application/aem_watch/src/application/CMakeLists.txt

@@ -34,4 +34,5 @@ add_subdirectory(barometer)
 add_subdirectory(power_onoff)
 add_subdirectory(boot_binding)
 add_subdirectory(show_logo)
-add_subdirectory(set_time_date)
+add_subdirectory(set_time_date)
+add_subdirectory(bluetooth)

+ 6 - 0
application/aem_watch/src/application/bluetooth/CMakeLists.txt

@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: Apache-2.0
+zephyr_include_directories(
+	.
+)
+
+zephyr_library_sources(aem_bluetooth.c)

+ 440 - 0
application/aem_watch/src/application/bluetooth/aem_bluetooth.c

@@ -0,0 +1,440 @@
+/**
+ * @FileName     : aem_bluetooth.c
+ * @Author       : wingcool_group
+ * @CreateDate   : 2024/12/13 20:06:05
+ * @Description  :
+ **/
+
+#include "aem_bluetooth.h"
+#include "aem_zoom_list.h"
+#include "aem_zoom_label.h"
+#include "aem_def_settings.h"
+#include "aem_log.h"
+#include "../settings/aem_settings_zoom_item.h"
+#include "aem_sys.h"
+#include "text_canvas.h"
+#include "aem_music_service.h"
+#ifndef CONFIG_SIMULATOR
+#include "bt_manager_ble.h"
+#include "bt_manager.h"
+#endif
+
+typedef struct
+{
+    lv_obj_t *page;
+    lv_obj_t *bt;
+    lv_obj_t *bt_switch;
+    lv_obj_t *bt_connect_more;
+    lv_obj_t *list;
+    lv_obj_t *sub_label;
+    aem_bt_device_info_t *info;
+    aem_mac_t mac;
+    lv_timer_t *timer;
+    uint32_t connect_time;
+    bool connecting;
+    bool sw;
+} bluetooth_ui_t;
+static bluetooth_ui_t *s_ui = NULL;
+
+//const uint8_t timeout = 10;
+
+static void aem_bluetooth_updata(void)
+{
+    if (s_ui == NULL)
+        return;
+
+    s_ui->sw = !s_ui->sw;
+#ifndef CONFIG_SIMULATOR
+    bt_manager_set_visible(s_ui->sw);
+    bt_manager_set_connectable(s_ui->sw);
+    
+    if (s_ui->sw)
+    {
+        bt_manager_ble_adv_start();
+    }
+    else
+    {
+        bt_manager_ble_adv_stop();
+        bt_manager_ble_disconnect();
+        bt_manager_stop_auto_reconnect();
+        bt_manager_disconnect_device(BTSRV_DISCONNECT_ALL_MODE);
+    }
+#endif
+    aem_share_set_bt_earphone(s_ui->sw);
+    lv_obj_scroll_to_y(s_ui->page, 0, LV_ANIM_OFF); 
+}
+/*
+static void connect_timer(lv_timer_t *t)
+{
+    if (s_ui == NULL)
+        return;
+
+    if ((aem_get_curr_utc_timestamp() - s_ui->connect_time) >= timeout)
+    {
+        if (s_ui->timer != NULL)
+        {
+            lv_timer_del(s_ui->timer);
+            s_ui->timer = NULL;
+        }
+
+        s_ui->connecting = false;
+        memset(&s_ui->mac, 0x00, sizeof(aem_mac_t));
+        if (s_ui->sub_label != NULL)
+        {
+            text_canvas_set_text(s_ui->sub_label, res_manager_get_string_from_id(ID_KEY_SETUPWIZARD_CONNECT_FAILED));
+        }
+        AEM_LOG_I("s_ui->timer %p", s_ui->timer);
+        aem_bt_inquiry_dev_start();
+    }
+}
+*/
+static void sub_label_del(lv_event_t *event)
+{
+    if (s_ui == NULL)
+        return;
+
+    s_ui->sub_label = NULL;
+}
+
+static void refresh_list(aem_msg_t *msg)
+{
+    static res_string_id_e str_id = ID_KEY_SETTINGS_BT_SCANNING;
+
+    if (UI_BT_EARPHONE_REFRESH != msg->sub_type)
+        return;
+
+    os_printk("bluetooth refresh_list\n");    
+
+    if (0 == msg->data_len)
+    {
+    #ifndef CONFIG_SIMULATOR
+        if (bt_manager_get_ble_state() == BT_STATUS_BLE_CONNECTED)
+    #endif
+        {
+            str_id = ID_KEY_SETTINGS_BT_CONNECTED;
+        }
+        else if(bt_manager_get_ble_state() == BT_STATUS_BLE_DISCONNECTED)
+        {
+            str_id = ID_KEY_SETTINGS_BT_DISCONNECTING;
+        }
+        /*
+        if (s_ui->list)
+        {
+            os_printk("bluetooth BLE scanning\n");
+
+            lv_obj_clean(s_ui->list);
+            lv_obj_t *tips = text_canvas_create(s_ui->list);
+            if (tips)
+            {
+                lv_obj_set_style_text_align(tips, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN);
+                lv_obj_set_style_text_color(tips, lv_color_white(), LV_PART_MAIN);
+                lv_obj_set_style_text_opa(tips, LV_OPA_50, LV_PART_MAIN);
+                lv_obj_set_style_text_font(tips, aem_font_sub(), LV_PART_MAIN);
+                lv_obj_set_style_pad_top(tips, 28, LV_PART_MAIN);
+                text_canvas_set_text(tips, res_manager_get_string_from_id(str_id));
+            }
+            
+        }
+        */
+        return;
+    }
+
+    os_printk("bluetooth BLE disconnect\n");
+
+    aem_bt_device_info_t *info = (aem_bt_device_info_t *)msg->data;
+
+    uint8_t cnt = msg->data_len / sizeof(aem_bt_device_info_t);
+
+    if ((sizeof(aem_bt_device_info_t) * cnt) != msg->data_len)
+    {
+        return;
+    }
+    uint16_t length = msg->data_len;
+
+    if (s_ui->info != NULL)
+    {
+        lv_mem_free(s_ui->info);
+        s_ui->info = NULL;
+    }
+
+    s_ui->info = (aem_bt_device_info_t *)lv_mem_alloc(length);
+
+    if (s_ui->info == NULL)
+    {
+        return;
+    }
+
+    memcpy(s_ui->info, info, length);
+
+    if (s_ui->list == NULL)
+    {
+        return;
+    }
+    lv_obj_clean(s_ui->list);
+}
+
+static void refresh_item(aem_msg_t *msg)
+{
+    if (UI_BT_TRS_STATUS_REFRESH != msg->sub_type)
+        return;
+
+    uint8_t status = msg->data[0];
+
+    if (s_ui->timer != NULL)
+    {
+        lv_timer_del(s_ui->timer);
+        s_ui->timer = NULL;
+    }
+    s_ui->connecting = false;
+    memset(&s_ui->mac, 0x00, sizeof(aem_mac_t));
+    if (s_ui->sub_label != NULL)
+    {
+        if (status == 1)
+        {
+            text_canvas_set_text(s_ui->sub_label, res_manager_get_string_from_id(ID_KEY_SETTINGS_BT_CONNECTED));
+        }
+        else
+        {
+            text_canvas_set_text(s_ui->sub_label, res_manager_get_string_from_id(ID_KEY_SETTINGS_BT_NOT_CONNECTED));
+        }
+    }
+}
+
+static void set_item_hidden(bool status)
+{
+    if (status == true)
+    {
+        if (aem_share_get_lock_time() < 15)
+        {
+            aem_set_screen_lock_time(15);
+        }
+        aem_switch_on(s_ui->bt_switch);
+        if (s_ui->list == NULL)
+        {
+            s_ui->list = aem_bg_create(s_ui->page, DEF_UI_WIDTH, LV_SIZE_CONTENT, lv_color_black());
+            if (s_ui->list)
+            {
+                lv_obj_set_flex_flow(s_ui->list, LV_FLEX_FLOW_COLUMN);
+                lv_obj_set_style_flex_cross_place(s_ui->list, LV_FLEX_ALIGN_CENTER, 0);
+                lv_obj_set_style_flex_track_place(s_ui->list, LV_FLEX_ALIGN_CENTER, 0);
+                /*
+                lv_obj_t *tips = text_canvas_create(s_ui->list);
+                if (tips)
+                {
+                    lv_obj_set_style_text_align(tips, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN);
+                    lv_obj_set_style_text_color(tips, lv_color_white(), LV_PART_MAIN);
+                    lv_obj_set_style_text_opa(tips, LV_OPA_50, LV_PART_MAIN);
+                    lv_obj_set_style_text_font(tips, aem_font_sub(), LV_PART_MAIN);
+                    lv_obj_set_style_pad_top(tips, 28, LV_PART_MAIN);
+                    text_canvas_set_text(tips, res_manager_get_string_from_id(ID_KEY_SETTINGS_BT_SCANNING));
+                }
+                */
+            }
+#if 0//def CONFIG_SIMULATOR
+            if (s_ui->info != NULL)
+            {
+                lv_mem_free(s_ui->info);
+                s_ui->info = NULL;
+            }
+
+            uint8_t cnt = lv_rand(1, 5);
+            s_ui->info = (aem_bt_device_info_t *)lv_mem_alloc(sizeof(aem_bt_device_info_t) * cnt);
+            if (s_ui->info)
+            {
+                for (size_t i = 0; i < cnt; i++)
+                {
+                    sprintf(s_ui->info[i].name, "earphone%d", lv_rand(0, 9));
+                    s_ui->info[i].paired = lv_rand(0, 1);
+                    s_ui->info[i].connected = lv_rand(0, 1);
+                    update_ui(&s_ui->info[i]);
+                }
+            }
+#endif // CONFIG_SIMULATOR
+#ifdef CONFIG_SIMULATOR
+            res_string_id_e str_id = ID_KEY_SETTINGS_BT_SCANNING;
+
+            str_id = ID_KEY_SETTINGS_BT_CONNECTED;
+    
+            lv_obj_t *tips = text_canvas_create(s_ui->list);
+            if (tips)
+            {
+                lv_obj_set_style_text_align(tips, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN);
+                lv_obj_set_style_text_color(tips, lv_color_white(), LV_PART_MAIN);
+                lv_obj_set_style_text_opa(tips, LV_OPA_50, LV_PART_MAIN);
+                lv_obj_set_style_text_font(tips, aem_font_sub(), LV_PART_MAIN);
+                lv_obj_set_style_pad_top(tips, 28, LV_PART_MAIN);
+                text_canvas_set_text(tips, res_manager_get_string_from_id(str_id));
+            }
+#endif // CONFIG_SIMULATOR
+        }
+    }
+    else
+    {
+        aem_switch_off(s_ui->bt_switch);
+
+        if (s_ui->list)
+        {
+            lv_obj_clean(s_ui->list);
+            lv_obj_del(s_ui->list);
+            s_ui->list = NULL;
+        }
+    }
+    if (status == false)
+    {
+        aem_bt_trs_disconnect_device();
+    }
+    else
+    {
+        AEM_LOG_I("set_item_hidden");
+        aem_bt_inquiry_dev_start();
+    }
+}
+
+static void switch_event_handler(lv_event_t *event)
+{
+    if (s_ui == NULL)
+        return;
+
+    aem_bluetooth_updata();
+    set_item_hidden(s_ui->sw);
+    s_ui->connect_time = 0xFF;
+
+    aem_os_settings_data_write();  //保存设置
+}
+
+static void connect_more_event_handler(lv_event_t *event)
+{
+    if (s_ui == NULL)
+        return;
+
+    aem_activity_run(AEM_SET_BT_CONNECT_MORE, NULL);
+}
+
+static void create_ui(void)
+{
+    if (s_ui != NULL)
+        return;
+
+    s_ui = (bluetooth_ui_t *)lv_mem_alloc(sizeof(bluetooth_ui_t));
+
+    if (s_ui == NULL)
+    {
+        return;
+    }
+    lv_memset(s_ui, 0, sizeof(bluetooth_ui_t));
+
+    s_ui->info = NULL;
+
+    s_ui->page = aem_page_create(lv_scr_act());
+    if (s_ui->page)
+    {
+        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_BT));
+
+        s_ui->bt = aem_icon_double_label_switch_item_create(s_ui->page,
+            &IMG_SCENE_BLUETOOTH_PIC_BLUETOOTH, res_manager_get_string_from_id(ID_KEY_SETTINGS_BT_HEADSET), NULL);
+        if (s_ui->bt)
+        {
+            lv_obj_add_event_cb(s_ui->bt, switch_event_handler, LV_EVENT_SHORT_CLICKED, NULL);
+
+            s_ui->bt_switch = aem_icon_double_label_switch_item_get_switch(s_ui->bt);
+            if (s_ui->bt_switch)
+            {
+                lv_obj_clear_flag(s_ui->bt_switch, LV_OBJ_FLAG_CLICKABLE);
+            }
+        }
+
+        s_ui->bt_connect_more = aem_settings_zoom_item_create(s_ui->page);
+        if (s_ui->bt_connect_more)
+        {
+            aem_settings_zoom_item_set_src(s_ui->bt_connect_more, &IMG_SCENE_BLUETOOTH_PIC_CONNECT_MORE);
+            aem_settings_zoom_item_set_text(s_ui->bt_connect_more, res_manager_get_string_from_id(ID_KEY_SETTINGS_SYSTEM_CONNECT_TO));
+            aem_settings_zoom_item_click_cb(s_ui->bt_connect_more, connect_more_event_handler, NULL);
+        }
+    }
+
+    s_ui->sw = false;
+}
+
+/////////////////////////////////////////////////////
+
+static void on_start(void)
+{
+    create_ui();
+}
+
+static void on_resume(void)
+{
+    if (s_ui != NULL && s_ui->page != NULL)
+    {
+        s_ui->sw = aem_share_get_bt_earphone();
+        if (s_ui->sw == true)
+        {
+            set_item_hidden(s_ui->sw);
+        }
+    }
+}
+
+static void on_suspend(void)
+{
+}
+
+static void on_close(void)
+{
+    if (s_ui != NULL)
+    {
+        if (s_ui->list)
+        {
+            lv_obj_clean(s_ui->list);
+            lv_obj_del(s_ui->list);
+            s_ui->list = NULL;
+        }
+
+        if (s_ui->page != NULL)
+        {
+            lv_obj_del(s_ui->page);
+            s_ui->page = NULL;
+        }
+
+        if (s_ui->info != NULL)
+        {
+            lv_mem_free(s_ui->info);
+            s_ui->info = NULL;
+        }
+
+        lv_mem_free(s_ui);
+        s_ui = NULL;
+    } 
+}
+
+static void on_ui_refresh(aem_msg_t *msg)
+{
+    if (NULL == msg || s_ui == NULL)
+        return;
+
+    refresh_list(msg);
+    refresh_item(msg);
+}
+
+static int32_t keypad_evt_handler(aem_key_evt_info_t *evt_info)
+{
+    // AEM_LOG_I("aem_test keypad id:%s click:%s \n", get_aem_key_name(evt_info->key_id), get_aem_key_click_type_name(evt_info->key_click_type));
+
+    if (s_ui != NULL && s_ui->page != NULL)
+    {
+        aem_zoom_list_keypad_handler(s_ui->page, evt_info);
+    }
+
+    return 0;
+}
+
+static const aem_sys_evt_ops_t ops = {
+    .key_evt_func = keypad_evt_handler,
+};
+
+void aem_bluetooth_app_create()
+{
+    aem_app_launch(AEM_APP_ID_SET_BLUETOOTH, AEM_APP_BLUETOOTH, on_start, on_resume, on_suspend, on_close, on_ui_refresh, &ops);
+}
+
+AEM_APP_DEFINE(AEM_APP_ID_SET_BLUETOOTH, AEM_DEFAULT_APP, ID_KEY_SETTINGS_BT, IMG_SCENE_APPLIST_RES_BLUETOOTH_PIC_ICON, aem_bluetooth_app_create);

+ 75 - 0
application/aem_watch/src/application/bluetooth/aem_bluetooth.h

@@ -0,0 +1,75 @@
+#ifndef LV_AEM_BLUETOOTH_H
+#define LV_AEM_BLUETOOTH_H
+
+
+#include "app_ui.h"
+#include "aem_bg.h"
+#include "aem_page.h"
+#include "aem_title.h"
+#include "aem_switch.h"
+#include "aem_curve_btn.h"
+#include "aem_radio_btn.h"
+#include "aem_double_label.h"
+#include "aem_single_zoom_btn.h"
+#include "aem_double_label_icon_item.h"
+#include "aem_icon_double_label_item.h"
+#include "aem_icon_double_label_switch_item.h"
+#include "aem_icon_double_label_radio_btn_item.h"
+#include "aem_sys_function_interface.h"
+#include "aem_app_fwk.h"
+#include "aem_activity_id.h"
+#include "aem_app_activity.h"
+#include "aem_activity_list.h"
+#include "aem_data_share.h"
+
+#define SETTINGS_PAD_BOTTOM     AEM_PUB_WIDGET_ITEM_MIN_H
+/*
+typedef enum
+{
+    AEM_RINGTONE,
+    AEM_MEDIA,
+    AEM_VIBRATE,
+    AEM_BRIGHTNESS,
+} aem_regulator_type_e;
+
+typedef enum
+{
+    AEM_TEMPERATURE,
+    AEM_DISTANCE,
+    // AEM_WEIGHT,
+    AEM_UNIT_MAX,
+} aem_unit_type_e;
+
+typedef enum
+{
+    AEM_AOD_START,
+    AEM_AOD_END,
+    AEM_WAKE_START,
+    AEM_WAKE_END,
+    AEM_DND_START,
+    AEM_DND_END,
+    AEM_TIME,
+    AEM_DATE,
+} aem_set_time_type_e;
+
+typedef enum
+{
+    AEM_CONNECT_MORE,
+    AEM_RESET,
+    AEM_RESTART,
+    AEM_POWER_OFF,
+    AEM_BLUETOOTH,
+    AEM_SYSTEM_END,
+} aem_system_type_e;
+
+typedef enum
+{
+    TXT_SCHEDULED,
+    TXT_START_TIME,
+    TXT_END_TIME,
+    TXT_OK,
+} aem_common_txt_e;
+*/
+void aem_bluetooth_app_create(void);
+
+#endif

+ 1 - 1
application/aem_watch/src/application/boot_binding/aem_boot_binding_main.c

@@ -65,7 +65,7 @@ static void create_ui(void)
     lv_obj_t *tips = text_canvas_create(s_bind_qrcode_ui->page);
     if (tips)
     {
-        lv_obj_set_style_text_font(tips, aem_font_def(), 0);
+        lv_obj_set_style_text_font(tips, aem_font_sub(), 0);
         lv_obj_set_width(tips, AEM_SIZE_HOR_FACTOR_466(386));
         text_canvas_set_long_mode(tips, TEXT_CANVAS_LONG_WRAP);
         text_canvas_set_text(tips, res_manager_get_string_from_id(ID_KEY_SETUPWIZARD_DOWNLOAD_APP));

+ 2 - 1
application/aem_watch/src/application/boot_binding/aem_boot_binding_qrcode.c

@@ -15,6 +15,7 @@
 #include "aem_single_zoom_btn.h"
 #include "aem_app_fwk.h"
 #include "aem_log.h"
+#include "aem_adapter_dev.h"
 #ifndef CONFIG_SIMULATOR
 #include "aem_ble_data_share.h"
 #include "aem_app_event.h"
@@ -93,7 +94,7 @@ static void create_ui(void)
         lv_obj_align(s_bind_qrcode_ui->qrcode, LV_ALIGN_CENTER, 0, 0);
     }
 
-    aem_dev_info_t info = aem_get_device_info();
+    aem_dev_info_t info = get_device_info();//aem_get_device_info();
     strcat(info.device_name, "_");
     strcat(info.device_name, mac);
 

+ 2 - 2
application/aem_watch/src/application/quick_settings/aem_quick_setting_bluetooth_setting.c

@@ -23,8 +23,8 @@ static void card_event_cb(lv_event_t *e)
 
     if (LV_EVENT_CLICKED == e->code)
     {
-        //aem_app_run(AEM_APP_ID_SETTINGS);
-        aem_activity_run(AEM_SET_BLUETOOTH, NULL);
+        aem_app_run(AEM_APP_ID_SET_BLUETOOTH);
+        //aem_activity_run(AEM_SET_BLUETOOTH, NULL);
     }
 }
 

+ 15 - 13
application/aem_watch/src/application/settings/aem_about_watch.c

@@ -13,6 +13,7 @@
 #include <aem_pop_windows_test.h>
 #include "aem_double_label.h"
 #include "aem_log.h"
+#include "aem_adapter_dev.h"
 
 #ifndef CONFIG_SIMULATOR
 #include "aem_sleep_his_data.h"
@@ -113,11 +114,12 @@ static void create_about_ui(void)
     char mac_str[7] = { 0 };
     char str[30] = { 0 };
 
-    aem_dev_info_t info = aem_get_device_info();
+    aem_dev_info_t info = get_device_info();//aem_get_device_info();
 
     s_ui->device = aem_double_label_create(s_ui->bg1, res_manager_get_string_from_id(ID_KEY_SETTINGS_ABOUT_DEVICE_NAME), info.device_name);
 
-    sprintf(str, "%d", info.device_id);
+    //sprintf(str, "%d", info.device_id);
+    sprintf(str, "%s", info.device_id);
     s_ui->model = aem_double_label_create(s_ui->bg1, res_manager_get_string_from_id(ID_KEY_SETTINGS_ABOUT_MODEL), str);
 
     sprintf(str, "%d.%d.%d", info.major_v, info.minor_v, info.micro_v);
@@ -138,7 +140,7 @@ static void create_about_ui(void)
     ascii_conversion(str);
     s_ui->mac = aem_double_label_create(s_ui->bg1, res_manager_get_string_from_id(ID_KEY_SETTINGS_WATCH_MAC), str);
 
-    s_ui->sn = aem_double_label_create(s_ui->bg1, res_manager_get_string_from_id(ID_KEY_SETTINGS_WATCH_SN), "name");
+    s_ui->sn = aem_double_label_create(s_ui->bg1, res_manager_get_string_from_id(ID_KEY_SETTINGS_WATCH_SN), "NULL");
 }
 
 static void debug_event_cb(lv_event_t *event)
@@ -155,14 +157,14 @@ static void debug_event_cb(lv_event_t *event)
     {
         aem_activity_run(AEM_SET_LANGUAGE, NULL);
     }
-    else if (event->current_target == s_ui->set_date)
-    {
-        aem_activity_run(AEM_SET_TIME, (void *)AEM_DATE);
-    }
-    else if (event->current_target == s_ui->set_time)
-    {
-        aem_activity_run(AEM_SET_TIME, (void *)AEM_TIME);
-    }
+    //else if (event->current_target == s_ui->set_date)
+    //{
+    //    aem_activity_run(AEM_SET_TIME, (void *)AEM_DATE);
+    //}
+    //else if (event->current_target == s_ui->set_time)
+    //{
+    //   aem_activity_run(AEM_SET_TIME, (void *)AEM_TIME);
+    //}
     else if (event->current_target == s_ui->system_anim)
     {
         aem_activity_run(AEM_SLIDING_EFFECT, NULL);
@@ -263,7 +265,7 @@ static void create_debug_ui(void)
             lv_obj_add_event_cb(s_ui->language, debug_event_cb, LV_EVENT_SHORT_CLICKED, NULL);
         }
     }
-
+    /*
     if (!s_ui->set_date)
     {
         s_ui->set_date = aem_double_label_icon_item_create(s_ui->bg2, "date", NULL, NULL);
@@ -288,7 +290,7 @@ static void create_debug_ui(void)
         sprintf(count, "%d", aem_check_screen_lock_time());
         s_ui->wake_lock = aem_double_label_create(s_ui->bg2, "wake lock", count);
     }
-
+    */
     /*if (!s_ui->fps)
     {
         s_ui->fps = aem_icon_double_label_switch_item_create(s_ui->bg2, NULL, "FPS", NULL);

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

@@ -157,7 +157,7 @@ static void create_ui(void)
         lv_obj_set_width(tips, AEM_SIZE_FACTOR_466(tipe_w));
         lv_obj_set_style_text_align(tips, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN);
         lv_obj_set_style_text_color(tips, lv_color_white(), LV_PART_MAIN);
-        lv_obj_set_style_text_font(tips, aem_font_def(), LV_PART_MAIN);
+        lv_obj_set_style_text_font(tips, aem_font_sub(), LV_PART_MAIN);
         lv_obj_add_flag(tips, LV_OBJ_FLAG_CLICKABLE);
 
         text_canvas_set_text(tips, res_manager_get_string_from_id(_str_ids[1]));

+ 5 - 5
application/aem_watch/src/application/settings/aem_settings.c

@@ -22,7 +22,7 @@ static setting_ui_t *s_ui = NULL;
 
 static aem_app_id_e activity_id[] = {
     //AEM_SET_WATCHFACE,
-    AEM_SET_BLUETOOTH,
+    //AEM_SET_BLUETOOTH,
     //AEM_SET_SOUND_VIBRATION,
     //AEM_SET_DISPLAY,
     //AEM_SET_APP_VIEW,
@@ -35,10 +35,10 @@ static aem_app_id_e activity_id[] = {
     AEM_SET_ABOUT_WATCH,
 };
 
-static res_string_id_e get_str[3] =
+static res_string_id_e get_str[2] =
     {
         //ID_KEY_SETTINGS_WATCHFACE_HOME,
-        ID_KEY_SETTINGS_BT,
+        //ID_KEY_SETTINGS_BT,
         //ID_KEY_SETTINGS_SOUNDS,
         //ID_KEY_SETTINGS_DISPLAY,
         //ID_KEY_APP_VIEW,
@@ -51,10 +51,10 @@ static res_string_id_e get_str[3] =
         ID_KEY_SETTINGS_ABOUT,
 };
 
-static lv_img_dsc_t *get_img[3] =
+static lv_img_dsc_t *get_img[2] =
     {
         //&IMG_SCENE_SETTINGS_RES_LIST_PIC_WATCHFACE_LAUNCH,
-        &IMG_SCENE_SETTINGS_RES_LIST_PIC_BLUETOOTH,
+        //&IMG_SCENE_SETTINGS_RES_LIST_PIC_BLUETOOTH,
         //&IMG_SCENE_SETTINGS_RES_LIST_PIC_SOUND_VIBRATION,
         //&IMG_SCENE_SETTINGS_RES_LIST_PIC_DISPLAY,
         //&IMG_SCENE_SETTINGS_RES_LIST_PIC_APP_VIEW,

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

@@ -64,7 +64,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_BLUETOOTH; i++)
+        for (int i = AEM_RESET; i < AEM_POWER_OFF; 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)

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

@@ -6,8 +6,8 @@
 #define MAJOR_VERSION 1
 #define MINOR_VERSION 0
 #define MICRO_VERSION 1
-#define DEVICE_ID 3085
-#define DEVICE_NAME "3085S WATCH"
-#define DEVICE_NAME_UI "3085S WATCH"
-#define DEVICE_MODEL "3085S WATCH"
+#define DEVICE_ID "CJ01"//3085
+#define DEVICE_NAME "Catsights"//"3085S WATCH"
+#define DEVICE_NAME_UI "Catsights"//"3085S WATCH"
+#define DEVICE_MODEL "Catsights"//"3085S WATCH"
 #endif

+ 3 - 2
thirdparty/lib/aem/adapter/peripheral/aem_adapter_dev.c

@@ -235,10 +235,11 @@ static int set_rtc_time(aem_time_t *time)
     return ret;
 }
 
-static aem_dev_info_t get_device_info(void)
+aem_dev_info_t get_device_info(void)
 {
     aem_dev_info_t info = { 0 };
-    info.device_id = DEVICE_ID;
+    //info.device_id = DEVICE_ID;
+    sprintf(info.device_id, "%s", DEVICE_ID);
     info.major_v = MAJOR_VERSION;
     info.minor_v = MINOR_VERSION;
     info.micro_v = MICRO_VERSION;

+ 2 - 0
thirdparty/lib/aem/adapter/peripheral/aem_adapter_dev.h

@@ -61,4 +61,6 @@ uint8_t aem_bat_charge_upate_evt_cb_register(aem_bat_charge_upate_evt_api_t cb);
 
 void aem_adapter_dev_update_bat_charge_event(uint16_t cmd);
 
+aem_dev_info_t get_device_info(void);
+
 #endif /* AEM_DEV_ADAPT_H */

+ 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 "202410281610"
+#define BUILD_TIME "202412131837"
 #define AEM_GUI_FWK_LIB_VER "2.0.0.0"
 #define APP_DOWNLOAD_URL "https://customer.com"
 #define AEM_APP_TRANS_ANIMATION 1

+ 2 - 0
thirdparty/lib/aem/include/aem_app_id.h

@@ -24,6 +24,7 @@ typedef enum
     AEM_APP_ID_TIMER,
     AEM_APP_ID_STOPWATCH,
     AEM_APP_ID_SET_TIME_DATE,
+    AEM_APP_ID_SET_BLUETOOTH,
     AEM_APP_ID_WEATHER,
     AEM_APP_ID_SLEEP,
     AEM_APP_ID_STRESS,
@@ -82,6 +83,7 @@ typedef enum
 #define AEM_APP_ALARM "alarm"
 #define AEM_APP_TIMER "timer"
 #define AEM_APP_TIME_DATE "time_date"
+#define AEM_APP_BLUETOOTH "bluetooth"
 #define AEM_APP_BAROMETER "barometer"
 #define AEM_APP_BOOT_BINDING "boot_binding"
 #define AEM_APP_CUSTOM_TEST "custom_test"

+ 2 - 1
thirdparty/lib/aem/include/aem_core_if.h

@@ -215,7 +215,8 @@ typedef struct
     uint8_t major_v;
     uint8_t minor_v;
     uint8_t micro_v;
-    uint16_t device_id;
+    //uint16_t device_id;
+    char device_id[10];
     char device_name[20];
 } aem_dev_info_t;
 

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff