修复表盘电量更新问题;需要更新表盘资源
authorCaisking <3449750381@qq.com>
Sat, 27 Apr 2024 09:46:59 +0000 (17:46 +0800)
committerCaisking <3449750381@qq.com>
Sat, 27 Apr 2024 09:46:59 +0000 (17:46 +0800)
19 files changed:
code/sdk/application/wearable/fd230app/CMakeLists.txt
code/sdk/application/wearable/fd230app/nativeui/main/include/dial/DialDataBase.h
code/sdk/application/wearable/fd230app/nativeui/main/include/dial/DialModelPower.h
code/sdk/application/wearable/fd230app/nativeui/main/include/dial/DialModelPowerStandby.h [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/main/src/dial/DialModelPower.cpp
code/sdk/application/wearable/fd230app/nativeui/main/src/dial/DialModelPowerStandby.cpp [new file with mode: 0644]
code/sdk/application/wearable/fd230app/nativeui/traing/training_card/include/TraingCardPresenter.h
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/Dynamic_cat.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/classic.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/galaxy.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/geometry.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/jellyfish.bin
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/dial/maomao.bin
dial_resource_files/Dynamic_cat.xml
dial_resource_files/classic.xml
dial_resource_files/galaxy.xml
dial_resource_files/geometry.xml
dial_resource_files/jellyfish.xml
dial_resource_files/maomao.xml

index 1823754..045d8d8 100644 (file)
@@ -152,6 +152,7 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/dial/DialModelHeartRate.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/dial/DialModelSteps.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/dial/DialModelPower.cpp
+    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/dial/DialModelPowerStandby.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/dial/DialModelCharge.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/main/src/dial/DialModelSPO2.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/bloodoxygen/src/BloodOxygenView.cpp
index a35b08a..d8e4769 100644 (file)
@@ -1,3 +1,9 @@
+/***
+ * @Date: 2024-04-15 10:55:58
+ * @LastEditors: Caisking 3449750381@qq.com
+ * @LastEditTime: 2024-04-27 11:16:57
+ * @FilePath: /XTS_FD230/FD230/code/sdk/application/wearable/fd230app/nativeui/main/include/dial/DialDataBase.h
+ */
 
 /*
  * Copyright (c) CompanyNameMagicTag 2023. All rights reserved.
@@ -32,11 +38,12 @@ enum class DialDataType
     DATA_TYPE_TIME_MONTH,     // 月份
     DATA_TYPE_TIME_YEAR,      // 年份
     /* ------------------------------- 在下面增加新数据类型 ------------------------------- */
-    DATA_TYPE_CHARGE,   // 充电状态
-    DATA_TYPE_DIALPATH, // 表盘路径
-    DATA_TYPE_SPO2,     // 血氧
-    DATA_TYPE_DISTANCE, // 距离
-    DATA_TYPE_WEATHER,  // 天气
+    DATA_TYPE_CHARGE,        // 充电状态
+    DATA_TYPE_DIALPATH,      // 表盘路径
+    DATA_TYPE_SPO2,          // 血氧
+    DATA_TYPE_DISTANCE,      // 距离
+    DATA_TYPE_WEATHER,       // 天气
+    DATA_TYPE_POWER_STANDBY, // 备用电量数据类型
 
     DATA_TYPE_MULTI_FLOAT_BASE = 0x2fff, // 多个浮点数据类型基值
 
index 598edb3..537b009 100644 (file)
@@ -1,3 +1,9 @@
+/***
+ * @Date: 2024-04-15 10:55:58
+ * @LastEditors: Caisking 3449750381@qq.com
+ * @LastEditTime: 2024-04-27 10:01:25
+ * @FilePath: /XTS_FD230/FD230/code/sdk/application/wearable/fd230app/nativeui/main/include/dial/DialModelPower.h
+ */
 /*
  * Copyright (c) CompanyNameMagicTag 2023. All rights reserved.
  * Description: DialModelPower
@@ -24,9 +30,11 @@ namespace OHOS
         }
         bool GetDialFloatData(DialDataType &type, float &out) override;
         void UpdatePower();
+        void NotifyPowerUpdate();
 
     private:
-        uint8_t power_ = 101;
+        uint8_t power_ = 0;
+        bool powerUpdated_{false};
     };
 }
 #endif
diff --git a/code/sdk/application/wearable/fd230app/nativeui/main/include/dial/DialModelPowerStandby.h b/code/sdk/application/wearable/fd230app/nativeui/main/include/dial/DialModelPowerStandby.h
new file mode 100644 (file)
index 0000000..d0c5156
--- /dev/null
@@ -0,0 +1,46 @@
+/***
+ * @Date: 2024-04-27 11:55:14
+ * @LastEditors: Caisking 3449750381@qq.com
+ * @LastEditTime: 2024-04-27 11:56:11
+ * @FilePath: /XTS_FD230/FD230/code/sdk/application/wearable/fd230app/nativeui/main/include/dial/DialModelPowerStanbyStandby.h
+ */
+/***
+ * @Date: 2024-04-15 10:55:58
+ * @LastEditors: Caisking 3449750381@qq.com
+ * @LastEditTime: 2024-04-27 10:01:25
+ * @FilePath: /XTS_FD230/FD230/code/sdk/application/wearable/fd230app/nativeui/main/include/dial/DialModelPowerStanby.h
+ */
+/*
+ * Copyright (c) CompanyNameMagicTag 2023. All rights reserved.
+ * Description: DialModelPowerStanby
+ * Author:
+ * Create: 2023-12
+ */
+
+#ifndef DIAL_MODEL_POWER_STANDBY_H
+#define DIAL_MODEL_POWER_STANDBY_H
+
+#include "DialBaseModel.h"
+
+namespace OHOS
+{
+    class DialModelPowerStanby : public DialBaseModel
+    {
+    public:
+        DialModelPowerStanby() {}
+        virtual ~DialModelPowerStanby() {}
+        static DialModelPowerStanby *GetInstance()
+        {
+            static DialModelPowerStanby instance;
+            return &instance;
+        }
+        bool GetDialFloatData(DialDataType &type, float &out) override;
+        void UpdatePowerStanby();
+        void NotifyPowerStanbyUpdate();
+
+    private:
+        uint8_t PowerStanby_ = 0;
+        bool PowerStanbyUpdated_{false};
+    };
+}
+#endif
index c2aa59f..49962d6 100644 (file)
@@ -1,4 +1,10 @@
-/*** 
+/***
+ * @Date: 2024-04-15 10:55:58
+ * @LastEditors: Caisking 3449750381@qq.com
+ * @LastEditTime: 2024-04-27 10:00:50
+ * @FilePath: /XTS_FD230/FD230/code/sdk/application/wearable/fd230app/nativeui/main/src/dial/DialModelPower.cpp
+ */
+/***
  * @Author: Caisking 3449750381@qq.com
  * @Date: 2024-02-21 10:06:53
  * @LastEditors: Caisking 3449750381@qq.com
@@ -28,28 +34,38 @@ namespace OHOS
     bool DialModelPower::GetDialFloatData(DialDataType &type, float &out)
     {
         (void)type;
-        if (power_ == 101)
+        if (!powerUpdated_)
         {
             UpdatePower();
-            return true;
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "UpdatePower %d", power_);
+            return false;
         }
-        // 获取电池电压值
         float voltage = 0.0F;
-        power_ = battery_get_voltage(&voltage); // 进度条0.1~1;电量1~100
+        power_ = battery_get_voltage(&voltage);
         out = static_cast<float>(power_);
-        // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetDialFloatData %d", power_);
         return true;
     }
+
     void DialModelPower::UpdatePower()
     {
-        // 获取电池电压值
         float voltage = 0.0F;
         power_ = battery_get_voltage(&voltage);
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "UpdatePower %d", power_);
+        if (power_ == 0)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Failed to get battery voltage");
+            return;
+        }
+        powerUpdated_ = true;
+        NotifyPowerUpdate();
+    }
+
+    void DialModelPower::NotifyPowerUpdate()
+    {
+        onChangeListener_ = new OnDialDataUpdateListener();
         if (onChangeListener_ != nullptr)
         {
             onChangeListener_->OnDialFloatDataUpdate(DialDataType::DATA_TYPE_POWER, power_);
+            PRINT("[UpdatePower!]\r\n");
         }
     }
-
 }
diff --git a/code/sdk/application/wearable/fd230app/nativeui/main/src/dial/DialModelPowerStandby.cpp b/code/sdk/application/wearable/fd230app/nativeui/main/src/dial/DialModelPowerStandby.cpp
new file mode 100644 (file)
index 0000000..a4a3763
--- /dev/null
@@ -0,0 +1,63 @@
+/***
+ * @Date: 2024-04-27 11:56:33
+ * @LastEditors: Caisking 3449750381@qq.com
+ * @LastEditTime: 2024-04-27 11:58:02
+ * @FilePath: /XTS_FD230/FD230/code/sdk/application/wearable/fd230app/nativeui/main/src/dial/DialModelPowerStandby.cpp
+ */
+/*
+ * Copyright (c) CompanyNameMagicTag 2023. All rights reserved.
+ * Description: DialModelPowerStanby
+ * Author:
+ * Create: 2023-12
+ */
+
+#include "RegisterDialModel.h"
+#include "DialModelPowerStandby.h"
+#include "DialBoxProgressView.h"
+#include <string>
+#include "battery_hal.h"
+#include "wearable_log.h"
+extern uint8_t battery_get_voltage(float *voltage);
+
+REGIST_DIAL_MODULE(DialDataType::DATA_TYPE_POWER_STANDBY, OHOS::DialModelPowerStanby::GetInstance());
+
+namespace OHOS
+{
+    bool DialModelPowerStanby::GetDialFloatData(DialDataType &type, float &out)
+    {
+        (void)type;
+        if (!PowerStanbyUpdated_)
+        {
+            UpdatePowerStanby();
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "UpdatePowerStanby %d", PowerStanby_);
+            return false;
+        }
+        float voltage = 0.0F;
+        PowerStanby_ = battery_get_voltage(&voltage);
+        out = static_cast<float>(PowerStanby_);
+        return true;
+    }
+
+    void DialModelPowerStanby::UpdatePowerStanby()
+    {
+        float voltage = 0.0F;
+        PowerStanby_ = battery_get_voltage(&voltage);
+        if (PowerStanby_ == 0)
+        {
+            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Failed to get battery voltage");
+            return;
+        }
+        PowerStanbyUpdated_ = true;
+        NotifyPowerStanbyUpdate();
+    }
+
+    void DialModelPowerStanby::NotifyPowerStanbyUpdate()
+    {
+        onChangeListener_ = new OnDialDataUpdateListener();
+        if (onChangeListener_ != nullptr)
+        {
+            onChangeListener_->OnDialFloatDataUpdate(DialDataType::DATA_TYPE_POWER_STANDBY, PowerStanby_);
+            PRINT("[UpdatePowerStanby!]\r\n");
+        }
+    }
+}
index 9072508..62b3437 100644 (file)
@@ -65,7 +65,6 @@ namespace OHOS
         bool OnDrag(UIView &view, const DragEvent &event) override;\r
         int tag_ = 0;\r
         bool opensensorstuats{false};\r
-        bool goalSet{nullptr};\r
         // bool OnDragEnd(UIView& view, const DragEvent& event) override;\r
     };\r
 } // namespace OHOS\r
index cc28596..af584d5 100644 (file)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:53c9ec30b55f0ac36eb75004ee4879ee89da2a55641c92f4d9d3a8c347ce5279
-size 1589658
+oid sha256:cbca2bd87da90ab2f57fe5ee82c98a82b6143694c461c859806e4ad62ffa2a59
+size 1589634
index e8efc23..e63bbad 100644 (file)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:ca273f320f6d7baa851297c6ed8fe0c88baba9a52e8e41a841d8588c7965909b
-size 209311
+oid sha256:8fedf9d0e0bae4092e18acfa11df03eeec8702dd0359f5040d76470a13062b2a
+size 209287
index 34e02cf..27e4bba 100644 (file)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:8f51a2a85639bdbbffd8a5d92442a2c8a8ed7240146b2b1ad8ff504c5432558b
-size 217103
+oid sha256:8c8c35e839eeb124353a58fd7be8dd2f80330f1f1597493bf0aa877b896e2333
+size 217079
index d56dfa8..dcc99a9 100644 (file)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:7856fb100c166ae04cb5c782d00e471d7999edc96d23c2e96f890909359de690
-size 355785
+oid sha256:2a0d12e250a461b18ff3ca36a17ace0d9c9c712254641b2155d8d626429f67f6
+size 355761
index ffe780c..f30f25d 100644 (file)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:8608142cbc6bc56be0f5e74a4ec670b44bc5fa7be20cc5d5cec3c28f58e23ec8
-size 202416
+oid sha256:8f8bd3c281d4a283f0d456f1e94bedf66e6ab6df252d3b2018e44944652614ec
+size 202392
index db34989..538f023 100644 (file)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:1243a86f7910561ee45d991fd82821f2fe3834e07fa723eb50ace1d6f8a2b755
-size 209311
+oid sha256:0e94a8c269d1f3a37114475f377b3f5bf7dfe714722420d2f60494a341060803
+size 209287
index cd608b4..7f256c6 100644 (file)
@@ -15,8 +15,8 @@
     <!-- break_mode="adapt" rect="262 390 60 30" text="星期%2.0f" font_size="26" align="center" -->\r
     <!-- bind_data="17" period="10"></label> -->\r
     <box_progress id="battery_progress" rect="180 43 31 19"\r
-        gradient_colors="0xFFFF0000 0xFF00FF00 0xFF0000FF" gradient_stops="0.0 0.67 1.0"\r
-        cap_type="none" direction="left_to_right" background_color="0x00FFFFFF" bind_data="8"\r
+        color="0xFFFFFFFF" cap_type="none" direction="left_to_right" background_color="0x00FFFFFF"\r
+        bind_data="25"\r
         period="10"></box_progress>\r
     <option_img position="174 37"\r
         img_names="./dial_Dynamic_cat/Battery/Battery.png,./dial_Dynamic_cat/Battery/BatteryCharge.png"\r
index 7dd842f..d776b65 100644 (file)
@@ -16,8 +16,8 @@
         bind_data="16" period="10"></label>\r
 \r
     <box_progress id="battery_progress" rect="180 69 31 19"\r
-        gradient_colors="0xFFFF0000 0xFF00FF00 0xFF0000FF" gradient_stops="0.0 0.67 1.0"\r
-        cap_type="none" direction="left_to_right" background_color="0x00FFFFFF" bind_data="8"\r
+        color="0xFFFFFFFF" cap_type="none" direction="left_to_right" background_color="0x00FFFFFF"\r
+        bind_data="25"\r
         period="10"></box_progress>\r
     <option_img position="174 62"\r
         img_names="./dial_classic/Battery/Battery.png,./dial_classic/Battery/BatteryCharge.png"\r
index d7d3257..e043859 100644 (file)
     <option_img position="250 114"\r
         img_names="./dial_galaxy/week/7.png,./dial_galaxy/week/1.png,./dial_galaxy/week/2.png,./dial_galaxy/week/3.png,./dial_galaxy/week/4.png,./dial_galaxy/week/5.png,./dial_galaxy/week/6.png"\r
         bind_data="17" period="10"></option_img>\r
-    <!-- <label id="week_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf"\r
-    break_mode="adapt" rect="250 114 60 30" text="星期%2.0f" font_size="26" align="center"\r
-    bind_data="17" period="10"></label> -->\r
 \r
-    <label id="spo2_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf"\r
-        break_mode="adapt" rect="100 361 200 60" text="%3.0f%%" font_size="26" align="center"\r
-        bind_data="22" period="10"></label>\r
+    <label id="distance_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf"\r
+        break_mode="adapt" rect="100 361 200 60" text="%3.0f" font_size="26" align="center"\r
+        bind_data="23"></label>\r
     <label id="step_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf"\r
         break_mode="adapt" rect="197 361 200 60" text="%5.0f" font_size="26" align="center"\r
-        bind_data="1" period="10"></label>\r
+        bind_data="1"></label>\r
     <label id="heart_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf"\r
         break_mode="adapt" rect="316 361 200 60" text="%3.0f" font_size="26" align="center"\r
-        bind_data="2" period="10"></label>\r
+        bind_data="2"></label>\r
 \r
+    <label id="battery_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf"\r
+        break_mode="adapt" rect="226 49 200 60" text="%2.0f%%" font_size="26" align="center"\r
+        bind_data="8" period="60"></label>\r
     <box_progress id="battery_progress" rect="180 56 31 19"\r
-        gradient_colors="0xFFFF0000 0xFF00FF00 0xFF0000FF" gradient_stops="0.0 0.67 1.0"\r
-        cap_type="none" direction="left_to_right" background_color="0x00FFFFFF" bind_data="8"\r
-        period="10"></box_progress>\r
+        color="0xFFFFFFFF" cap_type="none" direction="left_to_right" background_color="0x00FFFFFF"\r
+        bind_data="25"\r
+        period="60"></box_progress>\r
     <option_img position="174 49"\r
         img_names="./dial_galaxy/Battery/Battery.png,./dial_galaxy/Battery/BatteryCharge.png"\r
         bind_data="20" period="10"></option_img>\r
-    <label id="battery_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf"\r
-        break_mode="adapt" rect="226 49 200 60" text="%2.0f%%" font_size="26" align="center"\r
-        bind_data="8" period="10"></label>\r
+\r
 \r
     <label id="hour_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf"\r
         break_mode="adapt" rect="59 160 77 104" text="%02.0f" font_size="120" align="center"\r
index 902714b..abba6e2 100644 (file)
@@ -3,7 +3,7 @@
     <sequence_img\r
         img_names="./dial_geometry/geometry/1.png,./dial_geometry/geometry/2.png,./dial_geometry/geometry/3.png,./dial_geometry/geometry/4.png,./dial_geometry/geometry/5.png,./dial_geometry/geometry/6.png,./dial_geometry/geometry/7.png,./dial_geometry/geometry/8.png,./dial_geometry/geometry/9.png,./dial_geometry/geometry/10.png,./dial_geometry/geometry/11.png"\r
         position="138 132" repeat="true" interval="100"></sequence_img>\r
-        \r
+\r
     <label id="month_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf"\r
         break_mode="adapt" rect="200 365 60 30" text="%2.0f月" font_size="26" align="center"\r
         bind_data="18" period="10"></label>\r
@@ -18,8 +18,8 @@
     <!-- bind_data="17" period="10"></label> -->\r
 \r
     <box_progress id="battery_progress" rect="180 43 31 19"\r
-        gradient_colors="0xFFFF0000 0xFF00FF00 0xFF0000FF" gradient_stops="0.0 0.67 1.0"\r
-        cap_type="none" direction="left_to_right" background_color="0x00FFFFFF" bind_data="8"\r
+        color="0xFFFFFFFF" cap_type="none" direction="left_to_right" background_color="0x00FFFFFF"\r
+        bind_data="25"\r
         period="10"></box_progress>\r
     <option_img position="174 37"\r
         img_names="./dial_geometry/Battery/Battery.png,./dial_geometry/Battery/BatteryCharge.png"\r
index 7895057..c0195d6 100644 (file)
@@ -11,8 +11,8 @@
         bind_data="17" period="10"></option_img>\r
 \r
     <box_progress id="battery_progress" rect="180 56 31 19"\r
-        gradient_colors="0xFFFF0000 0xFF00FF00 0xFF0000FF" gradient_stops="0.0 0.67 1.0"\r
-        cap_type="none" direction="left_to_right" background_color="0x00FFFFFF" bind_data="8"\r
+        color="0xFFFFFFFF" cap_type="none" direction="left_to_right" background_color="0x00FFFFFF"\r
+        bind_data="25"\r
         period="10"></box_progress>\r
     <option_img position="174 49"\r
         img_names="./dial_jellyfish/Battery/Battery.png,./dial_jellyfish/Battery/BatteryCharge.png"\r
index 1d5332a..688ae59 100644 (file)
@@ -4,6 +4,7 @@
     <option_img position="207 400"\r
         img_names="./dial_maomao/week/SUNDAY_IMAGE_PATH.png,./dial_maomao/week/MONDAY_IMAGE_PATH.png,./dial_maomao/week/TUESDAY_IMAGE_PATH.png,./dial_maomao/week/WEDNESDAY_IMAGE_PATH.png,./dial_maomao/week/THURSDAY_IMAGE_PATH.png,./dial_maomao/week/FIRDAY_IMAGE_PATH.png,./dial_maomao/week/SATURDAY_IMAGE_PATH.png"\r
         bind_data="17" period="10"></option_img>\r
+\r
     <label id="dateyear_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf"\r
         break_mode="adapt" rect="136 365 100 30" text="%4.0f年" font_size="26" align="center"\r
         bind_data="19" period="10"></label>\r
     <label id="dateday_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf"\r
         break_mode="adapt" rect="260 365 60 30" text="%2.0f日" font_size="26" align="center"\r
         bind_data="16" period="10"></label>\r
+\r
     <label id="battery_label" color="0xFFFFFFFF" font="HarmonyOS_Sans_SC_Regular.ttf"\r
         break_mode="adapt" rect="226 50 200 60" text="%2.0f%%" font_size="26" align="center"\r
-        bind_data="8" period="10"></label>\r
-    <box_progress id="battery_progress" rect="180 58 31 19"\r
-        gradient_colors="0xFFFF0000 0xFF00FF00 0xFF0000FF" gradient_stops="0.0 0.67 1.0"\r
-        cap_type="none" direction="left_to_right" background_color="0x00FFFFFF" bind_data="8"\r
-        period="10"></box_progress>\r
+        bind_data="8" period="60"></label>\r
+    <box_progress id="battery_progress" rect="180 43 31 19"\r
+        color="0xFFFFFFFF" cap_type="none" direction="left_to_right" background_color="0x00FFFFFF"\r
+        bind_data="25" period="10"></box_progress>\r
     <option_img position="174 52"\r
         img_names="./dial_maomao/Battery/Battery.png,./dial_maomao/Battery/BatteryCharge.png"\r
         bind_data="20" period="10"></option_img>\r
+\r
     <rotate_img id="hour" position="221 87" rotate_center="12.0 146.0" rotate_start="0"\r
         rotate_end="360" img_name="./dial_maomao/HOURHAND.png" bind_data="9" period="10"></rotate_img>\r
     <rotate_img id="minute" position="221 33" rotate_center="12.0 200.0" rotate_start="0"\r