Forráskód Böngészése

增加输入、输出功耗、电压、电流的UI显示(字体可能还需要做调整)
launch应用下不显示WIDGET_ID_OFTEN_WORKOUT

mohliy 4 hónapja
szülő
commit
91fda6cbf4
43 módosított fájl, 2052 hozzáadás és 430 törlés
  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. 77 76
      application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/strvalue.txt
  6. 0 0
      application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/txt/bt_watch_12.txt
  7. 1 1
      application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/txt/bt_watch_12_enG.txt
  8. 0 0
      application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/txt/bt_watch_12_zhC.txt
  9. 1 1
      application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/txt/bt_watch_36.txt
  10. 1 1
      application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/txt/bt_watch_36_enG.txt
  11. 1 1
      application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/txt/bt_watch_36_zhC.txt
  12. BIN
      application/aem_watch/resource/360x360/applist/png/icon/in_out_power.png
  13. 185 0
      application/aem_watch/resource/360x360/bt_watch.ui
  14. 76 76
      application/aem_watch/resource/360x360/bt_watch_enG.c
  15. 8 0
      application/aem_watch/resource/360x360/bt_watch_sty.h
  16. 76 76
      application/aem_watch/resource/360x360/bt_watch_zhC.c
  17. BIN
      application/aem_watch/resource/360x360/in_out_power/in.png
  18. BIN
      application/aem_watch/resource/360x360/in_out_power/out.png
  19. BIN
      application/aem_watch/resource/360x360/in_out_power/point_line.png
  20. BIN
      application/aem_watch/resource/360x360/in_out_power/电压.png
  21. BIN
      application/aem_watch/resource/360x360/in_out_power/电流.png
  22. BIN
      application/aem_watch/resource/360x360/in_out_power/箭头.png
  23. BIN
      application/aem_watch/resource/360x360/in_out_power/连接.png
  24. BIN
      application/aem_watch/resource/360x360/launch/in_out_power.png
  25. 7 0
      application/aem_watch/resource/360x360/res_include.h
  26. 78 77
      application/aem_watch/resource/360x360/res_string_id.c
  27. 142 114
      application/aem_watch/resource/360x360/res_style_bitmap.c
  28. BIN
      application/aem_watch/resource/multiLang_translate_table.xls
  29. BIN
      application/aem_watch/simulator/LVGL.Simulator/LVGL.Simulator.aps
  30. 5 0
      application/aem_watch/simulator/LVGL.Simulator/LVGL.Simulator.vcxproj
  31. 24 6
      application/aem_watch/simulator/LVGL.Simulator/LVGL.Simulator.vcxproj.filters
  32. 13 0
      application/aem_watch/simulator/LVGL.Simulator/bt_watch_simulator.c
  33. 1 0
      application/aem_watch/src/application/CMakeLists.txt
  34. 9 0
      application/aem_watch/src/application/in_out_power/CMakeLists.txt
  35. 793 0
      application/aem_watch/src/application/in_out_power/aem_in_out_power.c
  36. 8 0
      application/aem_watch/src/application/in_out_power/aem_in_out_power.h
  37. 348 0
      application/aem_watch/src/application/in_out_power/aem_in_out_power_screen.c
  38. 12 0
      application/aem_watch/src/application/in_out_power/aem_in_out_power_screen.h
  39. 153 0
      application/aem_watch/src/application/in_out_power/aem_widget_in_out_power.c
  40. 29 1
      thirdparty/lib/aem/adapter/def_settings/aem_adapter_def_settings.c
  41. 2 0
      thirdparty/lib/aem/include/aem_app_id.h
  42. 1 0
      thirdparty/lib/aem/include/framework/core/app_mgr/include/aem_ui_refr.h
  43. 1 0
      thirdparty/lib/aem/include/framework/core/watch_fwk/watch_face/aem_watchface_mgr.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


+ 77 - 76
application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/strvalue.txt

@@ -336,79 +336,80 @@ key_widget_add 334
 key_widget_download_failed 335
 key_widget_explore 336
 key_widget_health 337
-key_widget_life 338
-key_widget_measuring 339
-key_widget_workout 340
-key_widgets 341
-key_workout_agps_data 342
-key_workout_ai_ahead 343
-key_workout_ai_behind 344
-key_workout_aver_pace 345
-key_workout_aver_step_freq 346
-key_workout_badminton 347
-key_workout_bpm 348
-key_workout_calorie 349
-key_workout_click_to_pause 350
-key_workout_cycle_indoor 351
-key_workout_cycle_outdoor 352
-key_workout_distance 353
-key_workout_distance_unit_km 354
-key_workout_distance_unit_mile 355
-key_workout_duration_end 356
-key_workout_end_confirm 357
-key_workout_exercised 358
-key_workout_goal_settings 359
-key_workout_gps 360
-key_workout_gps_error 361
-key_workout_gps_tips 362
-key_workout_hike 363
-key_workout_hr_max_hr 364
-key_workout_hr_min_hr 365
-key_workout_interval_reminder 366
-key_workout_jump 367
-key_workout_kcal 368
-key_workout_kilocalorie 369
-key_workout_kilometer 370
-key_workout_km 371
-key_workout_km_h 372
-key_workout_km_km 373
-key_workout_manager 374
-key_workout_mi_h 375
-key_workout_mi_mi 376
-key_workout_mile 377
-key_workout_min_min 378
-key_workout_move_open_area 379
-key_workout_moving 380
-key_workout_no_reminder 381
-key_workout_open_goal 382
-key_workout_open_water_swim 383
-key_workout_pace 384
-key_workout_pause 385
-key_workout_pool_length 386
-key_workout_pool_swim 387
-key_workout_positioning_failed 388
-key_workout_positioning_successf 389
-key_workout_recent_sports 390
-key_workout_repositioning 391
-key_workout_rope_skipping 392
-key_workout_run_indoor 393
-key_workout_run_outdoor 394
-key_workout_settings 395
-key_workout_settings_auto_pause 396
-key_workout_settings_auto_recogn 397
-key_workout_settings_hr_tips 398
-key_workout_settings_hr_warning 399
-key_workout_settings_hr_warningl 400
-key_workout_skip 401
-key_workout_speed 402
-key_workout_spm 403
-key_workout_start 404
-key_workout_step_frequency 405
-key_workout_steps 406
-key_workout_steps_steps 407
-key_workout_tennis 408
-key_workout_time 409
-key_workout_unit_pcs 410
-key_workout_wait 411
-key_workout_yd 412
-key_workout_yoga 413
+key_widget_in_out_power 338
+key_widget_life 339
+key_widget_measuring 340
+key_widget_workout 341
+key_widgets 342
+key_workout_agps_data 343
+key_workout_ai_ahead 344
+key_workout_ai_behind 345
+key_workout_aver_pace 346
+key_workout_aver_step_freq 347
+key_workout_badminton 348
+key_workout_bpm 349
+key_workout_calorie 350
+key_workout_click_to_pause 351
+key_workout_cycle_indoor 352
+key_workout_cycle_outdoor 353
+key_workout_distance 354
+key_workout_distance_unit_km 355
+key_workout_distance_unit_mile 356
+key_workout_duration_end 357
+key_workout_end_confirm 358
+key_workout_exercised 359
+key_workout_goal_settings 360
+key_workout_gps 361
+key_workout_gps_error 362
+key_workout_gps_tips 363
+key_workout_hike 364
+key_workout_hr_max_hr 365
+key_workout_hr_min_hr 366
+key_workout_interval_reminder 367
+key_workout_jump 368
+key_workout_kcal 369
+key_workout_kilocalorie 370
+key_workout_kilometer 371
+key_workout_km 372
+key_workout_km_h 373
+key_workout_km_km 374
+key_workout_manager 375
+key_workout_mi_h 376
+key_workout_mi_mi 377
+key_workout_mile 378
+key_workout_min_min 379
+key_workout_move_open_area 380
+key_workout_moving 381
+key_workout_no_reminder 382
+key_workout_open_goal 383
+key_workout_open_water_swim 384
+key_workout_pace 385
+key_workout_pause 386
+key_workout_pool_length 387
+key_workout_pool_swim 388
+key_workout_positioning_failed 389
+key_workout_positioning_successf 390
+key_workout_recent_sports 391
+key_workout_repositioning 392
+key_workout_rope_skipping 393
+key_workout_run_indoor 394
+key_workout_run_outdoor 395
+key_workout_settings 396
+key_workout_settings_auto_pause 397
+key_workout_settings_auto_recogn 398
+key_workout_settings_hr_tips 399
+key_workout_settings_hr_warning 400
+key_workout_settings_hr_warningl 401
+key_workout_skip 402
+key_workout_speed 403
+key_workout_spm 404
+key_workout_start 405
+key_workout_step_frequency 406
+key_workout_steps 407
+key_workout_steps_steps 408
+key_workout_tennis 409
+key_workout_time 410
+key_workout_unit_pcs 411
+key_workout_wait 412
+key_workout_yd 413
+key_workout_yoga 414

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/txt/bt_watch_12.txt


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

@@ -1 +1 @@
-0X20-0X77,0X78,0X79,0X7A,0XAB,0XB0,0XBB,0XBF,0XC0,0XC1,0XC4,0XC5,0XC7,0XC9,0XCA,0XD6,0XDA,0XDC,0XDF,0XE0,0XE1,0XE2,0XE3,0XE4,0XE5,0XE7,0XE8,0XE9,0XEA,0XED,0XEE,0XF1,0XF3,0XF4,0XF5,0XF6,0XFA,0XFB,0XFC,0X105,0X106,0X107,0X119,0X11F,0X130,0X131,0X141,0X142,0X144,0X152,0X15A,0X15B,0X15E,0X15F,0X17A,0X17C,0X410,0X411,0X412,0X413,0X414,0X415,0X416,0X417,0X418,0X419,0X41A,0X41B,0X41C,0X41D,0X41E,0X41F,0X420,0X421,0X422,0X423,0X424,0X425,0X426,0X427,0X428,0X42D,0X42E,0X42F,0X430,0X431,0X432,0X433,0X434,0X435,0X436,0X437,0X438,0X439,0X43A,0X43B,0X43C,0X43D,0X43E,0X43F,0X440,0X441,0X442,0X443,0X444,0X445,0X446,0X447,0X448,0X449,0X44A,0X44B,0X44C,0X44D,0X44E,0X44F,0X5D0,0X5D1,0X5D2,0X5D3,0X5D4,0X5D5,0X5D6,0X5D7,0X5D8,0X5D9,0X5DA,0X5DB,0X5DC,0X5DD,0X5DE,0X5DF,0X5E0,0X5E1,0X5E2,0X5E3,0X5E4,0X5E5,0X5E6,0X5E7,0X5E8,0X5E9,0X5EA,0X60C,0X61B,0X61F,0X621,0X622,0X623,0X624,0X625,0X626,0X627,0X628,0X629,0X62A,0X62B,0X62C,0X62D,0X62E,0X62F,0X630,0X631,0X632,0X633,0X634,0X635,0X636,0X637,0X638,0X639,0X63A,0X641,0X642,0X643,0X644,0X645,0X646,0X647,0X648,0X649,0X64A,0X64B,0X64D,0X64F,0X67E,0X686,0X698,0X6A9,0X6AF,0X6CC,0X6F1,0X6F2,0X6F3,0X6F4,0X6F5,0X6F6,0X200C,0X2026,0XFF01,0XFF08,0XFF09,0XFF1A,0XFF1B
+0X20-0X77

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
application/aem_watch/boards/ats3085s4_dev_watch_ext_nor/res/txt/bt_watch_12_zhC.txt


+ 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,0X529B,0X52A8,0X52A9,0X5357,0X5386,0X538B,0X5438,0X547C,0X5668,0X5929,0X5973,0X5E38,0X5EB7,0X5F55,0X5FC3,0X6027,0X624B,0X627E,0X6307,0X65E5,0X65F6,0X673A,0X6C14,0X6C27,0X6D3B,0X7387,0X7535,0X76F8,0X7720,0X7761,0X79D2,0X7B52,0X7B97,0X7F6E,0X8840,0X8868,0X8BA1,0X8BB0,0X8BBE,0X8BDD,0X8BED,0X8FD0,0X9488,0X949F,0X95F9,0X97F3
+0X20-0X77,0X7A,0XE1,0XE4,0XE9,0XFC,0X142,0X415,0X430,0X432,0X434,0X435,0X436,0X438,0X43A,0X43D,0X43E,0X441,0X442,0X44C,0X44F,0X5D5,0X5D9,0X5DC,0X5DE,0X5E2,0X5E4,0X5EA,0X627,0X62A,0X631,0X632,0X634,0X637,0X639,0X641,0X644,0X645,0X646,0X647,0X648,0X64A,0X6CC,0X200C,0X5165,0X51FA,0X529F,0X8017,0X8F93

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

@@ -1 +1 @@
-0X20-0X77,0X79
+0X20-0X77

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

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

BIN
application/aem_watch/resource/360x360/applist/png/icon/in_out_power.png


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

@@ -247,6 +247,53 @@
                     <property name="strid" value="key_app_workout_activity" />
                 </element>
             </element>
+            <element class="resgroup_resource">
+                <property name="name" value="res_in_out_power" />
+                <property name="id" value="33259" />
+                <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="33260" />
+                    <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\in_out_power.png" />
+                    </element>
+                </element>
+                <element class="string_resource">
+                    <property name="name" value="str_text" />
+                    <property name="id" value="33261" />
+                    <property name="x" value="0x0064" />
+                    <property name="y" value="0x0000" />
+                    <property name="width" value="0x00a0" />
+                    <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_widget_in_out_power" />
+                </element>
+            </element>
             <element class="resgroup_resource">
                 <property name="name" value="res_phone" />
                 <property name="id" value="31184" />
@@ -18244,6 +18291,21 @@
                     <property name="0" value=".\launch\activity.png" />
                 </element>
             </element>
+            <element class="picture_resource">
+                <property name="name" value="PIC_IN_OUT_POWER" />
+                <property name="id" value="33255" />
+                <property name="x" value="0x0000" />
+                <property name="y" value="0x0000" />
+                <property name="width" value="0x00aa" />
+                <property name="height" value="0x00aa" />
+                <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=".\launch\in_out_power.png" />
+                </element>
+            </element>
             <element class="picture_resource">
                 <property name="name" value="PIC_HR" />
                 <property name="id" value="32468" />
@@ -21244,6 +21306,119 @@
             </element>
         </element>
     </scene>
+    <scene>
+        <property name="name" value="SCENE_IN_OUT_POWER" />
+        <property name="id" value="33256" />
+        <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="33257" />
+            <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_POINT_LINE" />
+                <property name="id" value="33267" />
+                <property name="x" value="0x0000" />
+                <property name="y" value="0x001d" />
+                <property name="width" value="0x0168" />
+                <property name="height" value="0x0096" />
+                <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=".\in_out_power\point_line.png" />
+                </element>
+            </element>
+            <element class="picture_resource">
+                <property name="name" value="PIC_IN" />
+                <property name="id" value="33262" />
+                <property name="x" value="0x0013" />
+                <property name="y" value="0x00c5" />
+                <property name="width" value="0x002c" />
+                <property name="height" value="0x002c" />
+                <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=".\in_out_power\in.png" />
+                </element>
+            </element>
+            <element class="picture_resource">
+                <property name="name" value="PIC_LINK" />
+                <property name="id" value="33263" />
+                <property name="x" value="0x009a" />
+                <property name="y" value="0x0147" />
+                <property name="width" value="0x0022" />
+                <property name="height" value="0x0010" />
+                <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=".\in_out_power\连接.png" />
+                </element>
+            </element>
+            <element class="picture_resource">
+                <property name="name" value="PIC_OUT" />
+                <property name="id" value="33266" />
+                <property name="x" value="0x0125" />
+                <property name="y" value="0x00d8" />
+                <property name="width" value="0x002c" />
+                <property name="height" value="0x002c" />
+                <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=".\in_out_power\out.png" />
+                </element>
+            </element>
+            <element class="string_resource">
+                <property name="name" value="STR_IN_OUT_POWER" />
+                <property name="id" value="33258" />
+                <property name="x" value="0x0078" />
+                <property name="y" value="0x000d" />
+                <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_widget_in_out_power" />
+            </element>
+        </element>
+    </scene>
     <resource>
         <picture value=".\blood_pressure\number\0.png" />
         <picture value=".\blood_pressure\number\1.png" />
@@ -21994,7 +22169,16 @@
         <picture value=".\launch\分.png" />
         <picture value=".\launch\秒.png" />
         <picture value=".\logo\logo.png" />
+        <picture value=".\launch\in_out_power.png" />
+        <picture value=".\applist\png\icon\in_out_power.png" />
+        <picture value=".\in_out_power\in.png" />
+        <picture value=".\in_out_power\连接.png" />
+        <picture value=".\in_out_power\电压.png" />
+        <picture value=".\in_out_power\电流.png" />
+        <picture value=".\in_out_power\out.png" />
+        <picture value=".\in_out_power\point_line.png" />
         <txt value="..\multilang_translate_table.xls" />
+        <txt value="..\multiLang_translate_table.xls" />
         <string value="key_setupwizard_language" />
         <string value="key_setupwizard_download_app" />
         <string value="key_setupwizard_scan_download" />
@@ -22585,5 +22769,6 @@
         <string value="key_workout_folk_dance" />
         <string value="key_workout_other_dances" />
         <string value="key_workout_social_dance" />
+        <string value="key_widget_in_out_power" />
     </resource>
 </ui-rad>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 76 - 76
application/aem_watch/resource/360x360/bt_watch_enG.c


+ 8 - 0
application/aem_watch/resource/360x360/bt_watch_sty.h

@@ -9,6 +9,7 @@
 #define  RES_WORKOUT    0x1d351c56
 #define  RES_WORKOUT_RECORD    0x5e98053a
 #define  RES_WORKOUT_ACTIVITY    0xc467512
+#define  RES_IN_OUT_POWER    0x1b23d52b
 #define  RES_PHONE    0xa383224b
 #define  RES_HEARTRATE    0x3c124c81
 #define  RES_SPO2    0x13f3744f
@@ -553,6 +554,12 @@
 #define  PIC_ACT_UNIT_CALORIE    0x7308fb26
 #define  PIC_ACT_UNIT_STEP    0xfa35b967
 #define  PIC_ACT_UNIT_DURATION    0x57ebb051
+#define  SCENE_IN_OUT_POWER    0xb84d2115
+#define  PIC_POINT_LINE    0xdd06e5e8
+#define  PIC_IN    0xd8449a9a
+#define  PIC_LINK    0xc36923c3
+#define  PIC_OUT    0x48fb4075
+#define  STR_IN_OUT_POWER    0xddae7726
 #define  SCENE_MUSIC    0x32652fec
 #define  PIC_ANIM1    0x92937511
 #define  PIC_ANIM2    0x92937512
@@ -921,6 +928,7 @@
 #define  SCENE_LAUNCH    0xd2fdeef2
 #define  PIC_NO_WATCH    0x639581a2
 #define  PIC_ACTIVITY    0xf3d51854
+#define  PIC_IN_OUT_POWER    0x163fd0b5
 #define  PIC_SPORT    0xedb11a2f
 #define  PIC_ADD    0x53ec46ac
 #define  PIC_ADD_GRAY    0xc95227ea

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 76 - 76
application/aem_watch/resource/360x360/bt_watch_zhC.c


BIN
application/aem_watch/resource/360x360/in_out_power/in.png


BIN
application/aem_watch/resource/360x360/in_out_power/out.png


BIN
application/aem_watch/resource/360x360/in_out_power/point_line.png


BIN
application/aem_watch/resource/360x360/in_out_power/电压.png


BIN
application/aem_watch/resource/360x360/in_out_power/电流.png


BIN
application/aem_watch/resource/360x360/in_out_power/箭头.png


BIN
application/aem_watch/resource/360x360/in_out_power/连接.png


BIN
application/aem_watch/resource/360x360/launch/in_out_power.png


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

@@ -7,6 +7,7 @@ extern lv_img_dsc_t IMG_SCENE_APPLIST_RES_SETTINGS_PIC_ICON;
 extern lv_img_dsc_t IMG_SCENE_APPLIST_RES_WORKOUT_PIC_ICON; 
 extern lv_img_dsc_t IMG_SCENE_APPLIST_RES_WORKOUT_RECORD_PIC_ICON; 
 extern lv_img_dsc_t IMG_SCENE_APPLIST_RES_WORKOUT_ACTIVITY_PIC_ICON; 
+extern lv_img_dsc_t IMG_SCENE_APPLIST_RES_IN_OUT_POWER_PIC_ICON; 
 extern lv_img_dsc_t IMG_SCENE_APPLIST_RES_PHONE_PIC_ICON; 
 extern lv_img_dsc_t IMG_SCENE_APPLIST_RES_HEARTRATE_PIC_ICON; 
 extern lv_img_dsc_t IMG_SCENE_APPLIST_RES_SPO2_PIC_ICON; 
@@ -290,6 +291,10 @@ extern lv_img_dsc_t IMG_SCENE_ACTIVITY_PIC_ACT_DURATION;
 extern lv_img_dsc_t IMG_SCENE_ACTIVITY_PIC_ACT_UNIT_CALORIE; 
 extern lv_img_dsc_t IMG_SCENE_ACTIVITY_PIC_ACT_UNIT_STEP; 
 extern lv_img_dsc_t IMG_SCENE_ACTIVITY_PIC_ACT_UNIT_DURATION; 
+extern lv_img_dsc_t IMG_SCENE_IN_OUT_POWER_PIC_POINT_LINE; 
+extern lv_img_dsc_t IMG_SCENE_IN_OUT_POWER_PIC_IN; 
+extern lv_img_dsc_t IMG_SCENE_IN_OUT_POWER_PIC_LINK; 
+extern lv_img_dsc_t IMG_SCENE_IN_OUT_POWER_PIC_OUT; 
 extern lv_img_dsc_t IMG_SCENE_MUSIC_PIC_ANIM1; 
 extern lv_img_dsc_t IMG_SCENE_MUSIC_PIC_ANIM2; 
 extern lv_img_dsc_t IMG_SCENE_MUSIC_PIC_BG; 
@@ -543,6 +548,7 @@ extern lv_img_dsc_t IMG_SCENE_WIDGET_PIC_CANCEL;
 extern lv_img_dsc_t IMG_SCENE_WIDGET_PIC_RED_OK; 
 extern lv_img_dsc_t IMG_SCENE_LAUNCH_PIC_NO_WATCH; 
 extern lv_img_dsc_t IMG_SCENE_LAUNCH_PIC_ACTIVITY; 
+extern lv_img_dsc_t IMG_SCENE_LAUNCH_PIC_IN_OUT_POWER; 
 extern lv_img_dsc_t IMG_SCENE_LAUNCH_PIC_HR; 
 extern lv_img_dsc_t IMG_SCENE_LAUNCH_PIC_MUSIC; 
 extern lv_img_dsc_t IMG_SCENE_LAUNCH_PIC_SPORT; 
@@ -1001,6 +1007,7 @@ typedef enum{
 	ID_KEY_WIDGET_DOWNLOAD_FAILED,
 	ID_KEY_WIDGET_EXPLORE,
 	ID_KEY_WIDGET_HEALTH,
+	ID_KEY_WIDGET_IN_OUT_POWER,
 	ID_KEY_WIDGET_LIFE,
 	ID_KEY_WIDGET_MEASURING,
 	ID_KEY_WIDGET_WORKOUT,

+ 78 - 77
application/aem_watch/resource/360x360/res_string_id.c

@@ -1,6 +1,6 @@
 #include <res_manager_api.h>
 
-res_string_item_t RES_STRING_ID_DIC[415] = {
+res_string_item_t RES_STRING_ID_DIC[416] = {
 		{.key = NULL,		.value = 0},
 		{.key = "key_OTA_downloading",		.value = 181},
 		{.key = "key_OTA_failed",		.value = 182},
@@ -340,80 +340,81 @@ res_string_item_t RES_STRING_ID_DIC[415] = {
 		{.key = "key_widget_download_failed",		.value = 336},
 		{.key = "key_widget_explore",		.value = 337},
 		{.key = "key_widget_health",		.value = 338},
-		{.key = "key_widget_life",		.value = 339},
-		{.key = "key_widget_measuring",		.value = 340},
-		{.key = "key_widget_workout",		.value = 341},
-		{.key = "key_widgets",		.value = 342},
-		{.key = "key_workout_agps_data",		.value = 343},
-		{.key = "key_workout_ai_ahead",		.value = 344},
-		{.key = "key_workout_ai_behind",		.value = 345},
-		{.key = "key_workout_aver_pace",		.value = 346},
-		{.key = "key_workout_aver_step_freq",		.value = 347},
-		{.key = "key_workout_badminton",		.value = 348},
-		{.key = "key_workout_bpm",		.value = 349},
-		{.key = "key_workout_calorie",		.value = 350},
-		{.key = "key_workout_click_to_pause",		.value = 351},
-		{.key = "key_workout_cycle_indoor",		.value = 352},
-		{.key = "key_workout_cycle_outdoor",		.value = 353},
-		{.key = "key_workout_distance",		.value = 354},
-		{.key = "key_workout_distance_unit_km",		.value = 355},
-		{.key = "key_workout_distance_unit_mile",		.value = 356},
-		{.key = "key_workout_duration_end",		.value = 357},
-		{.key = "key_workout_end_confirm",		.value = 358},
-		{.key = "key_workout_exercised",		.value = 359},
-		{.key = "key_workout_goal_settings",		.value = 360},
-		{.key = "key_workout_gps",		.value = 361},
-		{.key = "key_workout_gps_error",		.value = 362},
-		{.key = "key_workout_gps_tips",		.value = 363},
-		{.key = "key_workout_hike",		.value = 364},
-		{.key = "key_workout_hr_max_hr",		.value = 365},
-		{.key = "key_workout_hr_min_hr",		.value = 366},
-		{.key = "key_workout_interval_reminder",		.value = 367},
-		{.key = "key_workout_jump",		.value = 368},
-		{.key = "key_workout_kcal",		.value = 369},
-		{.key = "key_workout_kilocalorie",		.value = 370},
-		{.key = "key_workout_kilometer",		.value = 371},
-		{.key = "key_workout_km",		.value = 372},
-		{.key = "key_workout_km_h",		.value = 373},
-		{.key = "key_workout_km_km",		.value = 374},
-		{.key = "key_workout_manager",		.value = 375},
-		{.key = "key_workout_mi_h",		.value = 376},
-		{.key = "key_workout_mi_mi",		.value = 377},
-		{.key = "key_workout_mile",		.value = 378},
-		{.key = "key_workout_min_min",		.value = 379},
-		{.key = "key_workout_move_open_area",		.value = 380},
-		{.key = "key_workout_moving",		.value = 381},
-		{.key = "key_workout_no_reminder",		.value = 382},
-		{.key = "key_workout_open_goal",		.value = 383},
-		{.key = "key_workout_open_water_swim",		.value = 384},
-		{.key = "key_workout_pace",		.value = 385},
-		{.key = "key_workout_pause",		.value = 386},
-		{.key = "key_workout_pool_length",		.value = 387},
-		{.key = "key_workout_pool_swim",		.value = 388},
-		{.key = "key_workout_positioning_failed",		.value = 389},
-		{.key = "key_workout_positioning_successf",		.value = 390},
-		{.key = "key_workout_recent_sports",		.value = 391},
-		{.key = "key_workout_repositioning",		.value = 392},
-		{.key = "key_workout_rope_skipping",		.value = 393},
-		{.key = "key_workout_run_indoor",		.value = 394},
-		{.key = "key_workout_run_outdoor",		.value = 395},
-		{.key = "key_workout_settings",		.value = 396},
-		{.key = "key_workout_settings_auto_pause",		.value = 397},
-		{.key = "key_workout_settings_auto_recogn",		.value = 398},
-		{.key = "key_workout_settings_hr_tips",		.value = 399},
-		{.key = "key_workout_settings_hr_warning",		.value = 400},
-		{.key = "key_workout_settings_hr_warningl",		.value = 401},
-		{.key = "key_workout_skip",		.value = 402},
-		{.key = "key_workout_speed",		.value = 403},
-		{.key = "key_workout_spm",		.value = 404},
-		{.key = "key_workout_start",		.value = 405},
-		{.key = "key_workout_step_frequency",		.value = 406},
-		{.key = "key_workout_steps",		.value = 407},
-		{.key = "key_workout_steps_steps",		.value = 408},
-		{.key = "key_workout_tennis",		.value = 409},
-		{.key = "key_workout_time",		.value = 410},
-		{.key = "key_workout_unit_pcs",		.value = 411},
-		{.key = "key_workout_wait",		.value = 412},
-		{.key = "key_workout_yd",		.value = 413},
-		{.key = "key_workout_yoga",		.value = 414},
+		{.key = "key_widget_in_out_power",		.value = 339},
+		{.key = "key_widget_life",		.value = 340},
+		{.key = "key_widget_measuring",		.value = 341},
+		{.key = "key_widget_workout",		.value = 342},
+		{.key = "key_widgets",		.value = 343},
+		{.key = "key_workout_agps_data",		.value = 344},
+		{.key = "key_workout_ai_ahead",		.value = 345},
+		{.key = "key_workout_ai_behind",		.value = 346},
+		{.key = "key_workout_aver_pace",		.value = 347},
+		{.key = "key_workout_aver_step_freq",		.value = 348},
+		{.key = "key_workout_badminton",		.value = 349},
+		{.key = "key_workout_bpm",		.value = 350},
+		{.key = "key_workout_calorie",		.value = 351},
+		{.key = "key_workout_click_to_pause",		.value = 352},
+		{.key = "key_workout_cycle_indoor",		.value = 353},
+		{.key = "key_workout_cycle_outdoor",		.value = 354},
+		{.key = "key_workout_distance",		.value = 355},
+		{.key = "key_workout_distance_unit_km",		.value = 356},
+		{.key = "key_workout_distance_unit_mile",		.value = 357},
+		{.key = "key_workout_duration_end",		.value = 358},
+		{.key = "key_workout_end_confirm",		.value = 359},
+		{.key = "key_workout_exercised",		.value = 360},
+		{.key = "key_workout_goal_settings",		.value = 361},
+		{.key = "key_workout_gps",		.value = 362},
+		{.key = "key_workout_gps_error",		.value = 363},
+		{.key = "key_workout_gps_tips",		.value = 364},
+		{.key = "key_workout_hike",		.value = 365},
+		{.key = "key_workout_hr_max_hr",		.value = 366},
+		{.key = "key_workout_hr_min_hr",		.value = 367},
+		{.key = "key_workout_interval_reminder",		.value = 368},
+		{.key = "key_workout_jump",		.value = 369},
+		{.key = "key_workout_kcal",		.value = 370},
+		{.key = "key_workout_kilocalorie",		.value = 371},
+		{.key = "key_workout_kilometer",		.value = 372},
+		{.key = "key_workout_km",		.value = 373},
+		{.key = "key_workout_km_h",		.value = 374},
+		{.key = "key_workout_km_km",		.value = 375},
+		{.key = "key_workout_manager",		.value = 376},
+		{.key = "key_workout_mi_h",		.value = 377},
+		{.key = "key_workout_mi_mi",		.value = 378},
+		{.key = "key_workout_mile",		.value = 379},
+		{.key = "key_workout_min_min",		.value = 380},
+		{.key = "key_workout_move_open_area",		.value = 381},
+		{.key = "key_workout_moving",		.value = 382},
+		{.key = "key_workout_no_reminder",		.value = 383},
+		{.key = "key_workout_open_goal",		.value = 384},
+		{.key = "key_workout_open_water_swim",		.value = 385},
+		{.key = "key_workout_pace",		.value = 386},
+		{.key = "key_workout_pause",		.value = 387},
+		{.key = "key_workout_pool_length",		.value = 388},
+		{.key = "key_workout_pool_swim",		.value = 389},
+		{.key = "key_workout_positioning_failed",		.value = 390},
+		{.key = "key_workout_positioning_successf",		.value = 391},
+		{.key = "key_workout_recent_sports",		.value = 392},
+		{.key = "key_workout_repositioning",		.value = 393},
+		{.key = "key_workout_rope_skipping",		.value = 394},
+		{.key = "key_workout_run_indoor",		.value = 395},
+		{.key = "key_workout_run_outdoor",		.value = 396},
+		{.key = "key_workout_settings",		.value = 397},
+		{.key = "key_workout_settings_auto_pause",		.value = 398},
+		{.key = "key_workout_settings_auto_recogn",		.value = 399},
+		{.key = "key_workout_settings_hr_tips",		.value = 400},
+		{.key = "key_workout_settings_hr_warning",		.value = 401},
+		{.key = "key_workout_settings_hr_warningl",		.value = 402},
+		{.key = "key_workout_skip",		.value = 403},
+		{.key = "key_workout_speed",		.value = 404},
+		{.key = "key_workout_spm",		.value = 405},
+		{.key = "key_workout_start",		.value = 406},
+		{.key = "key_workout_step_frequency",		.value = 407},
+		{.key = "key_workout_steps",		.value = 408},
+		{.key = "key_workout_steps_steps",		.value = 409},
+		{.key = "key_workout_tennis",		.value = 410},
+		{.key = "key_workout_time",		.value = 411},
+		{.key = "key_workout_unit_pcs",		.value = 412},
+		{.key = "key_workout_wait",		.value = 413},
+		{.key = "key_workout_yd",		.value = 414},
+		{.key = "key_workout_yoga",		.value = 415},
 	};

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 142 - 114
application/aem_watch/resource/360x360/res_style_bitmap.c


BIN
application/aem_watch/resource/multiLang_translate_table.xls


BIN
application/aem_watch/simulator/LVGL.Simulator/LVGL.Simulator.aps


+ 5 - 0
application/aem_watch/simulator/LVGL.Simulator/LVGL.Simulator.vcxproj

@@ -183,6 +183,8 @@
     <ClInclude Include="..\..\src\application\health\heart_rate\aem_heart_rate.h" />
     <ClInclude Include="..\..\src\application\health\spo2\aem_spo2.h" />
     <ClInclude Include="..\..\src\application\health\stress\aem_stress.h" />
+    <ClInclude Include="..\..\src\application\in_out_power\aem_in_out_power.h" />
+    <ClInclude Include="..\..\src\application\in_out_power\aem_in_out_power_screen.h" />
     <ClInclude Include="..\..\src\application\notification\aem_notify_details.h" />
     <ClInclude Include="..\..\src\application\notification\aem_notify_group.h" />
     <ClInclude Include="..\..\src\application\notification\aem_notify_list.h" />
@@ -403,6 +405,9 @@
     <ClCompile Include="..\..\src\application\health\heart_rate\aem_wf_heart_rate.c" />
     <ClCompile Include="..\..\src\application\health\spo2\aem_spo2.c" />
     <ClCompile Include="..\..\src\application\health\stress\aem_stress.c" />
+    <ClCompile Include="..\..\src\application\in_out_power\aem_in_out_power.c" />
+    <ClCompile Include="..\..\src\application\in_out_power\aem_in_out_power_screen.c" />
+    <ClCompile Include="..\..\src\application\in_out_power\aem_widget_in_out_power.c" />
     <ClCompile Include="..\..\src\application\notification\aem_notify_details.c" />
     <ClCompile Include="..\..\src\application\notification\aem_notify_group.c" />
     <ClCompile Include="..\..\src\application\notification\aem_notify_list.c" />

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

@@ -575,9 +575,6 @@
     <ClInclude Include="..\..\src\application\workout\aem_workout.h">
       <Filter>aem_watch\application\workout</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\src\application\workout\aem_workout_cfg.h">
-      <Filter>aem_watch\application\workout</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\src\application\workout\aem_workout_count_down.h">
       <Filter>aem_watch\application\workout</Filter>
     </ClInclude>
@@ -692,6 +689,15 @@
     <ClInclude Include="..\..\..\..\thirdparty\lib\gui\lvgl\src\extra\libs\etc2\lv_etc2.h">
       <Filter>lvgl\src\extra\libs\etc2</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\application\workout\widgets\aem_map_track.h" />
+    <ClInclude Include="..\..\src\application\workout\workout_cfg\aem_workout_cfg.h" />
+    <ClInclude Include="..\..\src\application\workout\workout_cfg\aem_workout_id_info.h" />
+    <ClInclude Include="..\..\src\application\in_out_power\aem_in_out_power.h">
+      <Filter>aem_watch\application\in_out_power</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\src\application\in_out_power\aem_in_out_power_screen.h">
+      <Filter>aem_watch\application\in_out_power</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <Manifest Include="LVGL.Simulator.manifest" />
@@ -1385,9 +1391,6 @@
     <ClCompile Include="..\..\src\application\workout\aem_workout.c">
       <Filter>aem_watch\application\workout</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\src\application\workout\aem_workout_cfg.c">
-      <Filter>aem_watch\application\workout</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\src\application\workout\aem_workout_count_down.c">
       <Filter>aem_watch\application\workout</Filter>
     </ClCompile>
@@ -1523,6 +1526,18 @@
     <ClCompile Include="..\..\..\..\thirdparty\lib\gui\lvgl\src\extra\libs\etc2\lv_etc2.c">
       <Filter>lvgl\src\extra\libs\etc2</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\application\workout\widgets\aem_map_track.c" />
+    <ClCompile Include="..\..\src\application\workout\workout_cfg\aem_workout_cfg.c" />
+    <ClCompile Include="..\..\src\application\workout\workout_cfg\aem_workout_id_info.c" />
+    <ClCompile Include="..\..\src\application\in_out_power\aem_in_out_power.c">
+      <Filter>aem_watch\application\in_out_power</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\application\in_out_power\aem_in_out_power_screen.c">
+      <Filter>aem_watch\application\in_out_power</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\src\application\in_out_power\aem_widget_in_out_power.c">
+      <Filter>aem_watch\application\in_out_power</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="LVGL.Simulator.rc" />
@@ -1913,6 +1928,9 @@
     <Filter Include="aem_watch\application\wf_widget">
       <UniqueIdentifier>{ee9f65c6-4761-4da6-8ec3-d7c6b46302bd}</UniqueIdentifier>
     </Filter>
+    <Filter Include="aem_watch\application\in_out_power">
+      <UniqueIdentifier>{0239b7ed-b5c4-4637-b445-b78c70e34eaf}</UniqueIdentifier>
+    </Filter>
   </ItemGroup>
   <ItemGroup>
     <Library Include="..\lib\aem_gui_fwk.lib" />

+ 13 - 0
application/aem_watch/simulator/LVGL.Simulator/bt_watch_simulator.c

@@ -44,6 +44,7 @@ extern void aem_power_saving_create(void);
 extern void aem_breathe_create(void);
 extern void aem_shutter_create(void);
 extern void aem_activity_app_create(void);
+extern void aem_in_out_power_create(void);
 extern void aem_music_create(void);
 extern void aem_find_phone_create(void);
 extern void aem_calculator_create(void);
@@ -144,6 +145,12 @@ aem_app_info_desc_t aem_app_info_begin[] =
             .key_id = ID_KEY_APP_WORKOUT_RECORD,
             .icon = &IMG_SCENE_APPLIST_RES_WORKOUT_RECORD_PIC_ICON,
         },
+        {
+            .app_id = AEM_APP_ID_IN_OUT_POWER,
+            .app_entry = aem_in_out_power_create,
+            .key_id = ID_KEY_WIDGET_IN_OUT_POWER,
+            .icon = &IMG_SCENE_APPLIST_RES_IN_OUT_POWER_PIC_ICON,
+        },
         {
             .app_id = AEM_APP_ID_CALENDAR,
             .app_entry = aem_calendar_create,
@@ -547,6 +554,7 @@ extern aem_clock_ops_t wf_music_ops;
 extern aem_clock_ops_t workout_ops;
 extern aem_clock_ops_t activity_ops;
 extern aem_clock_ops_t wf_heart_rate_ops;
+extern aem_clock_ops_t in_out_power_ops;
 aem_clock_desc_t aem_watchface_db_begin[] =
     {
         {
@@ -554,6 +562,11 @@ aem_clock_desc_t aem_watchface_db_begin[] =
             .editable = 0,
             .op = &cloud_wf_ops,
         },
+        {
+            .clock_id = WIDGET_ID_IN_OUT_POWER,
+            .editable = 0,
+            .op = &in_out_power_ops,
+        },
         {
             .clock_id = WIDGET_ID_OFTEN_WORKOUT,
             .editable = 0,

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

@@ -16,6 +16,7 @@ add_subdirectory_ifdef(CONFIG_AEM_APPLICATION_WORKOUT_RECORD workout_record)
 add_subdirectory_ifdef(CONFIG_AEM_APPLICATION_MINI_CHARGER mini_charger)
 add_subdirectory(tool)
 add_subdirectory(activity)
+add_subdirectory(in_out_power)
 add_subdirectory(breathe)
 add_subdirectory(calendar)
 add_subdirectory(health)

+ 9 - 0
application/aem_watch/src/application/in_out_power/CMakeLists.txt

@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: Apache-2.0
+zephyr_include_directories(
+	.
+	include
+)
+
+zephyr_library_sources( aem_in_out_power.c)
+zephyr_library_sources( aem_widget_in_out_power.c)
+zephyr_library_sources( aem_in_out_power_screen.c)

+ 793 - 0
application/aem_watch/src/application/in_out_power/aem_in_out_power.c

@@ -0,0 +1,793 @@
+#include "aem_in_out_power.h"
+#include "aem_activity_data_if.h"
+#include "aem_icon_double_label_item.h"
+#include "aem_bg.h"
+#include "aem_page.h"
+#include "aem_app_activity.h"
+#include "app_ui.h"
+#include "aem_workout_res.h"
+#include "aem_log.h"
+#include <lvgl/lvgl_res_loader.h>
+#include <lvgl/lvgl_bitmap_font.h>
+#include "simple_img.h"
+#include "text_canvas.h"
+#include "aem_sys_function_interface.h"
+#include "aem_title.h"
+#include "aem_app_fwk.h"
+#include "aem_data_share.h"
+#include "aem_in_out_power_screen.h"
+//#include "aem_activity_his_data.h"
+#define LV_COLOR_ACTIVTY_DURATION LV_COLOR_MAKE(0x51, 0x87, 0xf7)
+#define LV_COLOR_ACTIVTY_CAL LV_COLOR_MAKE(0xec, 0x48, 0x5a)
+#define LV_COLOR_ACTIVTY_STEPS LV_COLOR_MAKE(0x5e, 0xee, 0x3f)
+
+#define BAR_NUM 24
+
+typedef struct
+{
+    lv_obj_t *arc_screen;
+
+    lv_obj_t *calorie_chart;
+    lv_obj_t *steps_chart;
+    lv_obj_t *duration_chart;
+
+    lv_obj_t *calorie_chart_goal;
+    lv_obj_t *steps_chart_goal;
+    lv_obj_t *duration_chart_goal;
+
+    lv_obj_t *calorie_chart_value;
+    lv_obj_t *steps_chart_value;
+    lv_obj_t *duration_chart_value;
+
+    lv_chart_series_t *calorie_series;
+    lv_chart_series_t *steps_series;
+    lv_chart_series_t *duration_series;
+
+    bool s_is_frist;
+    bool page_complete;
+    uint16_t step_val;
+    uint16_t calories_val;
+    uint16_t runtime_val;
+    uint16_t stand_val;
+    lv_obj_t *s_app_bg;
+
+    lv_timer_t *timer;
+
+} activity_ui_data_t;
+
+static activity_ui_data_t *activity_ui_data = NULL;
+
+static void get_activity_chart_series(lv_chart_series_t *series, activity_type_e type);
+
+static void draw_event_cb(lv_event_t *e)
+{
+    lv_event_code_t code = lv_event_get_code(e);
+    if (code == LV_EVENT_DRAW_PART_BEGIN)
+    {
+        lv_obj_draw_part_dsc_t *dsc = lv_event_get_param(e);
+
+        if (dsc->part == LV_PART_ITEMS)
+        {
+            dsc->rect_dsc->bg_opa = LV_OPA_TRANSP; /*We will draw it later*/
+        }
+
+        if (dsc->part == LV_PART_MAIN)
+        {
+            if (dsc->line_dsc == NULL)
+                return;
+
+            if (dsc->id == 1)
+            {
+
+                dsc->line_dsc->width = 2;
+                dsc->line_dsc->dash_gap = 6;
+                dsc->line_dsc->dash_width = 4;
+                dsc->line_dsc->color = lv_color_white();
+            }
+            else
+            {
+                dsc->line_dsc->width = 0;
+                dsc->line_dsc->dash_gap = 0;
+                dsc->line_dsc->dash_width = 0;
+            }
+        }
+    }
+    if (code == LV_EVENT_DRAW_PART_END)
+    {
+        lv_obj_draw_part_dsc_t *dsc = lv_event_get_param(e);
+        if (dsc->part == LV_PART_ITEMS)
+        {
+            lv_draw_rect_dsc_t draw_rect_dsc;
+            lv_draw_rect_dsc_init(&draw_rect_dsc);
+            lv_coord_t h = lv_area_get_height(dsc->draw_area);
+            lv_area_t a;
+            a.x1 = dsc->draw_area->x1;
+            a.x2 = dsc->draw_area->x2;
+            a.y1 = dsc->draw_area->y1;
+            a.y2 = dsc->draw_area->y2;
+            draw_rect_dsc.radius = 5;
+            draw_rect_dsc.bg_color = lv_color_hex((uint32_t)e->user_data);
+            lv_draw_rect(dsc->draw_ctx, &draw_rect_dsc, &a);
+        }
+    }
+}
+
+static lv_obj_t *aem_create_day_data_chart(lv_obj_t *parent, activity_type_e type, lv_color_t value_color, lv_color_t bg_color)
+{
+    uint32_t day_value[DAY_NUM] = {0};
+    get_day_training_value_by_type(type, day_value, DAY_NUM);
+
+    lv_obj_t *chart = lv_chart_create(parent);
+    if (!chart)
+        return NULL;
+
+    lv_obj_set_size(chart, AEM_SIZE_HOR_FACTOR_466(390), AEM_SIZE_VER_FACTOR_466(150));
+    lv_obj_align(chart, LV_ALIGN_TOP_MID, 0, 0);
+    lv_chart_set_type(chart, LV_CHART_TYPE_BAR);
+    lv_chart_set_range(chart, LV_CHART_AXIS_PRIMARY_Y, 0, 100);
+    lv_chart_set_update_mode(chart, LV_CHART_UPDATE_MODE_CIRCULAR);
+    lv_chart_set_div_line_count(chart, 0, 0);
+    lv_chart_set_point_count(chart, BAR_NUM);
+    lv_obj_set_style_bg_opa(chart, LV_OPA_TRANSP, LV_PART_MAIN);
+    lv_obj_set_style_outline_width(chart, 0, LV_PART_MAIN);
+    lv_obj_set_style_border_side(chart, LV_BORDER_SIDE_FULL, LV_PART_MAIN);
+    lv_obj_set_style_border_width(chart, 0, 0);
+    lv_obj_set_style_pad_column(chart, 6, 0);
+    lv_obj_clear_flag(chart, LV_OBJ_FLAG_SCROLLABLE | LV_OBJ_FLAG_SCROLL_MOMENTUM);
+    lv_obj_add_event_cb(chart, draw_event_cb, LV_EVENT_ALL, (void *)lv_color_to32(bg_color));
+    lv_chart_series_t *ser2 = lv_chart_add_series(chart, bg_color, LV_CHART_AXIS_PRIMARY_Y);
+    if (ser2)
+    {
+        for (uint8_t i = 0; i < BAR_NUM; i++)
+        {
+            lv_chart_set_next_value(chart, ser2, 100);
+        }
+    }
+
+    lv_obj_t *chart1 = lv_chart_create(parent);
+    if (chart1)
+    {
+        lv_obj_set_size(chart1, AEM_SIZE_HOR_FACTOR_466(390), AEM_SIZE_VER_FACTOR_466(150));
+        lv_obj_align(chart1, LV_ALIGN_TOP_MID, 0, 0);
+        lv_chart_set_type(chart1, LV_CHART_TYPE_BAR);
+        lv_chart_set_range(chart1, LV_CHART_AXIS_PRIMARY_Y, 0, 100);
+        lv_chart_set_update_mode(chart1, LV_CHART_UPDATE_MODE_CIRCULAR);
+        lv_chart_set_div_line_count(chart1, 0, 0);
+        lv_chart_set_point_count(chart1, BAR_NUM);
+        lv_obj_set_style_bg_opa(chart1, LV_OPA_TRANSP, LV_PART_MAIN);
+        lv_obj_set_style_border_side(chart1, LV_BORDER_SIDE_FULL, 0);
+        lv_obj_set_style_border_width(chart1, 0, 0);
+        lv_obj_set_style_pad_column(chart1, 6, 0);
+        lv_obj_add_event_cb(chart1, draw_event_cb, LV_EVENT_ALL, (void *)lv_color_to32(value_color));
+        lv_chart_series_t *ser1 = lv_chart_add_series(chart1, value_color, LV_CHART_AXIS_PRIMARY_Y);
+        for (uint8_t i = 0; i < BAR_NUM; i++)
+        {
+            uint8_t value = day_value[i];
+            if (value > 0)
+            {
+                lv_chart_set_value_by_id(chart1, ser1, i, value);
+            }
+        }
+        lv_chart_refresh(chart1);
+        get_activity_chart_series(ser1, type);
+    }
+
+    return chart;
+}
+#if 0
+static lv_img_dsc_t *get_activity_unit_img(activity_type_e type)
+{
+    lv_img_dsc_t *src = &IMG_SCENE_ACTIVITY_PIC_ACT_UNIT_STEP;
+    switch (type)
+    {
+        case ACTIVITY_STEPS:
+            src = &IMG_SCENE_ACTIVITY_PIC_ACT_UNIT_STEP;
+            break;
+        case ACTIVITY_CALORIES:
+            src = &IMG_SCENE_ACTIVITY_PIC_ACT_UNIT_CALORIE;
+            break;
+        case ACTIVITY_RUNTIME:
+            src = &IMG_SCENE_ACTIVITY_PIC_ACT_UNIT_DURATION;
+            break;
+        default:
+            break;
+    }
+    return src;
+}
+
+static char *get_activity_unit_string(activity_type_e type)
+{
+    char *str = "";
+    switch (type)
+    {
+        case ACTIVITY_STEPS:
+            str = res_manager_get_string_from_id(ID_KEY_ACTIVITY_STEP_UNIT);
+            break;
+        case ACTIVITY_CALORIES:
+            str = res_manager_get_string_from_id(ID_KEY_ACTIVITY_CALORIE_UNIT);
+            break;
+        case ACTIVITY_RUNTIME:
+            str = res_manager_get_string_from_id(ID_KEY_ACTIVITY_DURATION_UNIT);
+            break;
+        default:
+            break;
+    }
+    return str;
+}
+#endif
+static void activity_steps_screen_update()
+{
+    activity_day_data_t day_data = get_today_training_day_data();
+    if (day_data.steps != activity_ui_data->step_val)
+    {
+        // update label
+        activity_ui_data->step_val = day_data.steps;
+        if (activity_ui_data->steps_chart_value != NULL)
+        {
+            text_canvas_set_text_fmt(activity_ui_data->steps_chart_value, "%04d", day_data.steps);
+        }
+
+        // update chart
+        uint32_t step_value[DAY_NUM] = {0};
+        get_day_training_value_by_type(ACTIVITY_STEPS, step_value, DAY_NUM);
+        for (uint8_t i = 0; i < DAY_NUM; i++)
+        {
+            uint8_t value = step_value[i];
+
+            if (value > 0 && activity_ui_data->steps_chart != NULL && activity_ui_data->steps_series != NULL)
+            {
+                lv_chart_set_value_by_id(activity_ui_data->steps_chart, activity_ui_data->steps_series, i, value);
+            }
+        }
+    }
+}
+
+static void activity_calories_screen_update()
+{
+    activity_day_data_t day_data = get_today_training_day_data();
+    if (day_data.calories != activity_ui_data->calories_val)
+    {
+        // update label
+        activity_ui_data->calories_val = day_data.calories;
+        if (activity_ui_data->calorie_chart_value != NULL)
+        {
+            text_canvas_set_text_fmt(activity_ui_data->calorie_chart_value, "%04d", day_data.calories);
+        }
+
+        // update chart
+        uint32_t calories_value[DAY_NUM] = {0};
+        get_day_training_value_by_type(ACTIVITY_CALORIES, calories_value, DAY_NUM);
+        for (uint8_t i = 0; i < DAY_NUM; i++)
+        {
+            uint8_t value = calories_value[i];
+            if (value > 0 && activity_ui_data->calorie_chart != NULL && activity_ui_data->calorie_series != NULL)
+            {
+                lv_chart_set_value_by_id(activity_ui_data->calorie_chart, activity_ui_data->calorie_series, i, value);
+            }
+        }
+    }
+}
+static void activity_duration_screen_update(void)
+{
+    AEM_LOG_I("activity_duration_screen_update ...\r\n");
+    activity_day_data_t day_data = get_today_training_day_data();
+    if (day_data.durmin != activity_ui_data->runtime_val)
+    {
+        // update label
+        AEM_LOG_I("activity_duration_screen_update update label \r\n");
+        activity_ui_data->runtime_val = day_data.durmin;
+        if (activity_ui_data->duration_chart_value != NULL)
+        {
+            text_canvas_set_text_fmt(activity_ui_data->duration_chart_value, "%04d", day_data.durmin);
+        }
+
+        // update chart
+        AEM_LOG_I("activity_duration_screen_update update chart \r\n");
+        uint32_t runtime_value[DAY_NUM] = {0};
+        get_day_training_value_by_type(ACTIVITY_RUNTIME, runtime_value, DAY_NUM);
+        for (uint8_t i = 0; i < DAY_NUM; i++)
+        {
+            uint8_t value = runtime_value[i];
+            if (value > 0 && activity_ui_data->duration_chart != NULL && activity_ui_data->duration_series != NULL)
+            {
+                lv_chart_set_value_by_id(activity_ui_data->duration_chart, activity_ui_data->duration_series, i, value);
+            }
+        }
+    }
+}
+
+static void refresh_in_out_power_ui(void)
+{
+    if (activity_ui_data != NULL && activity_ui_data->page_complete)
+    {
+        aem_in_out_power_screen_update(activity_ui_data->arc_screen);
+
+        activity_steps_screen_update();
+        activity_calories_screen_update();
+        activity_duration_screen_update();
+    }
+}
+#if 0
+static char *get_activity_goal_str_fmt(activity_type_e type)
+{
+    char *str = "%d";
+    switch (type)
+    {
+        case ACTIVITY_STEPS:
+            str = res_manager_get_string_from_id(ID_KEY_ACTIVITY_STEP_GOAL);
+            break;
+        case ACTIVITY_CALORIES:
+            str = res_manager_get_string_from_id(ID_KEY_ACTIVITY_CALORIE_GOAL);
+            break;
+        case ACTIVITY_RUNTIME:
+            str = res_manager_get_string_from_id(ID_KEY_ACTIVITY_DURATION_GOAL);
+            break;
+        default:
+            break;
+    }
+    return str;
+}
+
+static void refresh_activity_goal(void)
+{
+    if (activity_ui_data != NULL && activity_ui_data->page_complete)
+    {
+        text_canvas_set_text_fmt(activity_ui_data->steps_chart_goal, 
+            get_activity_goal_str_fmt(ACTIVITY_STEPS), get_goal_value_by_type(ACTIVITY_STEPS));
+
+        text_canvas_set_text_fmt(activity_ui_data->calorie_chart_goal,
+            get_activity_goal_str_fmt(ACTIVITY_CALORIES), get_goal_value_by_type(ACTIVITY_CALORIES));
+
+        text_canvas_set_text_fmt(activity_ui_data->duration_chart_goal,
+            get_activity_goal_str_fmt(ACTIVITY_RUNTIME), get_goal_value_by_type(ACTIVITY_RUNTIME));
+    }
+}
+#endif
+static lv_obj_t *title_create(lv_obj_t *parent, const char *type_name, lv_color_t color)
+{
+    lv_obj_t *title_label = text_canvas_create(parent);
+    if (title_label)
+    {
+        text_canvas_set_text(title_label, type_name);
+        text_canvas_set_long_mode(title_label, TEXT_CANVAS_LONG_WRAP);
+        lv_obj_set_width(title_label, AEM_SIZE_HOR_FACTOR_466(282));
+        lv_obj_set_style_text_align(title_label, LV_TEXT_ALIGN_CENTER, 0);
+        lv_obj_set_style_text_color(title_label, color, LV_PART_MAIN);
+        lv_obj_set_style_text_font(title_label, aem_font_def(), 0);
+        lv_obj_align(title_label, LV_ALIGN_TOP_MID, 0, AEM_SIZE_VER_FACTOR_466(30));
+    }
+
+    return title_label;
+}
+
+static lv_obj_t *aem_activity_goal_label_create(lv_obj_t *bg, activity_type_e type)
+{
+    lv_obj_t *label_goal = text_canvas_create(bg);
+    if (label_goal)
+    {
+        lv_obj_set_width(label_goal, LV_PCT(100));
+        text_canvas_set_long_mode(label_goal, LV_LABEL_LONG_WRAP);
+        lv_obj_clear_flag(label_goal, LV_OBJ_FLAG_CLICKABLE);
+        lv_obj_set_style_text_align(label_goal, LV_TEXT_ALIGN_CENTER, 0);
+        lv_obj_set_style_text_color(label_goal, lv_palette_main(LV_PALETTE_GREY), LV_PART_MAIN);
+        lv_obj_set_style_text_font(label_goal, aem_font_sub(), LV_PART_MAIN);
+        //text_canvas_set_text_fmt(label_goal, get_activity_goal_str_fmt(type), get_goal_value_by_type(type));
+    }
+
+    return label_goal;
+}
+
+static lv_obj_t *aem_activity_value_label_create(lv_obj_t *bg, uint16_t value)
+{
+    lv_obj_t *value_label = text_canvas_create(bg);
+    if (value_label)
+    {
+        lv_obj_set_width(value_label, AEM_SIZE_HOR_FACTOR_466(250));
+        text_canvas_set_long_mode(value_label, LV_LABEL_LONG_WRAP);
+        lv_obj_clear_flag(value_label, LV_OBJ_FLAG_CLICKABLE);
+        lv_obj_set_style_text_align(value_label, LV_TEXT_ALIGN_CENTER, 0);
+
+        lv_obj_set_style_text_color(value_label, lv_color_hex(0xffffff), LV_PART_MAIN);
+        lv_obj_set_style_text_font(value_label, aem_font_xxlarge(), LV_PART_MAIN);
+        text_canvas_set_text_fmt(value_label, "%04d", value);
+    }
+
+    return value_label;
+}
+
+static lv_obj_t *aem_activity_unit_label_create(lv_obj_t *bg, char *unit)
+{
+    if (bg == NULL || unit == NULL)
+    {
+        return NULL;
+    }
+
+    lv_obj_t *value_label = text_canvas_create(bg);
+    if (value_label)
+    {
+        lv_obj_set_style_text_color(value_label, lv_color_hex(0x808080), LV_PART_MAIN);
+        lv_obj_set_style_text_font(value_label, aem_font_sub(), LV_PART_MAIN);
+        text_canvas_set_text(value_label, unit);
+    }
+
+    return value_label;
+}
+
+static lv_obj_t *create_hour_system_label(lv_obj_t *par, char *src)
+{
+    if (par == NULL)
+    {
+        return NULL;
+    }
+
+    lv_obj_t *title_label = text_canvas_create(par);
+    if (title_label)
+    {
+        lv_obj_set_width(title_label, 90);
+        lv_obj_set_style_text_color(title_label, lv_color_hex(0x606060), 0);
+        lv_obj_set_style_text_font(title_label, aem_font_small(), LV_PART_MAIN);
+        text_canvas_set_text(title_label, src);
+    }
+
+    return title_label;
+}
+
+static void create_hours_label(lv_obj_t *par)
+{
+    if (par == NULL)
+    {
+        return;
+    }
+
+    lv_obj_t *hour_bg = aem_bg_create(par, 376, LV_SIZE_CONTENT, lv_color_hex(0x000000));
+    if (hour_bg == NULL)
+    {
+        return;
+    }
+
+    lv_obj_align(hour_bg, LV_ALIGN_BOTTOM_LEFT, 30, -100);
+    lv_obj_set_style_bg_opa(hour_bg, LV_OPA_COVER, 0);
+
+    aem_language_type_e cur_language = aem_share_get_language();
+    lv_obj_t *label0 = NULL;
+    lv_obj_t *label6 = NULL;
+    lv_obj_t *label12 = NULL;
+    lv_obj_t *label18 = NULL;
+
+    aem_time_t *time = aem_get_system_time();
+    if (false) // TODO, am pm
+    {
+        if (cur_language == AEM_LANGUAGE_CS_CZ)
+        {
+            label0 = create_hour_system_label(hour_bg, "12:00DOP.");
+            label6 = create_hour_system_label(hour_bg, "06:00");
+            label12 = create_hour_system_label(hour_bg, "12:00ODP.");
+            label18 = create_hour_system_label(hour_bg, "06:00");
+        }
+        else
+        {
+            label0 = create_hour_system_label(hour_bg, "12:00AM");
+            label6 = create_hour_system_label(hour_bg, "6:00");
+            label12 = create_hour_system_label(hour_bg, "12:00PM");
+            label18 = create_hour_system_label(hour_bg, "6:00");
+        }
+    }
+    else
+    {
+        label0 = create_hour_system_label(hour_bg, "00:00");
+        label6 = create_hour_system_label(hour_bg, "06:00");
+        label12 = create_hour_system_label(hour_bg, "12:00");
+        label18 = create_hour_system_label(hour_bg, "18:00");
+    }
+
+    if (label0 && label6 && label12 && label18)
+    {
+        lv_obj_align(label0, LV_ALIGN_LEFT_MID, 6, 0);
+        lv_obj_align(label6, LV_ALIGN_LEFT_MID, 100, 0);
+        lv_obj_align(label12, LV_ALIGN_LEFT_MID, 200, 0);
+        lv_obj_align(label18, LV_ALIGN_LEFT_MID, 300, 0);
+    }
+}
+
+static void get_activity_chart_series(lv_chart_series_t *series, activity_type_e type)
+{
+    switch (type)
+    {
+        case ACTIVITY_STEPS:
+            activity_ui_data->steps_series = series;
+            break;
+        case ACTIVITY_RUNTIME:
+            activity_ui_data->duration_series = series;
+            break;
+        case ACTIVITY_CALORIES:
+            activity_ui_data->calorie_series = series;
+            break;
+        default:
+            break;
+    }
+}
+
+static void get_activity_type_goal_label(lv_obj_t *lable, activity_type_e type)
+{
+    switch (type)
+    {
+        case ACTIVITY_STEPS:
+            activity_ui_data->steps_chart_goal = lable;
+            break;
+        case ACTIVITY_RUNTIME:
+            activity_ui_data->duration_chart_goal = lable;
+            break;
+        case ACTIVITY_CALORIES:
+            activity_ui_data->calorie_chart_goal = lable;
+            break;
+        default:
+            break;
+    }
+}
+
+static void set_activity_type_value_label(lv_obj_t *lable, activity_type_e type)
+{
+    switch (type)
+    {
+        case ACTIVITY_STEPS:
+            activity_ui_data->steps_chart_value = lable;
+            break;
+        case ACTIVITY_RUNTIME:
+            activity_ui_data->duration_chart_value = lable;
+            break;
+        case ACTIVITY_CALORIES:
+            activity_ui_data->calorie_chart_value = lable;
+            break;
+        default:
+            break;
+    }
+}
+
+static void get_activity_type_chart(lv_obj_t *chart, activity_type_e type)
+{
+    switch (type)
+    {
+        case ACTIVITY_STEPS:
+            activity_ui_data->steps_chart = chart;
+            break;
+        case ACTIVITY_RUNTIME:
+            activity_ui_data->duration_chart = chart;
+            break;
+        case ACTIVITY_CALORIES:
+            activity_ui_data->calorie_chart = chart;
+            break;
+        default:
+            break;
+    }
+}
+#if 0
+static void aem_activity_chart_create(lv_obj_t *parent, activity_type_e type, lv_color_t value_color, lv_color_t bg_color)
+{
+    // chart bg
+    lv_obj_t *bg_value = aem_bg_create(parent, LV_SIZE_CONTENT, AEM_SIZE_VER_FACTOR_466(90), lv_color_black());
+    if (bg_value)
+    {
+        lv_obj_align(bg_value, LV_ALIGN_TOP_MID, 0, AEM_SIZE_VER_FACTOR_466(86));
+
+        // rt value
+        lv_obj_t *day_value_lable = aem_activity_value_label_create(bg_value, get_today_value_by_type(type));
+        if (day_value_lable)
+        {
+            lv_obj_align(day_value_lable, LV_ALIGN_LEFT_MID, 0, 0);
+            set_activity_type_value_label(day_value_lable, type);
+
+            // unit
+            //lv_obj_t *unit_lable = aem_activity_unit_label_create(bg_value, get_activity_unit_string(type));
+            //if (unit_lable)
+            //{
+            //    lv_obj_align_to(unit_lable, day_value_lable, LV_ALIGN_OUT_RIGHT_BOTTOM, AEM_SIZE_HOR_FACTOR_466(10), AEM_SIZE_VER_FACTOR_466(-14));
+            //}
+
+            // icon
+            //lv_obj_t *icon = lv_img_create(bg_value);
+            //if (icon)
+            //{
+            //    lv_img_set_src(icon, get_activity_unit_img(type));
+            //    lv_obj_align_to(icon, day_value_lable, LV_ALIGN_OUT_RIGHT_TOP, AEM_SIZE_HOR_FACTOR_466(10), AEM_SIZE_VER_FACTOR_466(10));
+            //}
+        }
+    }
+
+    // chart bg
+    lv_obj_t *bg_chart = aem_bg_create(parent, AEM_SIZE_HOR_FACTOR_466(400), AEM_SIZE_VER_FACTOR_466(200), lv_color_hex(0x1C1C1C));
+    if (bg_chart)
+    {
+        lv_obj_align(bg_chart, LV_ALIGN_TOP_MID, 0, AEM_SIZE_VER_FACTOR_466(184));
+        lv_obj_set_style_radius(bg_chart, 20, LV_PART_MAIN);
+        lv_obj_set_style_opa(bg_chart, LV_OPA_TRANSP, LV_PART_MAIN);
+
+        // chart
+        lv_obj_t *chart = aem_create_day_data_chart(bg_chart, type, value_color, bg_color);
+        if (chart)
+        {
+            get_activity_type_chart(chart, type);
+        }
+    }
+
+    // hours label
+    create_hours_label(parent);
+
+    // goal label
+    lv_obj_t *goal_lable = aem_activity_goal_label_create(parent, type);
+    if (goal_lable)
+    {
+        lv_obj_align(goal_lable, LV_ALIGN_BOTTOM_MID, 0, AEM_SIZE_VER_FACTOR_466(-30));
+        get_activity_type_goal_label(goal_lable, type);
+    }
+}
+
+static void delay_create_other_screen(void)
+{
+    if (activity_ui_data == NULL || activity_ui_data->s_app_bg == NULL)
+    {
+        return;
+    }
+
+    lv_obj_t *bg = activity_ui_data->s_app_bg;
+    lv_obj_t *screen2 = aem_bg_create(bg, DEF_UI_WIDTH, DEF_UI_HEIGHT, lv_color_black());
+    if (screen2)
+    {
+        title_create(screen2, res_manager_get_string_from_id(ID_KEY_WORKOUT_STEPS), lv_color_white());
+        aem_activity_chart_create(screen2, ACTIVITY_STEPS, (lv_color_t)LV_COLOR_ACTIVTY_STEPS, lv_color_hex(0x1a1a1a));
+    }
+
+    lv_obj_t *screen3 = aem_bg_create(bg, DEF_UI_WIDTH, DEF_UI_HEIGHT, lv_color_black());
+    if (screen3)
+    {
+        title_create(screen3, res_manager_get_string_from_id(ID_KEY_WORKOUT_CALORIE), lv_color_white());
+        aem_activity_chart_create(screen3, ACTIVITY_CALORIES, (lv_color_t)LV_COLOR_ACTIVTY_CAL, lv_color_hex(0x1a1a1a));
+    }
+
+    lv_obj_t *screen4 = aem_bg_create(bg, DEF_UI_WIDTH, DEF_UI_HEIGHT, lv_color_black());
+    if (screen4)
+    {
+        title_create(screen4, res_manager_get_string_from_id(ID_KEY_WORKOUT_TIME), lv_color_white());
+        aem_activity_chart_create(screen4, ACTIVITY_RUNTIME, (lv_color_t)LV_COLOR_ACTIVTY_DURATION, lv_color_hex(0x1a1a1a));
+    }
+}
+#endif
+static void delay_timer_cb(struct _lv_timer_t *timer)
+{
+    if (activity_ui_data->timer)
+    {
+        lv_timer_del(activity_ui_data->timer);
+        activity_ui_data->timer = NULL;
+    }
+
+    //delay_create_other_screen();
+    activity_ui_data->page_complete = true;
+    refresh_in_out_power_ui();
+}
+
+static void sim_timer_cb(struct _lv_timer_t *timer)
+{
+    refresh_in_out_power_ui();
+}
+
+lv_obj_t *in_out_power_ui_init(lv_obj_t *par)
+{
+    if (par == NULL)
+    {
+        par = lv_scr_act();
+    }
+
+    // page
+    lv_obj_t *bg = aem_page_create(lv_scr_act());
+    if (bg == NULL)
+    {
+        return NULL;
+    }
+
+    lv_obj_set_user_data(bg, activity_ui_data);
+    activity_ui_data->s_app_bg = bg;
+    aem_page_set_auto_align(bg, true);
+
+    lv_obj_t *screen1 = aem_bg_create(bg, DEF_UI_WIDTH, DEF_UI_HEIGHT, lv_color_black());
+    if (screen1)
+    {
+        activity_ui_data->arc_screen = aem_in_out_power_screen_create(screen1, false);
+    }
+
+    activity_ui_data->timer = lv_timer_create(delay_timer_cb, 300, NULL);
+    if (activity_ui_data->timer)
+    {
+        lv_timer_set_repeat_count(activity_ui_data->timer, 1);
+    }
+
+#ifdef CONFIG_SIMULATOR
+    lv_timer_create(sim_timer_cb, 1000, NULL);
+#endif
+
+    return bg;
+}
+
+static void load_font(void)
+{
+}
+
+static void on_start(void)
+{
+    // app data
+    if (activity_ui_data == NULL)
+    {
+        activity_ui_data = lv_mem_alloc(sizeof(activity_ui_data_t));
+        if (activity_ui_data != NULL)
+        {
+            lv_memset(activity_ui_data, 0, sizeof(activity_ui_data_t));
+            activity_ui_data->s_is_frist = true;
+        }
+    }
+
+    load_font();
+    ///*测试接口数据activity_his_yesterday_data_get*/
+    //activity_his_data_diatance_t data = {0};
+    //uint8_t ret = activity_his_yesterday_data_get(&data);
+    //AEM_LOG_I("activity_his_yesterday_data_get:%d ,%lu ,%lu\r\n", data.distance, data.his_data.head.day_step_count, data.his_data.head.day_active_time);
+    //AEM_LOG_I("activity_his_yesterday_time:%d ,%d\r\n", data.his_data.head.date.day, data.his_data.head.date.month);
+    //AEM_LOG_I("TT_ACTIVITY_ONSTART:%d\r\n", ret);
+}
+
+static void on_resume(void)
+{
+    if (activity_ui_data && activity_ui_data->s_is_frist)
+    {
+        in_out_power_ui_init(NULL);
+        activity_ui_data->s_is_frist = false;
+    }
+}
+
+static void on_pause(void)
+{
+}
+
+static void on_stop(void)
+{
+    if (activity_ui_data == NULL)
+    {
+        return;
+    }
+
+    activity_ui_data->page_complete = false;
+    aem_in_out_power_screen_del(activity_ui_data->arc_screen);
+
+    if (activity_ui_data->s_app_bg != NULL)
+    {
+        lv_obj_del(activity_ui_data->s_app_bg);
+        activity_ui_data->s_app_bg = NULL;
+    }
+
+    if (activity_ui_data->timer)
+    {
+        lv_timer_del(activity_ui_data->timer);
+        activity_ui_data->timer = NULL;
+    }
+
+    lv_mem_free(activity_ui_data);
+    activity_ui_data = NULL;
+}
+
+static int32_t homekey_handler(lv_key_t key, lv_indev_state_t event)
+{
+    return 1;
+}
+
+static void on_ui_refresh(aem_msg_t *msg)
+{
+    AEM_LOG_I("activity on_ui_refresh, msg:%d\n", msg->sub_type);
+    if (msg->sub_type == UI_IN_OUT_POWER_REFRESH && activity_ui_data->page_complete)
+    {
+        refresh_in_out_power_ui();
+    }
+}
+
+void aem_in_out_power_create(void)
+{
+    aem_app_launch(AEM_APP_ID_IN_OUT_POWER, AEM_APP_IN_OUT_POWER, on_start, on_resume, on_pause, on_stop, on_ui_refresh, NULL);
+}
+
+AEM_APP_DEFINE(AEM_APP_ID_IN_OUT_POWER, AEM_DEFAULT_APP, ID_KEY_WIDGET_IN_OUT_POWER, IMG_SCENE_APPLIST_RES_IN_OUT_POWER_PIC_ICON, aem_in_out_power_create);

+ 8 - 0
application/aem_watch/src/application/in_out_power/aem_in_out_power.h

@@ -0,0 +1,8 @@
+#ifndef _AEM_ACTIVITY_H_
+#define _AEM_ACTIVITY_H_
+
+#include "aem_activity_data_if.h"
+#include "lvgl.h"
+
+void aem_in_out_power_create(void);
+#endif

+ 348 - 0
application/aem_watch/src/application/in_out_power/aem_in_out_power_screen.c

@@ -0,0 +1,348 @@
+
+
+#include "aem_in_out_power_screen.h"
+#include "app_ui.h"
+
+#include "aem_workout_res.h"
+#include "aem_sys_function_interface.h"
+#include "aem_bg.h"
+#include "aem_in_out_power.h"
+#include "aem_app_fwk.h"
+#include "text_canvas.h"
+#include "aem_txt.h"
+
+#define ARC_WIDTH 54
+
+#define LV_COLOR_BLUE LV_COLOR_MAKE(0x36, 0xdc, 0xff)
+#define LV_COLOR_GREEN LV_COLOR_MAKE(0x88, 0xff, 0x56)
+#define LV_COLOR_BLACK LV_COLOR_MAKE(0x00, 0x00, 0x00)
+#define LV_COLOR_WHITE LV_COLOR_MAKE(0xff, 0xff, 0xff)
+
+typedef struct
+{
+    lv_obj_t *in_power_value;
+    lv_obj_t *in_voltage_value;
+    lv_obj_t *in_current_value;
+    
+    lv_obj_t *out_power_value;
+    lv_obj_t *out_voltage_value;
+    lv_obj_t *out_current_value;
+    bool widget_start;
+
+} in_out_power_scr_ui_data_t;
+
+static void *load_res()
+{
+    in_out_power_scr_ui_data_t *ext_data = lv_mem_alloc(sizeof(in_out_power_scr_ui_data_t));
+    if (ext_data == NULL)
+    {
+        return NULL;
+    }
+    lv_memset(ext_data, 0, sizeof(in_out_power_scr_ui_data_t));
+
+    return ext_data;
+}
+
+static lv_obj_t *activity_value_item_create(lv_obj_t *par, lv_color_t value_color,
+                                            char *value, lv_coord_t hight, const lv_font_t *value_font)
+{
+    if (par == NULL)
+    {
+        return NULL;
+    }
+
+    lv_obj_t *bg = aem_bg_create(par, AEM_SIZE_HOR_FACTOR_466(360), AEM_SIZE_VER_FACTOR_466(hight), lv_color_black());
+    if (bg == NULL)
+    {
+        return NULL;
+    }
+
+    //lv_obj_clear_flag(bg, LV_OBJ_FLAG_CLICKABLE);
+
+    lv_obj_t *value_label = text_canvas_create(bg);
+    if (value_label)
+    {
+        lv_obj_set_width(value_label, AEM_SIZE_HOR_FACTOR_466(180));
+        text_canvas_set_long_mode(value_label, LV_LABEL_LONG_SCROLL_CIRCULAR);
+        lv_obj_set_style_text_align(value_label, LV_TEXT_ALIGN_LEFT, 0);
+        //lv_obj_clear_flag(value_label, LV_OBJ_FLAG_CLICKABLE);
+        lv_obj_set_style_text_color(value_label, value_color, 0);
+        lv_obj_set_style_text_font(value_label, value_font, 0);
+        text_canvas_set_text(value_label, value);
+        lv_obj_align(value_label, LV_ALIGN_CENTER, 0, 0);
+    }
+
+    return bg;
+}
+
+#define VOLT_CURR_WIDTH 180
+static lv_obj_t *aem_in_out_power_arc_show_create(lv_obj_t *par)
+{
+    in_out_power_scr_ui_data_t *activity_ui_data = lv_obj_get_user_data(par);
+    activity_day_data_t day_data = get_today_training_day_data();
+
+    char *in_power_data = aem_auto_release_txt_fmt("%d", day_data.steps);
+    lv_obj_t *in_power_item = activity_value_item_create(par, (lv_color_t)LV_COLOR_BLACK, in_power_data, 70, aem_font_def());
+    lv_obj_set_style_bg_color(in_power_item, (lv_color_t)LV_COLOR_BLUE, 0);
+    lv_obj_set_style_radius(in_power_item, AEM_SIZE_FACTOR_466(10), 0);
+    lv_obj_set_style_width(in_power_item, AEM_SIZE_FACTOR_466(200), 0);
+
+    if (in_power_item)
+    {
+        activity_ui_data->in_power_value = lv_obj_get_child(in_power_item, 0);
+    }
+
+    char *out_power_data = aem_auto_release_txt_fmt("%d", day_data.steps);
+    lv_obj_t *out_power_item = activity_value_item_create(par, (lv_color_t)LV_COLOR_BLACK, out_power_data, 70, aem_font_def());
+    lv_obj_set_style_bg_color(out_power_item, (lv_color_t)LV_COLOR_GREEN, 0);
+    lv_obj_set_style_radius(out_power_item, AEM_SIZE_FACTOR_466(10), 0);
+    lv_obj_set_style_width(out_power_item, AEM_SIZE_FACTOR_466(200), 0);
+
+    if (out_power_item)
+    {
+        activity_ui_data->out_power_value = lv_obj_get_child(out_power_item, 0);
+    }
+
+    char *in_voltage_data = aem_auto_release_txt_fmt("%d", day_data.calories);
+    lv_obj_t *in_voltage_item = activity_value_item_create(par, (lv_color_t)LV_COLOR_BLUE, in_voltage_data, 50, aem_font_sub());
+    //lv_obj_set_style_bg_color(in_voltage_item, (lv_color_t)LV_COLOR_WHITE, 0);
+    lv_obj_set_style_align(in_voltage_item, LV_ALIGN_LEFT_MID, 0);
+    lv_obj_set_style_width(in_voltage_item, AEM_SIZE_FACTOR_466(VOLT_CURR_WIDTH), 0);
+
+    if (in_voltage_item)
+    {
+        activity_ui_data->in_voltage_value = lv_obj_get_child(in_voltage_item, 0);
+    }
+
+    char *out_voltage_data = aem_auto_release_txt_fmt("%d", day_data.calories);
+
+    lv_obj_t *out_voltage_item = activity_value_item_create(par, (lv_color_t)LV_COLOR_GREEN, out_voltage_data, 50, aem_font_sub());
+
+    //lv_obj_set_style_bg_color(out_voltage_item, (lv_color_t)LV_COLOR_WHITE, 0);
+    lv_obj_set_style_align(out_voltage_item, LV_ALIGN_LEFT_MID, 0);
+    lv_obj_set_style_width(out_voltage_item, AEM_SIZE_FACTOR_466(VOLT_CURR_WIDTH), 0);
+
+    if (out_voltage_item)
+    {
+        activity_ui_data->out_voltage_value = lv_obj_get_child(out_voltage_item, 0);
+    }
+
+    char *in_current_data = aem_auto_release_txt_fmt("%d", day_data.durmin);
+    lv_obj_t *in_current_item = activity_value_item_create(par, (lv_color_t)LV_COLOR_BLUE, in_current_data, 50, aem_font_sub());
+    //lv_obj_set_style_bg_color(in_current_item, (lv_color_t)LV_COLOR_WHITE, 0);
+    lv_obj_set_style_align(in_current_item, LV_ALIGN_LEFT_MID, 0);
+    lv_obj_set_style_width(in_current_item, AEM_SIZE_FACTOR_466(VOLT_CURR_WIDTH), 0);
+
+    if (in_current_item)
+    {
+        activity_ui_data->in_current_value = lv_obj_get_child(in_current_item, 0);
+    }
+
+    char *out_current_data = aem_auto_release_txt_fmt("%d", day_data.durmin);
+    lv_obj_t *out_current_item = activity_value_item_create(par, (lv_color_t)LV_COLOR_GREEN, out_current_data, 50, aem_font_sub());
+    //lv_obj_set_style_bg_color(out_current_item, (lv_color_t)LV_COLOR_WHITE, 0);
+    lv_obj_set_style_align(out_current_item, LV_ALIGN_LEFT_MID, 0);
+    lv_obj_set_style_width(out_current_item, AEM_SIZE_FACTOR_466(VOLT_CURR_WIDTH), 0);
+
+    if (out_current_item)
+    {
+        activity_ui_data->out_current_value = lv_obj_get_child(out_current_item, 0);
+    }
+
+    lv_obj_align(in_power_item, LV_ALIGN_LEFT_MID, AEM_SIZE_HOR_FACTOR_466(10), AEM_SIZE_VER_FACTOR_466(0));
+    lv_obj_align_to(in_voltage_item, in_power_item, LV_ALIGN_OUT_BOTTOM_MID, AEM_SIZE_HOR_FACTOR_466(65), AEM_SIZE_VER_FACTOR_466(0));        
+    lv_obj_align_to(in_current_item, in_voltage_item, LV_ALIGN_OUT_BOTTOM_MID, 0, 0);        
+    
+    lv_obj_t *in_power_unit_label = text_canvas_create(in_power_item);
+    if (in_power_unit_label)
+    {
+        lv_obj_set_style_text_font(in_power_unit_label, aem_font_sub(), 0);
+        text_canvas_set_text(in_power_unit_label, "mW");
+        lv_obj_set_style_text_color(in_power_unit_label, (lv_color_t)LV_COLOR_BLACK, 0);
+        lv_obj_align(in_power_unit_label, LV_ALIGN_TOP_MID, AEM_SIZE_HOR_FACTOR_466(45), AEM_SIZE_VER_FACTOR_466(18));
+    }
+
+    lv_obj_t *in_voltage_unit_label = text_canvas_create(in_voltage_item);
+    if (in_voltage_unit_label)
+    {
+        lv_obj_set_style_text_font(in_voltage_unit_label, aem_font_small(), 0);
+        text_canvas_set_text(in_voltage_unit_label, "V");
+        lv_obj_set_style_text_color(in_voltage_unit_label, (lv_color_t)LV_COLOR_BLUE, 0);
+        lv_obj_align(in_voltage_unit_label, LV_ALIGN_TOP_MID, AEM_SIZE_HOR_FACTOR_466(10), AEM_SIZE_VER_FACTOR_466(15));
+    }
+
+    lv_obj_t *in_current_unit_label = text_canvas_create(in_current_item);
+    if (in_current_unit_label)
+    {
+        lv_obj_set_style_text_font(in_current_unit_label, aem_font_small(), 0);
+        text_canvas_set_text(in_current_unit_label, "mA");
+        lv_obj_set_style_text_color(in_current_unit_label, (lv_color_t)LV_COLOR_BLUE, 0);
+        lv_obj_align(in_current_unit_label, LV_ALIGN_TOP_MID, AEM_SIZE_HOR_FACTOR_466(15), AEM_SIZE_VER_FACTOR_466(15));
+    }
+
+    lv_obj_align(out_power_item, LV_ALIGN_RIGHT_MID, AEM_SIZE_HOR_FACTOR_466(-10), AEM_SIZE_VER_FACTOR_466(0));
+    lv_obj_align_to(out_voltage_item, out_power_item, LV_ALIGN_OUT_BOTTOM_MID, AEM_SIZE_HOR_FACTOR_466(5), AEM_SIZE_VER_FACTOR_466(0));
+    lv_obj_align_to(out_current_item, out_voltage_item, LV_ALIGN_OUT_BOTTOM_MID, 0, 0);
+
+    lv_obj_t *out_power_unit_label = text_canvas_create(out_power_item);
+    if (out_power_unit_label)
+    {
+        lv_obj_set_style_text_font(out_power_unit_label, aem_font_sub(), 0);
+        text_canvas_set_text(out_power_unit_label, "mW");
+        lv_obj_set_style_text_color(out_power_unit_label, (lv_color_t)LV_COLOR_BLACK, 0);
+        lv_obj_align(out_power_unit_label, LV_ALIGN_TOP_MID, AEM_SIZE_HOR_FACTOR_466(45), AEM_SIZE_VER_FACTOR_466(18));
+    }
+
+    lv_obj_t *out_voltage_unit_label = text_canvas_create(out_voltage_item);
+    if (out_voltage_unit_label)
+    {
+        lv_obj_set_style_text_font(out_voltage_unit_label, aem_font_small(), 0);
+        text_canvas_set_text(out_voltage_unit_label, "V");
+        lv_obj_set_style_text_color(out_voltage_unit_label, (lv_color_t)LV_COLOR_GREEN, 0);
+        lv_obj_align(out_voltage_unit_label, LV_ALIGN_TOP_MID, AEM_SIZE_HOR_FACTOR_466(10), AEM_SIZE_VER_FACTOR_466(15));
+    }
+
+    lv_obj_t *out_current_unit_label = text_canvas_create(out_current_item);
+    if (out_current_unit_label)
+    {
+        lv_obj_set_style_text_font(out_current_unit_label, aem_font_small(), 0);
+        text_canvas_set_text(out_current_unit_label, "mA");
+        lv_obj_set_style_text_color(out_current_unit_label, (lv_color_t)LV_COLOR_GREEN, 0);
+        lv_obj_align(out_current_unit_label, LV_ALIGN_TOP_MID, AEM_SIZE_HOR_FACTOR_466(15), AEM_SIZE_VER_FACTOR_466(15));
+    }
+
+    // Arcs
+    lv_obj_t *arc_bg = aem_bg_create(par, DEF_UI_WIDTH, DEF_UI_HEIGHT, lv_color_black());
+    if (arc_bg)
+    {
+        //lv_obj_clear_flag(arc_bg, LV_OBJ_FLAG_CLICKABLE);
+        lv_obj_set_style_bg_opa(arc_bg, LV_OPA_TRANSP, 0);
+        lv_obj_set_style_transform_pivot_x(arc_bg, DEF_UI_WIDTH / 2, 0);
+        lv_obj_set_style_transform_pivot_y(arc_bg, DEF_UI_HEIGHT / 2, 0);
+   
+        lv_obj_t *point_line_icon = lv_img_create(arc_bg);
+        if (point_line_icon)
+        {
+            //lv_obj_clear_flag(point_line_icon, LV_OBJ_FLAG_CLICKABLE);
+            lv_img_set_src(point_line_icon, &IMG_SCENE_IN_OUT_POWER_PIC_POINT_LINE);
+            lv_obj_align(point_line_icon, LV_ALIGN_TOP_MID, AEM_SIZE_HOR_FACTOR_466(0), AEM_SIZE_VER_FACTOR_466(0));
+        }
+
+        lv_obj_t *in_icon = lv_img_create(arc_bg);
+        if (in_icon)
+        {
+            //lv_obj_clear_flag(in_icon, LV_OBJ_FLAG_CLICKABLE);
+            lv_img_set_src(in_icon, &IMG_SCENE_IN_OUT_POWER_PIC_IN);
+            lv_obj_align(in_icon, LV_ALIGN_LEFT_MID, AEM_SIZE_HOR_FACTOR_466(20), AEM_SIZE_VER_FACTOR_466(80));
+        }
+
+        lv_obj_t *out_icon = lv_img_create(arc_bg);
+        if (out_icon)
+        {
+            //lv_obj_clear_flag(out_icon, LV_OBJ_FLAG_CLICKABLE);
+            lv_img_set_src(out_icon, &IMG_SCENE_IN_OUT_POWER_PIC_OUT);
+            lv_obj_align(out_icon, LV_ALIGN_RIGHT_MID, AEM_SIZE_HOR_FACTOR_466(-20), AEM_SIZE_VER_FACTOR_466(80));
+        }
+
+        lv_obj_t *link_icon = lv_img_create(arc_bg);
+        if (link_icon)
+        {
+            lv_obj_clear_flag(link_icon, LV_OBJ_FLAG_CLICKABLE);
+            lv_img_set_src(link_icon, &IMG_SCENE_IN_OUT_POWER_PIC_LINK);
+            lv_obj_align(link_icon, LV_ALIGN_BOTTOM_MID, AEM_SIZE_HOR_FACTOR_466(0), AEM_SIZE_VER_FACTOR_466(-10));
+        }  
+    }
+
+    return par;
+}
+
+static void bg_event_cb(lv_event_t *event)
+{
+    if (event->code == LV_EVENT_SHORT_CLICKED)
+    {
+        in_out_power_scr_ui_data_t *ext_data = event->user_data;
+        if (ext_data && ext_data->widget_start)
+        {
+            aem_app_run(AEM_APP_ID_IN_OUT_POWER);
+        }
+    }
+}
+
+lv_obj_t *aem_in_out_power_screen_create(lv_obj_t *par, bool widget_start)
+{
+    in_out_power_scr_ui_data_t *ext_data = load_res();
+    if (ext_data == NULL)
+    {
+        return NULL;
+    }
+
+    ext_data->widget_start = widget_start;
+    lv_obj_t *screen1 = aem_bg_create(par, DEF_UI_WIDTH, DEF_UI_HEIGHT, lv_color_black());
+    if (screen1)
+    {
+        lv_obj_set_user_data(screen1, ext_data);
+        lv_obj_add_event_cb(screen1, bg_event_cb, LV_EVENT_SHORT_CLICKED, ext_data);
+
+        aem_in_out_power_arc_show_create(screen1);
+    }
+
+    return screen1;
+}
+
+void aem_in_out_power_screen_del(lv_obj_t *par)
+{
+    if (par == NULL)
+    {
+        return;
+    }
+
+    in_out_power_scr_ui_data_t *ext_data = lv_obj_get_user_data(par);
+    if (ext_data)
+    {
+        lv_mem_free(ext_data);
+        ext_data = NULL;
+        lv_obj_set_user_data(par, NULL);
+    }
+}
+extern float f_BusVoltage[2];
+extern float f_Power[2];
+extern float f_Current[2];
+void aem_in_out_power_screen_update(lv_obj_t *par)
+{
+    in_out_power_scr_ui_data_t *power_volt_cur_data = lv_obj_get_user_data(par);
+
+    
+    //float f_Power[2] = {10.0, 12.0};
+    //float f_BusVoltage[2] = {5.00, 4.00};
+    //float f_Current[2] = {2.00, 3.00};
+    
+    if (power_volt_cur_data)
+    {
+        char str_data[32] = {0};
+
+        //if (power_volt_cur_data->in_power_value)
+        {
+            sprintf(str_data, "%05.2f", f_Power[1]);
+            text_canvas_set_text(power_volt_cur_data->in_power_value, str_data);
+            
+            sprintf(str_data, "%05.2f", f_Power[0]);
+            text_canvas_set_text(power_volt_cur_data->out_power_value, str_data);
+        }
+        //if (power_volt_cur_data->in_voltage_value)
+        {
+            sprintf(str_data, "%05.2f", f_BusVoltage[1]);
+            text_canvas_set_text(power_volt_cur_data->in_voltage_value, str_data);
+            
+            sprintf(str_data, "%05.2f", f_BusVoltage[0]);
+            text_canvas_set_text(power_volt_cur_data->out_voltage_value, str_data);
+        }
+        //if (power_volt_cur_data->in_current_value)
+        {
+            sprintf(str_data, "%05.2f", f_Current[1]);
+            text_canvas_set_text(power_volt_cur_data->in_current_value, str_data);
+            
+            sprintf(str_data, "%05.2f", f_Current[0]);
+            text_canvas_set_text(power_volt_cur_data->out_current_value, str_data);
+        }
+    }
+}

+ 12 - 0
application/aem_watch/src/application/in_out_power/aem_in_out_power_screen.h

@@ -0,0 +1,12 @@
+#ifndef AEM_ACTIVITY_SCREEN_H
+#define AEM_ACTIVITY_SCREEN_H
+
+#include "aem_activity_data_if.h"
+#include "lvgl.h"
+
+lv_obj_t *aem_in_out_power_screen_create(lv_obj_t *par, bool widget_start);
+
+void aem_in_out_power_screen_update(lv_obj_t *par);
+void aem_in_out_power_screen_del(lv_obj_t *par);
+
+#endif

+ 153 - 0
application/aem_watch/src/application/in_out_power/aem_widget_in_out_power.c

@@ -0,0 +1,153 @@
+/**
+ * @FileName     : aem_widget_in_out_power.c
+ * @Author       : wingcool_group
+ * @CreateDate   : 2024/11/27 15:49:32
+ * @Description  : in_out_power
+ **/
+
+#include "aem_watchface_mgr.h"
+#include "aem_app_activity.h"
+#include "aem_time.h"
+#include "aem_log.h"
+#include "aem_bg.h"
+#include "aem_sys_function_interface.h"
+#include "aem_in_out_power_screen.h"
+#include "res_include.h"
+#include "app_ui.h"
+
+typedef struct
+{
+    lv_obj_t *bg;
+    lv_timer_t *timer;
+} aem_wf_in_out_power_t;
+
+static aem_wf_in_out_power_t *s_wf_in_out_power = NULL;
+
+static void timer_cb(lv_timer_t *t)
+{
+    if (s_wf_in_out_power == NULL)
+        return;
+    if (s_wf_in_out_power->bg == NULL)
+        return;
+
+    aem_in_out_power_screen_update(s_wf_in_out_power->bg);
+}
+
+static int32_t keypad_evt_handler(aem_key_evt_info_t *evt_info)
+{
+    return 0;
+}
+
+static const aem_sys_evt_ops_t ops = {
+    .key_evt_func = keypad_evt_handler,
+};
+
+static lv_obj_t *on_start(lv_obj_t *par)
+{
+    if (s_wf_in_out_power == NULL)
+    {
+        s_wf_in_out_power = lv_mem_alloc(sizeof(aem_wf_in_out_power_t));
+        if (s_wf_in_out_power)
+        {
+            memset(s_wf_in_out_power, 0, sizeof(aem_wf_in_out_power_t));
+            s_wf_in_out_power->bg = aem_in_out_power_screen_create(par, true);
+            return s_wf_in_out_power->bg;
+        }
+    }
+
+    return NULL;
+}
+
+static void on_resume()
+{
+    if (s_wf_in_out_power == NULL)
+        return;
+
+    if (s_wf_in_out_power->timer == NULL)
+    {
+        s_wf_in_out_power->timer = lv_timer_create(timer_cb, 1000, NULL);
+        if (s_wf_in_out_power->timer)
+        {
+            lv_timer_ready(s_wf_in_out_power->timer);            
+        }
+
+    }
+    else
+    {
+        lv_timer_resume(s_wf_in_out_power->timer);
+    }
+}
+
+static void on_suspend()
+{
+    if (s_wf_in_out_power == NULL)
+        return;
+
+    if (s_wf_in_out_power->timer)
+    {
+        lv_timer_pause(s_wf_in_out_power->timer);
+    }
+}
+
+static void on_close()
+{
+    if (s_wf_in_out_power == NULL)
+        return;
+
+    if (s_wf_in_out_power->timer)
+    {
+        lv_timer_del(s_wf_in_out_power->timer);
+        s_wf_in_out_power->timer = NULL;
+    }
+    if (s_wf_in_out_power->bg)
+    {
+        aem_in_out_power_screen_del(s_wf_in_out_power->bg);
+
+        lv_obj_del(s_wf_in_out_power->bg);
+        s_wf_in_out_power->bg = NULL;
+    }
+    lv_mem_free(s_wf_in_out_power);
+    s_wf_in_out_power = NULL;
+}
+
+static void on_ui_refresh(aem_msg_t *msg)
+{
+}
+
+static void on_edit(lv_obj_t *edit_img)
+{
+}
+
+static char *get_name(void)
+{
+    return res_manager_get_string_from_id(ID_KEY_WIDGET_IN_OUT_POWER);
+}
+
+static void *get_edit_img(void)
+{
+    return &IMG_SCENE_LAUNCH_PIC_IN_OUT_POWER;
+}
+
+static void update_visible(aem_time_t *current_time)
+{
+}
+
+static void update_invisible(aem_time_t *current_time)
+{
+}
+
+const aem_clock_ops_t in_out_power_ops =
+{
+    .start = on_start,
+    .pause = on_suspend,
+    .resume = on_resume,
+    .stop = on_close,
+    .edit = on_edit,
+    .edit_img = get_edit_img,
+    .name = get_name,
+    .update_visible = update_visible,
+    .update_invisible = update_invisible,
+    .refresh = on_ui_refresh,
+};
+
+AEM_BUILTIN_WATCHFACE_REGISTER(WIDGET_ID_IN_OUT_POWER, 0, NULL, &in_out_power_ops);

+ 29 - 1
thirdparty/lib/aem/adapter/def_settings/aem_adapter_def_settings.c

@@ -14,6 +14,8 @@
 
 #define WF_INFO_MAGIC (0x10000000)
 
+#define RELEASE_WF 1 
+
 static aem_lang_all_support_t s_aem_language_support;
 
 const static aem_language_table_t s_aem_language_table[] =
@@ -24,6 +26,7 @@ const static aem_language_table_t s_aem_language_table[] =
 
 // 内置表盘id数组,第一个为默认表盘。跟项目走, 添加视频表盘, 空间调整为2M
 #ifdef CONFIG_BOARD_ATS3085S4_DEV_WATCH_EXT_NOR
+#if RELEASE_WF
 // 预置表盘,文件不可删除,默认表盘为此数组第一个表盘
 const static uint32_t s_inside_wf[] = {
     80,
@@ -44,9 +47,34 @@ const static uint32_t s_outside_wf[] = {
     11,
 };
 #endif
+#else
+#if RELEASE_WF
+// 预置表盘,文件不可删除,默认表盘为此数组第一个表盘
+const static uint32_t s_inside_wf[] = {
+    10,
+};
+// 预置表盘,文件可删除
+const static uint32_t s_outside_wf[] = {
+    3,
+    4,
+    11,
+};
+#else
+// 预置表盘,文件不可删除,默认表盘为此数组第一个表盘
+const static uint32_t s_inside_wf[] = {
+    80,
+};
+// 预置表盘,文件可删除
+const static uint32_t s_outside_wf[] = {
+    79,
+};
+#endif
+#endif
 
 // 小部件配置
 const static aem_widgets_sort_item_t s_widgets[] = {
+    {.id = WIDGET_ID_IN_OUT_POWER, .visible = AEM_WF_VISIBLE},
+
     {.id = WIDGET_ID_ACTIVITY, .visible = AEM_WF_VISIBLE},
 
     {.id = WIDGET_ID_HEART_RATE, .visible = AEM_WF_VISIBLE},
@@ -55,7 +83,7 @@ const static aem_widgets_sort_item_t s_widgets[] = {
 
     {.id = WIDGET_ID_MUSIC, .visible = AEM_WF_VISIBLE},
 
-    {.id = WIDGET_ID_OFTEN_WORKOUT, .visible = AEM_WF_VISIBLE},
+    //{.id = WIDGET_ID_OFTEN_WORKOUT, .visible = AEM_WF_VISIBLE},
 };
 
 static aem_scr_lock_time_t get_def_src_lock_time(void)

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

@@ -13,6 +13,7 @@ typedef enum
     AEM_APP_ID_WORKOUT,
     AEM_APP_ID_WORKOUT_RECORD,
     AEM_APP_ID_ACTIVITY,
+    AEM_APP_ID_IN_OUT_POWER,
     AEM_APP_ID_PHONE,
     AEM_APP_ID_HEART_RATE,
     AEM_APP_ID_SPO2,
@@ -64,6 +65,7 @@ typedef enum
 #define AEM_APP_ACTIVITY "activity"
 #define AEM_APP_WORKOUT "workout"
 #define AEM_APP_WORKOUT_RECORD "workout_record"
+#define AEM_APP_IN_OUT_POWER "in_out_power"
 #define AEM_APP_HEARTRATE "heartrate"
 #define AEM_APP_SPO2 "spo2"
 #define AEM_APP_FEMALE_HEALTH "female_health"

+ 1 - 0
thirdparty/lib/aem/include/framework/core/app_mgr/include/aem_ui_refr.h

@@ -44,6 +44,7 @@ typedef enum
     UI_RT_MAGNETISM_SYNC        = 0x21,
     UI_RT_BAROMETER_SYNC        = 0x22,
     UI_DATA_RESET_END           = 0x23,
+    UI_IN_OUT_POWER_REFRESH     = 0x24,
 
     UI_REFRESH_END_ID           = 0xFF, // 需要按现有顺序定义在UI_REFRESH_END_ID之前
 } ui_refr_evt_type_t;

+ 1 - 0
thirdparty/lib/aem/include/framework/core/watch_fwk/watch_face/aem_watchface_mgr.h

@@ -52,6 +52,7 @@ typedef struct
 typedef enum
 {
 	WIDGET_ID_INVALID,		 // 无效
+	WIDGET_ID_IN_OUT_POWER,	 // 输入输出功率
 	WIDGET_ID_ACTIVITY,		 // 三环数据
 	WIDGET_ID_OFTEN_WORKOUT, // 常用运动
 	WIDGET_ID_WEATHER,		 // 天气

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott