From d34f8b631af2a1c887e5234ee649951bb146830b Mon Sep 17 00:00:00 2001 From: cheng Date: Sat, 7 Sep 2024 17:42:54 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=9D=E5=AD=98=E6=89=8B=E7=94=B5=E7=AD=92?= =?utf8?q?=E8=AE=BE=E7=BD=AE=E7=9A=84=E4=BF=A1=E6=81=AF=EF=BC=9B=E6=89=8B?= =?utf8?q?=E7=94=B5=E7=AD=92=E8=87=AA=E5=AE=9A=E4=B9=89=E9=A2=9C=E8=89=B2?= =?utf8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E8=BF=98=E9=9C=80=E8=A6=81=E5=AE=9E?= =?utf8?q?=E7=8E=B0=E4=B8=A4=E4=B8=AA=E6=A0=B8=E5=BF=83=E6=8E=A5=E5=8F=A3?= =?utf8?q?=EF=BC=9A=E9=80=9A=E8=BF=87=E5=9D=90=E6=A0=87=E8=8E=B7=E5=8F=96?= =?utf8?q?=E5=AF=B9=E5=BA=94=E9=A2=9C=E8=89=B2=E5=80=BC(GetValueByColorCus?= =?utf8?q?tomSelectedImage)=E3=80=81=E9=80=9A=E8=BF=87=E9=A2=9C=E8=89=B2?= =?utf8?q?=E5=80=BC=E8=8E=B7=E5=8F=96=E5=AF=B9=E5=BA=94=E5=9D=90=E6=A0=87(?= =?utf8?q?GetPointByColorCustomSelectedImage)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../flashlight/include/FlashlightModel.h | 3 +- .../flashlight/include/FlashlightPresenter.h | 2 + .../flashlight/include/FlashlightView.h | 9 +- .../flashlight/src/FlashlightModel.cpp | 56 ++++----- .../flashlight/src/FlashlightPresenter.cpp | 27 +++-- .../flashlight/src/FlashlightView.cpp | 107 ++++++++++++++++-- .../user/res/flashlight/color_custom_bg.bin | 3 + .../res/flashlight/color_custom_selected.bin | 3 + .../peripheral/config/include/ConfigModel.h | 15 +++ .../peripheral/config/src/ConfigModel.cpp | 16 +++ 10 files changed, 187 insertions(+), 54 deletions(-) create mode 100644 code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/flashlight/color_custom_bg.bin create mode 100644 code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/flashlight/color_custom_selected.bin diff --git a/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightModel.h b/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightModel.h index abce5c0f5..650c84a34 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightModel.h +++ b/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightModel.h @@ -17,6 +17,7 @@ namespace OHOS public: static FlashlightModel &GetInstance(void); + void SaveSettingInfo(void); uint8_t GetColorIndex(void); void SetColorIndex(uint8_t value); int64_t GetColorValue(void); @@ -26,8 +27,6 @@ namespace OHOS void FlashlightStartTimer(void); void FlashlightStopTimer(void); - void FlashlightPauseTimer(void); - void FlashlightResumeTimer(uint32_t interval); private: FlashlightModel(); diff --git a/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightPresenter.h b/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightPresenter.h index d272d02ac..9927f858d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightPresenter.h +++ b/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightPresenter.h @@ -23,6 +23,8 @@ namespace OHOS #define Flashlight_ViewId_GroupColorCustom_ "Flashlight_ViewId_GroupColorCustom_" #define Flashlight_ViewId_ScrollFlashingSetting_ "Flashlight_ViewId_ScrollFlashingSetting_" + #define Flashlight_ViewId_ImageColorCustomBackground_ "Flashlight_ViewId_ImageColorCustomBackground_" + #define FLASHING_SETTING_ITEM_COUNT (3) constexpr char * Flashlight_ViewId_FlashingSettingItem_[FLASHING_SETTING_ITEM_COUNT] = { diff --git a/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightView.h b/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightView.h index 9a51b0001..00e53d148 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/flashlight/include/FlashlightView.h @@ -42,6 +42,8 @@ namespace OHOS void DisplayColorCustomScreen(); void DisplayFlashingSettingScreen(); + void GetValueByColorCustomSelectedImage(int16_t x, int16_t y, int64_t * value); + void GetPointByColorCustomSelectedImage(int16_t * x, int16_t * y, int64_t value); void UpdateViewMainScreenFlashing(bool flag); typedef enum @@ -98,8 +100,10 @@ namespace OHOS void DeinitColorCustomData(); // UIViewGroup * InitColorCustomData(); + // void UpdateColorCustomSelectedImage(int16_t x, int16_t y); UIViewGroup * GroupColorCustom_{nullptr}; - UIImageView * ImageColorCustom_{nullptr}; + UIImageView * ImageColorCustomBackground_{nullptr}; + UIImageView * ImageColorCustomSelected_{nullptr}; void DeinitFlashingSettingData(); // UIScrollView * InitFlashingSettingData(); @@ -132,6 +136,9 @@ namespace OHOS "/user/res/flashlight/color_4.bin", "/user/res/flashlight/color_5.bin", }; + + #define COLOR_CUSTOM_BACKGROUND_IMAGE "/user/res/flashlight/color_custom_bg.bin" + #define COLOR_CUSTOM_SELECTED_IMAGE "/user/res/flashlight/color_custom_selected.bin" }; } #endif \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightModel.cpp index 3b894aee3..ce84eae92 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightModel.cpp @@ -5,6 +5,7 @@ #include "wearable_log.h" #include "flashlight/include/FlashlightModel.h" #include "flashlight/include/FlashlightPresenter.h" +#include "ConfigModel.h" namespace OHOS { @@ -12,7 +13,11 @@ namespace OHOS static bool switch_flag = false; - FlashlightModel::FlashlightModel() {} + FlashlightModel::FlashlightModel() + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[@CHENG][%d]:", __LINE__); + OHOS::ConfigModel::GetInstance()->GetFlashLightConfigData(&ColorIndex_, &ColorValue_, &FlashingLevel_); + } FlashlightModel::~FlashlightModel() {} @@ -22,6 +27,11 @@ namespace OHOS return instance; } + void FlashlightModel::SaveSettingInfo(void) + { + OHOS::ConfigModel::GetInstance()->SetFlashLightConfigData(ColorIndex_, ColorValue_, FlashingLevel_); + } + uint8_t FlashlightModel::GetColorIndex(void) { return ColorIndex_; @@ -140,52 +150,24 @@ namespace OHOS */ void FlashlightModel::FlashlightStopTimer(void) { - // 检查定时器是否存在 - if (g_timer != NULL) - { - // 删除定时器并置为 NULL - osStatus_t ret = osTimerDelete(g_timer); - if (ret != osOK) - { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScanTimerCallback osTimerDelete failed, ret = %lx!!", ret); - } - g_timer = NULL; - } - } - /* - * @brief 暂停定时器 - */ - void FlashlightModel::FlashlightPauseTimer(void) - { - // 检查定时器是否存在 if (g_timer != NULL) { - // 暂停定时器,但不删除它 - osStatus_t ret = osTimerStop(g_timer); + osStatus_t ret = osOK; + ret = osTimerStop(g_timer); if (ret != osOK) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "FlashlightPauseTimer osTimerStop failed, ret = %lx!!", ret); + return; } - } - } - - /* - * @brief 恢复定时器 - */ - void FlashlightModel::FlashlightResumeTimer(uint32_t interval) - { - // 检查定时器是否存在 - if (g_timer != NULL) - { - int tick = osMs2Tick(interval); - // 恢复定时器 - osStatus_t ret = osTimerStart(g_timer, tick); + // 删除定时器并置为 NULL + ret = osTimerDelete(g_timer); if (ret != osOK) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "FlashlightResumeTimer osTimerStart failed, ret = %lx!!", ret); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ScanTimerCallback osTimerDelete failed, ret = %lx!!", ret); + return; } + g_timer = NULL; } } - } \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightPresenter.cpp index 96b22f41a..dfef7f285 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightPresenter.cpp @@ -66,11 +66,12 @@ namespace OHOS ScreenAlwaysOnCtr(CANCEL_SCREEN_ALWAYS_ON); FlashlightModel::GetInstance().FlashlightStopTimer(); + FlashlightModel::GetInstance().SaveSettingInfo(); } bool FlashlightPresenter::OnDrag(UIView &view, const DragEvent &event) { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "DnotDisturbPresenter::OnDrag"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "FlashlightPresenter::OnDrag"); UNUSED(view); if ((event.GetDeltaX() > X_DRAG_OFFSET) && (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) // 拖动过程中判断是否是水平滑动 { @@ -81,7 +82,7 @@ namespace OHOS bool FlashlightPresenter::OnDragEnd(UIView &view, const DragEvent &event) { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "DnotDisturbPresenter::OnDragEnd"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "FlashlightPresenter::OnDragEnd"); UNUSED(view); if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT && FlashlightPresenter::X_DRAG_FLAG) { @@ -109,7 +110,7 @@ namespace OHOS bool FlashlightPresenter::OnClick(UIView &view, const ClickEvent &event) { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "DnotDisturbPresenter::OnClick"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "FlashlightPresenter::OnClick"); UNUSED(event); if(0 == strcmp(Flashlight_ViewId_ImageColorSetting_, view.GetViewId())) @@ -129,8 +130,6 @@ namespace OHOS if(0 == strcmp(Flashlight_ViewId_FlashingSettingItem_[i], view.GetViewId())) { FlashlightModel::GetInstance().SetFlashingLevel(i); - // view_->UpdateFlashingSettingItem(); - // view_->DisplayFlashingSettingScreen(); view_->DisplayViewMainScreen(); return true; } @@ -140,7 +139,7 @@ namespace OHOS { if(0 == strcmp(Flashlight_ViewId_ImageColorSettingItem_[COLOR_SETTING_ITEM_COUNT - 1], view.GetViewId())) { - FlashlightModel::GetInstance().SetColorIndex(i); + FlashlightModel::GetInstance().SetColorIndex(COLOR_SETTING_ITEM_COUNT - 1); view_->DisplayColorCustomScreen(); return true; } @@ -154,13 +153,27 @@ namespace OHOS } } + if(0 == strcmp(Flashlight_ViewId_ImageColorCustomBackground_, view.GetViewId())) + { + Point point = event.GetCurrentPos(); + int64_t value = -1; + view_->GetValueByColorCustomSelectedImage(point.x, point.y, &value); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "FlashlightPresenter::OnClick.value=%d", value); + if(0 > value) + return false; + + FlashlightModel::GetInstance().SetColorValue(value); + view_->DisplayViewMainScreen(); + return true; + } + return true; } // 增加按键事件 bool FlashlightPresenter::OnKeyAct(UIView &view, const KeyEvent &event) { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "DnotDisturbPresenter::OnKeyAct"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "FlashlightPresenter::OnKeyAct"); uint16_t keyID = event.GetKeyId(); uint16_t keyState = event.GetState(); // 如果是power键就返回上一级 diff --git a/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightView.cpp b/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightView.cpp index e317e85ef..885f26fc7 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/flashlight/src/FlashlightView.cpp @@ -10,6 +10,7 @@ #include "ui_resource_string.h" #include "UiConfig.h" #include "custom_utils.h" +#include "common/image_cache_manager.h" namespace OHOS { @@ -500,10 +501,17 @@ namespace OHOS delete GroupColorCustom_; GroupColorCustom_ = nullptr; - if(nullptr != ImageColorCustom_) + if(nullptr != ImageColorCustomBackground_) { - delete ImageColorCustom_; - ImageColorCustom_ = nullptr; + ImageCacheManager::GetInstance().UnloadSingleRes(COLOR_CUSTOM_BACKGROUND_IMAGE); + + delete ImageColorCustomBackground_; + ImageColorCustomBackground_ = nullptr; + } + if(nullptr != ImageColorCustomSelected_) + { + delete ImageColorCustomSelected_; + ImageColorCustomSelected_ = nullptr; } } } @@ -524,13 +532,35 @@ namespace OHOS GroupColorCustom_->SetDraggable(true); GroupColorCustom_->SetOnDragListener(presenter_); - if(nullptr == ImageColorCustom_) + if(nullptr == ImageColorCustomBackground_) { - ImageColorCustom_ = new UIImageView; - if(nullptr == ImageColorCustom_) + ImageColorCustomBackground_ = new UIImageView; + if(nullptr == ImageColorCustomBackground_) return nullptr; - ImageColorCustom_->SetPosition(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + ImageColorCustomBackground_->SetViewId(Flashlight_ViewId_ImageColorCustomBackground_); + ImageColorCustomBackground_->SetPosition(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + ImageInfo* info = ImageCacheManager::GetInstance().LoadSingleRes(COLOR_CUSTOM_BACKGROUND_IMAGE); + ImageColorCustomBackground_->SetSrc(info); + ImageColorCustomBackground_->SetTouchable(true); + ImageColorCustomBackground_->SetOnClickListener(presenter_); + + GroupColorCustom_->Add(ImageColorCustomBackground_); + } + if(nullptr == ImageColorCustomSelected_) + { + ImageColorCustomSelected_ = new UIImageView(); + if(nullptr == ImageColorCustomSelected_) + return nullptr; + + int16_t x = -1; + int16_t y = -1; + int64_t value = presenter_->GetColorValue(); + GetPointByColorCustomSelectedImage(&x, &y, value); + ImageColorCustomSelected_->SetPosition(x, y, 70, 70); + ImageColorCustomSelected_->SetSrc(COLOR_CUSTOM_SELECTED_IMAGE); + + GroupColorCustom_->Add(ImageColorCustomSelected_); } container_->Add(GroupColorCustom_); @@ -539,6 +569,69 @@ namespace OHOS return GroupColorCustom_; } + void FlashlightView::GetValueByColorCustomSelectedImage(int16_t x, int16_t y, int64_t * value) + { + * value = -1; + + if(nullptr == ImageColorCustomSelected_) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[@CHENG][%d]", __LINE__); + return ; + } + if(nullptr == ImageColorCustomBackground_) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[@CHENG][%d]", __LINE__); + return ; + } + const ImageInfo * info = ImageColorCustomBackground_->GetImageInfo(); + if(nullptr == info) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[@CHENG][%d]", __LINE__); + return ; + } +// +// +// +// 待实现功能 +// 获得 (x,y) 处的颜色值 +// 赋值给 value +// +// +// + } + + void FlashlightView::GetPointByColorCustomSelectedImage(int16_t * x, int16_t * y, int64_t value) + { + * x = -1; + * y = -1; + + if(nullptr == ImageColorCustomSelected_) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[@CHENG][%d]", __LINE__); + return ; + } + if(nullptr == ImageColorCustomBackground_) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[@CHENG][%d]", __LINE__); + return ; + } + const ImageInfo * info = ImageColorCustomBackground_->GetImageInfo(); + if(nullptr == info) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[@CHENG][%d]", __LINE__); + return ; + } +// +// +// +// 待实现功能 +// 根据给定的颜色值 +// 获得对应的 (x,y)值 +// +// +// + } + void FlashlightView::DeinitFlashingSettingData() { if(nullptr != ScrollFlashingSetting_) diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/flashlight/color_custom_bg.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/flashlight/color_custom_bg.bin new file mode 100644 index 000000000..59e1c5ad6 --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/flashlight/color_custom_bg.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50e7503c027d75d76a2e75b6cc072d99c905fe85aeb41181ae711b5aa9183599 +size 146040 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/flashlight/color_custom_selected.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/flashlight/color_custom_selected.bin new file mode 100644 index 000000000..dc3d0008a --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/flashlight/color_custom_selected.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7afdeb79c87a94eb6f14864cfccff79b9473435206577eb4218c7cb5106ba4f +size 3480 diff --git a/code/sdk/drivers/peripheral/config/include/ConfigModel.h b/code/sdk/drivers/peripheral/config/include/ConfigModel.h index 162c261b0..60d9723b1 100644 --- a/code/sdk/drivers/peripheral/config/include/ConfigModel.h +++ b/code/sdk/drivers/peripheral/config/include/ConfigModel.h @@ -131,6 +131,12 @@ namespace OHOS CONFIGMODEL_ITEM_APPLIST_STYLE,//applist的显示样式 CONFIGMODEL_ITEM_BLE_IOS_OR_ANDROID,//绑定设备为安卓或者ios 0:安卓 1:苹果 CONFIGMODEL_ITEM_BR_PAIR,//br第一次绑定 + + // flashlight + CONFIGMODEL_ITEM_FLASHLIGHT_COLOR_INDEX, // color index + CONFIGMODEL_ITEM_FLASHLIGHT_COLOR_VALUE, // color value + CONFIGMODEL_ITEM_FLASHLIGHT_FLASHING_LEVEL, // flashing level + CONFIGMODEL_ITEM_MAX, @@ -277,6 +283,11 @@ namespace OHOS /* ---------------------------- 设置OpenAI APIKeys ---------------------------- */ void SetOpenAIAPIKeys(const char * value); std::string GetOpenAIAPIKeys(void); + + // flash light config data + void GetFlashLightConfigData(uint8_t * ColorIndex, int64_t * ColorValue, uint8_t * FlashingLevel); + void SetFlashLightConfigData(uint8_t ColorIndex, int64_t ColorValue, uint8_t FlashingLevel); + /* --------------------------------- 用户配置信息 --------------------------------- */ void SetUserAge(int age); int GetUserAge(); @@ -377,6 +388,10 @@ namespace OHOS {ConfigDataType::DATATYPE_STRING, "applist_style", "list" }, //CONFIGMODEL_ITEM_APPLIST_STYLE {ConfigDataType::DATATYPE_INT, "android_or_ios", "0" },//CONFIGMODEL_ITEM_BLE_IOS_OR_ANDROID {ConfigDataType::DATATYPE_INT, "br_pari" , "0"}, + {ConfigDataType::DATATYPE_INT, "color_index", "0" }, // CONFIGMODEL_ITEM_FLASHLIGHT_COLOR_INDEX, // color index + {ConfigDataType::DATATYPE_INT, "color_value", "0" }, // CONFIGMODEL_ITEM_FLASHLIGHT_COLOR_VALUE, // color value + {ConfigDataType::DATATYPE_INT, "flashing_level", "0" }, // CONFIGMODEL_ITEM_FLASHLIGHT_FLASHING_LEVEL, // flashing level + }; ConfigModel(); // 私有构造函数,确保无法在外部实例化 ConfigModel(const ConfigModel &) = delete; // 禁止拷贝构造 diff --git a/code/sdk/drivers/peripheral/config/src/ConfigModel.cpp b/code/sdk/drivers/peripheral/config/src/ConfigModel.cpp index 7cd60976e..f1eeac91e 100644 --- a/code/sdk/drivers/peripheral/config/src/ConfigModel.cpp +++ b/code/sdk/drivers/peripheral/config/src/ConfigModel.cpp @@ -1169,6 +1169,22 @@ namespace OHOS { return get_configData_string(CONFIGMODEL_ITEM_OPEN_AI_API_KEYS); } + + // flash light config data + void ConfigModel::GetFlashLightConfigData(uint8_t * ColorIndex, int64_t * ColorValue, uint8_t * FlashingLevel) + { + * ColorIndex = get_configData_int(CONFIGMODEL_ITEM_FLASHLIGHT_COLOR_INDEX); + * ColorValue = get_configData_int(CONFIGMODEL_ITEM_FLASHLIGHT_COLOR_VALUE); + * FlashingLevel = get_configData_int(CONFIGMODEL_ITEM_FLASHLIGHT_FLASHING_LEVEL); + } + + void ConfigModel::SetFlashLightConfigData(uint8_t ColorIndex, int64_t ColorValue, uint8_t FlashingLevel) + { + set_condigData_Int(CONFIGMODEL_ITEM_FLASHLIGHT_COLOR_INDEX, ColorIndex); + set_condigData_Int(CONFIGMODEL_ITEM_FLASHLIGHT_COLOR_VALUE, ColorValue); + set_condigData_Int(CONFIGMODEL_ITEM_FLASHLIGHT_FLASHING_LEVEL, FlashingLevel); + } + /* -------------------------------------------------------------------------- */ /*设置用户年龄[后续使用结构体统一配置]*/ void ConfigModel::SetUserAge(int age) -- 2.17.1