实现表盘状态保存
authorCaisking <3449750381@qq.com>
Sat, 16 Mar 2024 10:39:32 +0000 (18:39 +0800)
committerCaisking <3449750381@qq.com>
Sat, 16 Mar 2024 10:39:32 +0000 (18:39 +0800)
code/sdk/application/wearable/fd230app/nativeui/config/ConfigModel.json
code/sdk/application/wearable/fd230app/nativeui/config/include/ConfigModel.h
code/sdk/application/wearable/fd230app/nativeui/config/src/ConfigModel.cpp
code/sdk/application/wearable/fd230app/nativeui/dialupdate/include/DialUpdateModel.h
code/sdk/application/wearable/fd230app/nativeui/dialupdate/include/DialUpdateView.h
code/sdk/application/wearable/fd230app/nativeui/dialupdate/src/DialUpdateModel.cpp
code/sdk/application/wearable/fd230app/nativeui/dialupdate/src/DialUpdatePresenter.cpp
code/sdk/application/wearable/fd230app/nativeui/dialupdate/src/DialUpdateView.cpp

index e92562c..957f119 100644 (file)
@@ -3,5 +3,6 @@
     "ScreenBrightnessValue": 255,
     "ScreenDurationRadioButtonSlectValue": 1,
     "TradionalBlueToothToggleButtonState": false,
-    "HeartRateOrBloodOxygenQuickAccessSwitch": 0
+    "HeartRateOrBloodOxygenQuickAccessSwitch": 0,
+    "Dial_Id":0
 }
\ No newline at end of file
index 5ae3a10..9979b6c 100644 (file)
@@ -32,6 +32,8 @@ namespace OHOS
         bool GetTradionalBlueToothToggleButtonState(void);
         void SetHeartRateOrBloodOxygenQuickAccessSwitch(void);
         int GetHeartRateOrBloodOxygenQuickAccessSwitch(void);
+        void SetDialId(uint8_t id);
+        int  GetDialId();
         /* -------------------------------------------------------------------------- */
     private:
         ConfigModel();                                        // 私有构造函数,确保无法在外部实例化
@@ -40,7 +42,7 @@ namespace OHOS
         ~ConfigModel();
 
     private:
-        const std::string filePath = "/user/res/ConfigModel/ConfigModel.json";
+        const std::string filePath = "/user/userdata/ConfigModel.json";
         cJSON *cjson_json{nullptr};
         /* ------------------------------- json中要读取的键 ------------------------------- */
         bool RaiseToBrightnessCheckBoxButtonState{false};    // 抬腕按钮状态 ,默认补选中
@@ -48,6 +50,7 @@ namespace OHOS
         unsigned int ScreenDurationRadioButtonSlectValue{1}; // 亮屏时长 ,0对应5秒熄屏,1对应10秒熄屏,2对应15秒熄屏
         bool TradionalBlueToothToggleButtonState{false};     // 用来记录蓝牙开关状态,默认关闭状态
         int HeartRateOrBloodOxygenQuickAccessSwitch{0};      // 心率或血氧快速访问开关,默认快速访问血氧打开
+        int dialid;
         /* -------------------------------------------------------------------------- */
     };
 
index 783635b..e14bad8 100644 (file)
@@ -129,6 +129,18 @@ namespace OHOS
         return HeartRateOrBloodOxygenQuickAccessSwitch;
     }
 
+    void ConfigModel::SetDialId(uint8_t id)
+    {
+        dialid = id;
+        WriteJsonData<int>(GetcJSON(), "Dial_Id", id);
+    }
+
+    int ConfigModel::GetDialId()
+    {
+        dialid = (ReadJsonData<int>(GetcJSON(), "Dial_Id"));
+        return dialid;
+    }
+
     /* ------------------------------ ImageAnimator ----------------------------- */
 
     ImageAnimator::ImageAnimator()
@@ -209,4 +221,5 @@ namespace OHOS
         }
         delete[] imagePaths;
     }
+
 }
\ No newline at end of file
index 0e88ce9..cfe39e2 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef DIALUPDATE_MODEL_H
 #define DIALUPDATE_MODEL_H
 
+#include "config/include/ConfigModel.h"
 #include <string>
 
 #define MAX_DIALNUM 4
@@ -12,7 +13,6 @@ typedef struct
     const char *dialPath;
 } DialInfo;
 
-
 typedef struct
 {
     const char *title;
@@ -21,7 +21,6 @@ typedef struct
     uint32_t imageOffset;
 } DialInfo_1;
 
-
 enum class DialPathType
 {
     DIAL_KUMI = 0,
@@ -51,7 +50,8 @@ namespace OHOS
         DialUpdateModel &operator=(const DialUpdateModel &);
         virtual ~DialUpdateModel();
         std::string dialConfigPath = "user/res/dialupdate/dial_config.json"; // JSON文件路径
-        uint8_t Current_dial = 0;                                            // 目前表盘
+        uint8_t Current_dial;                                                // 目前表盘
+        bool readstaust{false};
     };
 }
 
index deb5415..1cc4aad 100644 (file)
@@ -56,7 +56,7 @@ namespace OHOS
         void SetView();
         void init_button();
         bool HorizontalViewInit(void);
-
+        int GetCurrentPageId();
         
 
     private:
index 958592f..7224e00 100644 (file)
@@ -37,7 +37,7 @@ void read_dial(void)
     {
         while (dirent *ret = readdir(dirp))
         {
-            //WEARABLE_LOGE(WEARABLE_LOG_MODULE_MAIN_SERVICE, "file_name %s \r\n", ret->d_name);
+            // WEARABLE_LOGE(WEARABLE_LOG_MODULE_MAIN_SERVICE, "file_name %s \r\n", ret->d_name);
             if (dialInfo_1[dial_num].dialPath)
             {
                 free((void *)dialInfo_1[dial_num].dialPath);
@@ -82,7 +82,6 @@ void read_dial(void)
             UIFree(data);
         }
     }
-
     // 关闭目录
     closedir(dirp);
 }
@@ -115,9 +114,14 @@ namespace OHOS
      */
     uint8_t DialUpdateModel::GetDialConfigPath()
     {
-        read_dial();
-        // printf_dial();
+        //避免多次访问
+        if (!readstaust)
+        {
+            read_dial();
+            readstaust = true;
+        }
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetDialConfigPath:%d", Current_dial);
+        Current_dial = ConfigModel::GetInstance()->GetDialId();
         return Current_dial;
     }
 
@@ -127,51 +131,11 @@ namespace OHOS
      */
     void DialUpdateModel::UpdateDialConfigPath(uint8_t dialpathid)
     {
-        Current_dial = dialpathid; // 更新表盘Id
-
-        cJSON *root = cJSON_CreateObject();
-        cJSON_AddNumberToObject(root, "Current_dial", Current_dial);
-        FILE *file = fopen(dialConfigPath.c_str(), "w");
-        if (!file)
+        if (dialpathid != Current_dial)
         {
-            WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Failed to UpdateDial JSON file for writing");
-            cJSON_Delete(root);
-            return;
-        }
-        char *jsonString = cJSON_Print(root);
-        fputs(jsonString, file);
-        fclose(file);
-        cJSON_Delete(root);
-        free(jsonString);
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "UpdateDialConfigPath:%d", Current_dial);
-    }
-
-    /**
-     * @brief 从JSON文件中加载表盘配置
-     * @return 加载是否成功
-     */
-    bool DialUpdateModel::LoadDialConfigFromJson()
-    {
-        cJSON *cjson_json = NULL;
-        std::ifstream file(dialConfigPath);
-        if (file.is_open())
-        {
-            std::string json_string((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
-            file.close();
-            // 解析JSON数据
-            cjson_json = cJSON_Parse(json_string.c_str());
-            if (!cjson_json)
-            {
-                WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Failed to parse JSON file");
-                return false;
-            }
-            // 从cJSON对象中提取所需的值
-            Current_dial = cJSON_GetObjectItem(cjson_json, "Current_dial")->valueint;
-            // 删除cJSON对象
-            cJSON_Delete(cjson_json);
+            Current_dial = dialpathid; // 更新表盘Id
+            ConfigModel::GetInstance()->SetDialId(Current_dial);
         }
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LoadDialConfigFromJson:%d", Current_dial);
-        return true;
     }
 
 }
index 6e9a33b..674eaee 100644 (file)
@@ -8,7 +8,6 @@ extern int dial_num;
 namespace OHOS
 {
 
-
     // 当前Presenter属性实例化的内存指针
     static DialUpdatePresenter *g_pDialUpdatePresenter = nullptr;
 
@@ -16,6 +15,7 @@ namespace OHOS
     {
         g_pdialupdatemodel = DialUpdateModel::GetInstance();
         g_pDialUpdatePresenter = this;
+        // showid = DialUpdateModel::GetInstance()->GetDialConfigPath();
     }
 
     DialUpdatePresenter::~DialUpdatePresenter()
@@ -42,95 +42,21 @@ namespace OHOS
 
     bool DialUpdatePresenter::OnDragEnd(UIView &view, const DragEvent &event)
     {
-        if (event.GetDragDirection() == DragEvent::DIRECTION_BOTTOM_TO_TOP)
-        {
-            NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN);
-        }
-        // 右滑
-        if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT)
-        {
-            if (showid == MAX_DIALNUM - 1)
-            {
-                showid = 0;
-            }
-            else
-            {
-                showid++;
-            }
-            DialUpdateView::GetInstance()->SetView();
-            RootView::GetInstance()->Invalidate(); // 刷新界面
-        }
-        // 左滑
-        if (event.GetDragDirection() == DragEvent::DIRECTION_RIGHT_TO_LEFT)
-        {
-            if (showid == 0)
-            {
-                showid = MAX_DIALNUM - 1;
-            }
-            else
-            {
-                showid--;
-            }
-            DialUpdateView::GetInstance()->SetView();
-            RootView::GetInstance()->Invalidate(); // 刷新界面
-        }
-        UNUSED(view);
         return true;
     }
 
     bool DialUpdatePresenter::OnClick(UIView &view, const ClickEvent &event)
     {
-        // 切换表盘按键
-        // if (strcmp(view.GetViewId(), "button_choose") == 0)
-        // {
-        //     // 检查是否需要更新表盘路径
-        //     uint8_t currentid = g_pdialupdatemodel->GetDialConfigPath();
-        //     if (showid != currentid)
-        //     {
-        //         g_pdialupdatemodel->UpdateDialConfigPath(showid);
-        //     }
-        //     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "filepath:%d || currentPath:%d ", showid, currentid);
-        //     NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN, TRANSITION_ZOOM);
-        // }
         // 检查点击的按钮并展示相应的表盘
-        for(int i=0;i<dial_num;i++)
-        {
-            if (strcmp(view.GetViewId(),dialInfo_1[i].title) == 0)
-            {
-                g_pdialupdatemodel->UpdateDialConfigPath(i);
-                NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN, TRANSITION_ZOOM);
-                break;
-            }
-       
-        // {
-        }
-        if (strcmp(view.GetViewId(), "button_right") == 0)
-        {
-            if (showid == MAX_DIALNUM - 1)
-            {
-                showid = 0;
-            }
-            else
-            {
-                showid++;
-            }
-            DialUpdateView::GetInstance()->SetView();
-            RootView::GetInstance()->Invalidate(); // 刷新界面
-        }
-        else if (strcmp(view.GetViewId(), "button_left") == 0)
+        uint8_t showid = DialUpdateView::GetInstance()->GetCurrentPageId();
+        const char *viewid = view.GetViewId();
+        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "showid %s -- viewid %s", dialInfo_1[showid].title, viewid);
+        if (strcmp(viewid, dialInfo_1[showid].title) == 0)
         {
-            if (showid == 0)
-            {
-                showid = MAX_DIALNUM - 1;
-            }
-            else
-            {
-                showid--;
-            }
-            DialUpdateView::GetInstance()->SetView();
-            RootView::GetInstance()->Invalidate(); // 刷新界面
+            g_pdialupdatemodel->UpdateDialConfigPath(showid);
+            NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN, TRANSITION_ZOOM);
         }
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "showid:%d ", showid, showid);
+        // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "showid %s -- viewid %s", dialInfo_1[showid].title, viewid);
         return true;
     }
 
index 08a57d7..2ba4f1c 100644 (file)
@@ -70,176 +70,37 @@ namespace OHOS
 
     void DialUpdateView::TestPicker()
     {
-        // /* -------------------------------- 加载展示表盘信息 -------------------------------- */
-        // labelStr = dialInfo[dialId].title;
-        // dialpath = dialInfo[dialId].thumbnailPath;
-        // if (labelStr.empty() || dialpath.empty())
-        // {
-        //     WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DialInfo is error!");
-        //     return;
-        // }
-        // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TestPicker");
-        // if (container_ == nullptr)
-        // {
-        //     container_ = new UICardPage();
-        //     container_->SetPosition(0, 0, 466, 466);
-        //     container_->SetStyle(STYLE_BACKGROUND_OPA, 0);
-        // }
-        // /* -------------------------------------------------------------------------- */
-        // // Add Label to App
-        // if (label1_ == nullptr)
-        // {
-        //     label1_ = new UILabel();
-        // }
-        // label1_->SetPosition(181, 50);     // widget's left position and top position
-        // label1_->Resize(200, 60);          // widget's width and height
-        // label1_->SetViewId("label_title"); // Set style
-        // label1_->SetStyle(STYLE_TEXT_FONT, 26);
-        // // Set additional property
-        // label1_->SetText(labelStr.c_str());
-        // label1_->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT);
-        // label1_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
-        // label1_->SetRollSpeed(0);
-        // label1_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 26);
-
-        // // Add to rootView
-        // container_->Add(label1_);
-        // label1_->SetVisible(true);
-        // // Add ImageView to App
-        // if (image1_ == nullptr)
-        // {
-        //     image1_ = new UIImageView();
-        // }
-        // image1_->SetPosition(103, 103); // widget's left position and top position
-        // image1_->Resize(100, 100);      // widget's width and height
-        // image1_->SetViewId("image1");   // Set style
-        // // Set additional property
-        // image1_->SetSrc(dialpath.c_str());
-        // // Add to rootView
-        // container_->Add(image1_);
-        // image1_->SetVisible(true);
-
-        // // Add Button to App
-        // if (button3_ == nullptr)
-        // {
-        //     button3_ = new UIButton();
-        // }
-        // button3_->SetPosition(103, 103);      // widget's left position and top position
-        // button3_->Resize(260, 260);           // widget's width and height
-        // button3_->SetViewId("button_choose"); // Set style
-        // button3_->SetStyle(STYLE_BACKGROUND_COLOR, 0xff000000);
-        // button3_->SetStyle(STYLE_BACKGROUND_OPA, 0x00);
-
-        // // Set additional property
-        // button3_->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xffffffff, UIButton::PRESSED);
-        // button3_->SetStyleForState(STYLE_BACKGROUND_OPA, 0x00, UIButton::PRESSED);
-        // button3_->SetStyleForState(STYLE_BORDER_COLOR, 0xfffafafa, UIButton::PRESSED);
-        // button3_->SetStyleForState(STYLE_BORDER_OPA, 0x00, UIButton::PRESSED);
-
-        // // Add the CallBack about events
-        // UIView::OnClickListener *button3Click = static_cast<UIView::OnClickListener *>(DialUpdatePresenter::GetInstance());
-        // button3_->SetOnClickListener(button3Click);
-        // // Add to rootView
-        // container_->Add(button3_);
-        // button3_->SetVisible(true);
-
-        // // Add Button to App
-        // if (button1_ == nullptr)
-        // {
-        //     button1_ = new UIButton();
-        // }
-        // button1_->SetPosition(402, 208);     // widget's left position and top position
-        // button1_->Resize(23, 50);            // widget's width and height
-        // button1_->SetViewId("button_right"); // Set style
-        // button1_->SetStyle(STYLE_BACKGROUND_COLOR, 0xff000000);
-        // button1_->SetStyle(STYLE_BACKGROUND_OPA, 0x00);
-
-        // // Set additional property
-        // char *button1defaultImgSrc = "/user/res/dialupdate/right_boutton.bin";
-
-        // char *button1triggeredImgSrc = nullptr;
-        // button1_->SetImageSrc(button1defaultImgSrc, button1triggeredImgSrc);
-        // button1_->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);
-
-        // // Add the CallBack about events
-        // UIView::OnClickListener *button1Click = static_cast<UIView::OnClickListener *>(DialUpdatePresenter::GetInstance());
-        // button1_->SetOnClickListener(button1Click);
-        // // Add to rootView
-        // container_->Add(button1_);
-        // button1_->SetVisible(true);
-
-        // // Add Button to App
-        // if (button2_ == nullptr)
-        // {
-        //     button2_ = new UIButton();
-        // }
-        // button2_->SetPosition(40, 208);     // widget's left position and top position
-        // button2_->Resize(23, 50);           // widget's width and height
-        // button2_->SetViewId("button_left"); // Set style
-        // button2_->SetStyle(STYLE_BACKGROUND_COLOR, 0xff000000);
-        // button2_->SetStyle(STYLE_BACKGROUND_OPA, 0x00);
-
-        // // Set additional property
-        // char *button2defaultImgSrc = "/user/res/dialupdate/left_boutton.bin";
-
-        // char *button2triggeredImgSrc = nullptr;
-        // button2_->SetImageSrc(button2defaultImgSrc, button2triggeredImgSrc);
-        // button2_->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED);
-
-        // // Add the CallBack about events
-        // UIView::OnClickListener *button2Click = static_cast<UIView::OnClickListener *>(DialUpdatePresenter::GetInstance());
-        // button2_->SetOnClickListener(button2Click);
-        // // Add to rootView
-        // container_->Add(button2_);
-        // button2_->SetVisible(true);
     }
-
+    int DialUpdateView::GetCurrentPageId()
+    {
+        return container_->GetCurrentPage();
+    }
     void DialUpdateView::init_button()
     {
-        // read_dial();
-        // printf_dial(); // dial_num
-        uint8_t fileid = DialUpdateModel::GetInstance()->GetDialConfigPath();
-        for (int i = fileid; i < dial_num + fileid; i++)
+        for (int i = 0; i < dial_num; i++)
         {
-            Button[i % dial_num] = new UILabelButtonExt();
+            Button[i] = new UILabelButtonExt();
             if (Button == nullptr)
             {
                 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::SystemUpgradeButtonExt new fail!");
             }
-            Button[i % dial_num]->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetWidth());
-            Button[i % dial_num]->SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full);
-            Button[i % dial_num]->SetImagePosition(103, 103);
-            Button[i % dial_num]->SetViewId(dialInfo_1[i % dial_num].title);
-            //     uint32_t resId=5|( 0xfef << 20);
-            //     //uint32_t resId=1|( 0xfef << 20);
-            //     //ImageInfo* image = ImageCacheManager::GetInstance().LoadOneInMultiRes((uint8_t*)dialInfo_1[i].dialPath,resId);
-            //     // std::string str="user/res/dials/KUMI.bin";
-            //     // FILE * fp = fopen(dialInfo_1[i].dialPath, "rb");
-            //     // if (fp == nullptr)
-            //     // {
-            //     //     return;
-            //     // }
-            // //       ImageInfo* LoadOneInMultiRes(uint32_t resId, const std::string& file, FILE* userFP = nullptr,
-            // // bool isLongTerm = false, int offset = 0);
-            //     ImageInfo* image = ImageCacheManager::GetInstance().LoadOneInMultiRes(resId,dialInfo_1[i].thumbnailPath);//,fp,false,dialInfo_1[i].imageOffset);//dialInfo_1[i].dialPath);
-            //     if (image == nullptr) {
-            //         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "LoadAppImages %x  %s  fail", resId,dialInfo_1[1].thumbnailPath);
-            //        // return ;
-            //     }
-            // view->SetSrc(image);
-
-            // Button[i]->SetImageSrc(dialInfo_1[i].dialPath,dialInfo_1[i].dialPath);
-            Button[i % dial_num]->SetImageSrc(dialInfo_1[i % dial_num].thumbnailPath, dialInfo_1[i % dial_num].thumbnailPath);
-            Button[i % dial_num]->SetText(dialInfo_1[i % dial_num].title);
-            Button[i % dial_num]->SetAlign(TEXT_ALIGNMENT_CENTER);
-            Button[i % dial_num]->SetLabelPosition(0, -380);
-            Button[i % dial_num]->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
-            Button[i % dial_num]->SetStyleForState(STYLE_BORDER_COLOR, Color::Black().full, UIButton::PRESSED);
-            Button[i % dial_num]->SetStyleForState(STYLE_BACKGROUND_COLOR, Color::Black().full, UIButton::PRESSED);
+            Button[i]->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetWidth());
+            Button[i]->SetStyle(STYLE_BACKGROUND_COLOR, Color::Black().full);
+            Button[i]->SetImagePosition(103, 103);
+            Button[i]->SetViewId(dialInfo_1[i].title);
+
+            Button[i]->SetImageSrc(dialInfo_1[i].thumbnailPath, dialInfo_1[i].thumbnailPath);
+            Button[i]->SetText(dialInfo_1[i].title);
+            Button[i]->SetAlign(TEXT_ALIGNMENT_CENTER);
+            Button[i]->SetLabelPosition(0, -380);
+            Button[i]->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+            Button[i]->SetStyleForState(STYLE_BORDER_COLOR, Color::Black().full, UIButton::PRESSED);
+            Button[i]->SetStyleForState(STYLE_BACKGROUND_COLOR, Color::Black().full, UIButton::PRESSED);
             UIView::OnClickListener *buttonClick = static_cast<UIView::OnClickListener *>(DialUpdatePresenter::GetInstance());
-            Button[i % dial_num]->SetOnClickListener(buttonClick);
-            // button2_->SetOnClickListener(button2Click);
-            container_->Add(Button[i % dial_num]);
+            UIView::OnDragListener *buttondarg = static_cast<UIView::OnDragListener *>(DialUpdatePresenter::GetInstance());
+            Button[i]->SetOnClickListener(buttonClick);
+            Button[i]->SetOnDragListener(buttondarg);
+            container_->Add(Button[i]);
         }
     }
     UICardPage *cade[10] = {nullptr};
@@ -261,14 +122,12 @@ namespace OHOS
             container_->SetReboundSize(200); // 200: rebound size
             container_->SetElastic(true);
         }
-
         init_button();
-
         RootView::GetInstance()->Add(container_);
-
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "mainSwipeGroup new fail");
-
-        // container_->RegisterSwipeCallback(callback);
+        /* --------------------------------- 设置为当前表盘 -------------------------------- */
+        uint8_t fileid = DialUpdateModel::GetInstance()->GetDialConfigPath();
+        container_->SetCurrentPage(fileid);
+        container_->SetLoopState(true);
     }
     void DialUpdateView::OnSetUpView()
     {