From: luozheng <1732036298@qq.com> Date: Thu, 31 Jul 2025 07:41:03 +0000 (+0800) Subject: 添加xts编译下的宏控制 X-Git-Tag: leiniao_debug_1.0.0_20250922_020716~208 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=674bc8df43a3c7ae192c6fe2cbc19414e580b422;p=mirrors%2FFD230.git 添加xts编译下的宏控制 --- diff --git a/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-xts/libuikit_fwk.a b/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-xts/libuikit_fwk.a index b1ab9d2d0..e3ce469ad 100644 Binary files a/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-xts/libuikit_fwk.a and b/code/sdk/application/wearable/fd230/nativeapp/brandy-native-js-xts/libuikit_fwk.a differ diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp index ba3a83e2a..82ac589b9 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativelauncher/src/NativeLauncher.cpp @@ -48,7 +48,9 @@ #include "takephotos/include/TakephotosModel.h" #include "message/include/MessageModel.h" #include "assistant/include/AssistantModel.h" +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif #include "main/include/dial/DialModelCharge.h" #include "schedule/include/ScheduleModel.h" #include "sleep/include/SleepModel.h" @@ -134,12 +136,14 @@ void NativeLauncher::InitNativeLauncher(LaunchMode mode) RebootAndShutdownModel::GetInstance().RegisterAllKeyEvents(); // 开机检测充电状态 + #ifdef SUPPORT_BATTERY_SERVICE WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "get_charge_stat is %d", get_charge_stat()); if (get_charge_stat()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Power is Charging!"); DialModelCharge::GetInstance()->UpdatechargeStatus(1); } + #endif /*开机读取天气历史数据*/ C_ScheduleDataReadFromFile(); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/applist/src/ApplistPresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/applist/src/ApplistPresenter.cpp index 8071cb651..38e4924ba 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/applist/src/ApplistPresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/applist/src/ApplistPresenter.cpp @@ -14,7 +14,9 @@ #include "NativeRegisterManager.h" #include "health/health_service/health_service.h" +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif #include "ConfigModelC.h" #include "ConfigModel.h" #include @@ -145,7 +147,10 @@ REGIST_SLICE(VIEW_APPLIST, ApplistView, ApplistPresenter); if (viewId < VIEW_MAX_INTER_APP) { /*心率Slice需要增加特殊配置*/ - bool isCharging = get_charge_stat(); // 获取充电状态 + bool isCharging = false; + #ifdef SUPPORT_BATTERY_SERVICE + isCharging = get_charge_stat(); // 获取充电状态 + #endif if (isCharging && viewId == VIEW_HEART_CHART) { HealthState highHealthState; diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodOxygenModel.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodOxygenModel.cpp index 2e117ceb3..c0c0f814d 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodOxygenModel.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodOxygenModel.cpp @@ -18,7 +18,9 @@ #include "ConfigModel.h" #include "main/include/MainViewSample.h" #include "NativeAbility.h" +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif #include "health/BloodCardView.h" #include @@ -63,8 +65,8 @@ void BloodOxygenModel::ClearDisplayData() { void BloodOxygenModel::Blood_Control(BloodState state) { if (state == BloodState::End && startspo2 == true) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "startspo2 End"); - uint16_t md = PPG_SERVICE_CMD_TYPE_STOP_SPO2_TEST; #ifdef SUPPORT_PPG_SERVICE + uint16_t md = PPG_SERVICE_CMD_TYPE_STOP_SPO2_TEST; send_ppg_cmd_msg(md); #endif startspo2 = false; @@ -74,14 +76,17 @@ void BloodOxygenModel::Blood_Control(BloodState state) { blood_stop_data_timer(); } else if (state == BloodState::Start && startspo2 == false) { /*充电状态下不进行检测*/ - bool isCharging = get_charge_stat(); // 获取充电状态 + bool isCharging =false; + #ifdef SUPPORT_BATTERY_SERVICE + isCharging = get_charge_stat(); // 获取充电状态 + #endif if (isCharging) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "充电不能检测"); return; } WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "startspo2 Start"); - uint16_t md = PPG_SERVICE_CMD_TYPE_DO_SPO2_TEST; #ifdef SUPPORT_PPG_SERVICE + uint16_t md = PPG_SERVICE_CMD_TYPE_DO_SPO2_TEST; send_ppg_cmd_msg(md); #endif startspo2 = true; diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodResultPresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodResultPresenter.cpp index 740740618..d27e9ca5d 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodResultPresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodResultPresenter.cpp @@ -44,7 +44,9 @@ #include "cywee_service.h" #endif +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif #include "health/health_service/health_service.h" @@ -140,7 +142,11 @@ namespace OHOS if (strcmp(view.GetViewId(), CLICK_BLOOD) == 0) { // 如果正在充电进入提醒界面 - if (get_charge_stat()) + bool isCharging = false; + #ifdef SUPPORT_BATTERY_SERVICE + isCharging = get_charge_stat(); + #endif + if (isCharging) { HealthState highHealthState; highHealthState.checkType = CHARGE; diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/clock/src/MainClockView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/clock/src/MainClockView.cpp index f361413e7..0f8b47ae9 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/clock/src/MainClockView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/clock/src/MainClockView.cpp @@ -15,7 +15,6 @@ #include "main/include/MainModel.h" #include "main/include/MainPresenterSample.h" #include "set_dial/include/SetDialModel.h" -#include "battery_hal.h" #include "common/image_cache_manager.h" #include "components/ui_label.h" #include "custom_runtime.h" @@ -35,9 +34,10 @@ #include #include #include - - #include "battery_hal.h" - extern uint8_t battery_get_voltage(float *voltage); +#ifdef SUPPORT_BATTERY_SERVICE +#include "battery_hal.h" +extern uint8_t battery_get_voltage(float *voltage); +#endif #define TIMEVIEW_UP 0 #define TIMEVIEW_DOWN 1 @@ -579,8 +579,11 @@ UpdateBatteryColor(); - float voltage = 0.0F; - int power = battery_get_voltage(&voltage); + float voltage = 0.0F; + int power = 0; + #ifdef SUPPORT_BATTERY_SERVICE + power = battery_get_voltage(&voltage); + #endif if (power == power_) return; @@ -596,8 +599,11 @@ void MainClockView::UpdateBatteryColor(void) { - bool isCharging = get_charge_stat(); // 获取充电状态 - + bool isCharging = false; + #ifdef SUPPORT_BATTERY_SERVICE + isCharging = get_charge_stat(); // 获取充电状态 + #endif + if (isCharging) { if (!isBatteryIconVisible) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/health/CheckAbnormalPresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/health/CheckAbnormalPresenter.cpp index 41359c672..2b9441ce5 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/health/CheckAbnormalPresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/health/CheckAbnormalPresenter.cpp @@ -53,7 +53,9 @@ #include "main/include/MainModel.h" #include "health/health_service/health_service.h" +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif #include "NativeRegisterManager.h" @@ -100,7 +102,10 @@ namespace OHOS if (strcmp(view.GetViewId(), CLICK_BLOOD_RE) == 0) { // 检测过程中充电 失败可以弹窗 - bool isCharging = get_charge_stat(); // 获取充电状态 + bool isCharging = false; + #ifdef SUPPORT_BATTERY_SERVICE + isCharging = get_charge_stat(); // 获取充电状态 + #endif if (isCharging) { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/include/HeartResultPresenter.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/include/HeartResultPresenter.h index 3203bc22c..c3a7d6f85 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/include/HeartResultPresenter.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/include/HeartResultPresenter.h @@ -17,7 +17,9 @@ #include "key/include/KeyInputListener.h" #include "common/key_code.h" +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif #include "heartrate/include/HeartResultView.h" diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartModel.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartModel.cpp index d2e4c1d60..6f322e02a 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartModel.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartModel.cpp @@ -51,7 +51,9 @@ #include #include +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif #include "languagecode/LanguageInit.h" #include "uiservice/include/ui_service.h" @@ -457,7 +459,10 @@ void HeartModel::Heart_Control(HeartState state, HeartCheck check) { heart_stop_data_timer(); //关闭数据获取 } else if (state == HeartState::Start && heartstate == false) { /*充电状态下不进行检测*/ - bool isCharging = get_charge_stat(); // 获取充电状态 + bool isCharging = false; + #ifdef SUPPORT_BATTERY_SERVICE + isCharging = get_charge_stat(); // 获取充电状态 + #endif if (isCharging) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "充电不能检测"); return; diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartResultPresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartResultPresenter.cpp index 355a453bf..839e0e4f4 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartResultPresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/heartrate/src/HeartResultPresenter.cpp @@ -43,7 +43,9 @@ #include "cywee_service.h" #endif +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif #include "health/health_service/health_service.h" #include "NativeRegisterManager.h" @@ -142,7 +144,10 @@ namespace OHOS if (strcmp(view.GetViewId(), CLICK_HEART) == 0) { // 如果正在充电进入提醒界面 - bool isCharging = get_charge_stat(); + bool isCharging = false; + #ifdef SUPPORT_BATTERY_SERVICE + isCharging = get_charge_stat(); + #endif // bool isCharging = false; if (isCharging) { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/MainPresenterSample.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/MainPresenterSample.cpp index 3346ff23d..41f21eec9 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/MainPresenterSample.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/MainPresenterSample.cpp @@ -208,7 +208,11 @@ if (ConfigModel::GetInstance()->GetisFirstTimeStart() == true) { MainModel::GetInstance().SetFromSetCardView(true); MainModel::GetInstance().SetFromCardId(BLOODOXGEN); // 如果正在充电进入提醒界面 - if (get_charge_stat()) + bool isCharging = false; + #ifdef SUPPORT_BATTERY_SERVICE + isCharging = get_charge_stat(); + #endif + if (isCharging) { HealthState highHealthState; highHealthState.checkType = CHARGE; diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialBoxProgressModel.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialBoxProgressModel.cpp index 5cb89f89c..40ad29d2c 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialBoxProgressModel.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialBoxProgressModel.cpp @@ -2,7 +2,9 @@ #include "main/include/dial/DialBoxProgressView.h" #include "wearable_log.h" +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif extern uint8_t battery_get_voltage(float *voltage); // 定义电量宏 @@ -52,7 +54,10 @@ uint32_t DialBoxProgressModel::ExtractValue(uint32_t rawData) { void DialBoxProgressModel::UpdateBatteryColor( float value_) { - bool isCharging = get_charge_stat(); // 获取充电状态 + bool isCharging = false; + #ifdef SUPPORT_BATTERY_SERVICE + isCharging = get_charge_stat(); // 获取充电状态 + #endif if (isCharging) { SetViewColor(Color::Green().full); // 充电状态为绿色 diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPower.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPower.cpp index 6db064dd6..cb32145c7 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPower.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPower.cpp @@ -25,7 +25,9 @@ #include #include "wearable_log.h" +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif extern uint8_t battery_get_voltage(float *voltage); REGIST_DIAL_MODULE(OHOS::DialDataType::BATTERY, OHOS::DialModelPower::GetInstance()); @@ -37,7 +39,10 @@ namespace OHOS (void)type; float voltage = 0.0F; + power_ = 0; + #ifdef SUPPORT_BATTERY_SERVICE power_ = battery_get_voltage(&voltage); + #endif out = static_cast(power_); return true; } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPowerMapper.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPowerMapper.cpp index 278ec6507..80044c328 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPowerMapper.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPowerMapper.cpp @@ -6,7 +6,9 @@ #include "wearable_log.h" #include +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif extern uint8_t battery_get_voltage(float *voltage); REGIST_DIAL_MODULE(OHOS::DialDataType::BATTERY_LEVEL, @@ -16,7 +18,10 @@ namespace OHOS { bool DialModelPowerMapper::GetDialFloatData(DialDataType &type, float &out) { (void)type; float voltage = 0.0F; + powermapper_ = 0; + #ifdef SUPPORT_BATTERY_SERVICE powermapper_ = battery_get_voltage(&voltage); + #endif //电量0~100 //映射0~1 powermapper_ = static_cast(powermapper_) / 100.0f; diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPowerStandby.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPowerStandby.cpp index 7a6167557..9046431f8 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPowerStandby.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPowerStandby.cpp @@ -8,7 +8,10 @@ #include "wearable_log.h" #include +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif + extern uint8_t battery_get_voltage(float *voltage); REGIST_DIAL_MODULE(OHOS::DialDataType::POWER_STANDBY, @@ -20,7 +23,10 @@ bool DialModelPowerStanby::GetDialFloatData(DialDataType &type, float &out) { #if 1 (void)type; float voltage = 0.0F; + PowerStanby_ = 0; + #ifdef SUPPORT_BATTERY_SERVICE PowerStanby_ = battery_get_voltage(&voltage); + #endif WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Battery voltage obtained: %.2f", voltage); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPowerStr.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPowerStr.cpp index 93a336f23..0f858b7ef 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPowerStr.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dial/DialModelPowerStr.cpp @@ -1,7 +1,9 @@ #include "main/include/dial/DialModelPowerStr.h" #include "main/include/dial/RegisterDialModel.h" #include "wearable_log.h" +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif extern uint8_t battery_get_voltage(float *voltage); namespace OHOS @@ -12,7 +14,10 @@ namespace OHOS { (void)type; float voltage = 0.0F; - uint8_t power_ = battery_get_voltage(&voltage); + uint8_t power_ = 0; + #ifdef SUPPORT_BATTERY_SERVICE + power_ = battery_get_voltage(&voltage); + #endif dialPowerStr_ = std::to_string(power_) + "%"; out = &dialPowerStr_; strNum = 1; diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/saveele/src/SaveBatPresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/saveele/src/SaveBatPresenter.cpp index b679c0de8..de77a1ed3 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/saveele/src/SaveBatPresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/saveele/src/SaveBatPresenter.cpp @@ -5,7 +5,9 @@ #include "NativeAbility.h" #include "common/key_code.h" #include "cmsis_os.h" +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif #include "custom_utils.h" #include "saveele/include/SaveBatPresenter.h" #include "saveele/include/SaveBatView.h" diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/saveele/src/SaveBatView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/saveele/src/SaveBatView.cpp index 63f34ba17..2253a1242 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/saveele/src/SaveBatView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/saveele/src/SaveBatView.cpp @@ -10,7 +10,9 @@ #include #include #include +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif #include "string" #include "custom_utils.h" #include "UiConfig.h" @@ -464,7 +466,10 @@ namespace OHOS // 获取电量值 float voltage = 0.0F; - uint8_t value = battery_get_voltage(&voltage); + uint8_t value = 0; + #ifdef SUPPORT_BATTERY_SERVICE + value = battery_get_voltage(&voltage); + #endif // 更新界面组件 timelabel->SetText(stringtime.c_str()); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemView.cpp index 5c275adf7..8eb7cf332 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/src/SystemView.cpp @@ -7,7 +7,9 @@ #include "bleService.h" #endif +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" +#endif #include "UiConfig.h" #include "common/screen.h" diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingModel.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingModel.cpp index 48eaa0abc..b26a1458e 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingModel.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingModel.cpp @@ -1708,6 +1708,7 @@ std::string TraingModel::GetPaceTablePath(uint32_t timestamp) { } /*发送实时数据*/ void TraingModel::SendLiveData() { + #ifdef SUPPORT_BLE_SERVICE msg_get_train_data_info_t data; memset(&data, 0, sizeof(msg_get_train_data_info_t)); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "sportdata->starttime %d \r\n", @@ -1722,6 +1723,7 @@ void TraingModel::SendLiveData() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SendLiveData Begin!"); sendtraningdata(&data); // 发送数据函数 WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SendLiveData Stop!"); + #endif } /* -------------------------------- 运动识别发起处理 * -------------------------------- */ diff --git a/code/sdk/application/wearable/fd230/service/alipay_msg/CMakeLists.txt b/code/sdk/application/wearable/fd230/service/alipay_msg/CMakeLists.txt index 296189182..01b067d30 100644 --- a/code/sdk/application/wearable/fd230/service/alipay_msg/CMakeLists.txt +++ b/code/sdk/application/wearable/fd230/service/alipay_msg/CMakeLists.txt @@ -10,6 +10,7 @@ set(PRIVATE_HEADER ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits/gfx_utils ${ROOT_DIR}/include/middleware/services/bts/br ${ROOT_DIR}/include/middleware/services/bts/common + ${ROOT_DIR}/zhihui/services/ble_service/transspecard/ ) set(SOURCES diff --git a/code/sdk/application/wearable/fd230/service/alipay_msg/alipay_app.cpp b/code/sdk/application/wearable/fd230/service/alipay_msg/alipay_app.cpp index 38b82aa9a..dcd1e1e7e 100644 --- a/code/sdk/application/wearable/fd230/service/alipay_msg/alipay_app.cpp +++ b/code/sdk/application/wearable/fd230/service/alipay_msg/alipay_app.cpp @@ -21,7 +21,6 @@ #ifdef __cplusplus extern "C" { #endif -#include "transspecard.h" #define HOSTENT_TIMEOUT 2000 #define TCP_CONNECT_TIMEOUT 2000 @@ -37,7 +36,10 @@ uint16_t g_tcp_data_readed = 0; uint32_t g_tcp_fd = 0; uint8_t g_netstatus = 0; +#ifdef SUPPORT_BLE_SERVICE #define ALIPAY_TRANSSPECARD_SUPPORT_BLE 1 +#include "transspecard.h" +#endif void msg_center_alipay_reply_ack(uint8_t cmd_id, uint8_t type) { uint8_t ack = 1; /* 与手机APK侧约定 */ diff --git a/code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-xts/libmsg_center.a b/code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-xts/libmsg_center.a index 0e24be78a..b1e105a9c 100644 Binary files a/code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-xts/libmsg_center.a and b/code/sdk/application/wearable/fd230/service/msg_center/brandy-native-js-xts/libmsg_center.a differ diff --git a/code/sdk/application/wearable/fd230/service/msg_center/src/msg_center_customer.cpp b/code/sdk/application/wearable/fd230/service/msg_center/src/msg_center_customer.cpp index e5f387492..8a8df794e 100644 --- a/code/sdk/application/wearable/fd230/service/msg_center/src/msg_center_customer.cpp +++ b/code/sdk/application/wearable/fd230/service/msg_center/src/msg_center_customer.cpp @@ -441,6 +441,7 @@ void MsgCenterNotifybleTransmit(const Topic topic, Request* req) void MsgCenterNotifyChargePlugProc(const Topic topic, Request* req) { + #ifdef SUPPORT_BATTERY_SERVICE unused(req); WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyProc:: CHarger Plug !"); #ifdef SYSTEM_LOG_SERVICE @@ -481,11 +482,13 @@ void MsgCenterNotifyChargePlugProc(const Topic topic, Request* req) NotificationManager::GetInstance()->ShowNotify(ShowChargeingNotify, (uint16_t)topic, true); } } + #endif } /*充电器已拔掉*/ void MsgCenterNotifyChargeUnPlugProc(const Topic topic, Request* req) { + #ifdef SUPPORT_BATTERY_SERVICE unused(req); unused(topic); WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyProc:: CHarger UnPlug !"); @@ -515,6 +518,7 @@ void MsgCenterNotifyChargeUnPlugProc(const Topic topic, Request* req) NotificationManager::GetInstance()->StopNotify(); } } + #endif } /*低电量提醒*/ diff --git a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/charge_notification.cpp b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/charge_notification.cpp index f808c4f25..45155ee8f 100644 --- a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/charge_notification.cpp +++ b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/charge_notification.cpp @@ -6,13 +6,15 @@ #include "components/ui_label.h" #include "components/ui_label_ext.h" #include "components/ui_label_button_ext.h" +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_service.h" +#include "battery_hal.h" +#endif #include "NativeAbility.h" #include "custom_utils.h" #include "cmsis_os2.h" #include "linux/delay.h" #include "components/ui_circle_progress.h" -#include "battery_hal.h" #include "uicomponents/UIComponents.h" #include "charge_notification.h" @@ -64,7 +66,10 @@ namespace OHOS } float voltage = 0.0F; - uint8_t power = battery_get_voltage(&voltage); + uint8_t power = 0; + #ifdef SUPPORT_BATTERY_SERVICE + power = battery_get_voltage(&voltage); + #endif // 使用 std::to_string 生成电池电量字符串 std::string powerstr = std::to_string(power) + "%"; @@ -185,7 +190,9 @@ namespace OHOS float voltage = 0.0F; uint8_t power = 0; + #ifdef SUPPORT_BATTERY_SERVICE power = battery_get_voltage(&voltage); + #endif char buf[16]={0}; sprintf(buf,"%d%c",power,'%'); @@ -441,7 +448,9 @@ namespace OHOS if(timer_falg_low_power==0) { alarm_UILabel->SetVisible(false); + #ifdef SUPPORT_BATTERY_SERVICE low_power_play_toUI(3); + #endif } } @@ -462,7 +471,9 @@ namespace OHOS return ; } ShutDownImageAnimatorView->Start(); + #ifdef SUPPORT_BATTERY_SERVICE set_lowpower_show(1,0); + #endif @@ -470,7 +481,7 @@ namespace OHOS UIViewGroup *lowPowerShow() { - + if (UIViewGroup_lowpower == nullptr) { UIViewGroup_lowpower = new UIViewGroup(); UIViewGroup_lowpower->SetPosition(0, 0, 466, 466); @@ -514,7 +525,9 @@ namespace OHOS alarm_UILabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); alarm_UILabel->SetRollSpeed(0); alarm_UILabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); + #ifdef SUPPORT_BATTERY_SERVICE set_lowpower_show(0,0); + #endif } // Set additional property if(battery_falg==1) diff --git a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp index 6734006e0..55cb694ce 100644 --- a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp +++ b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/debug_output_notification/debug_output_notification.cpp @@ -57,8 +57,10 @@ #include "bleInstruct.h" #endif +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_hal.h" #include "battery_service.h" +#endif #ifdef SUPPORT_CAT1_SERVICE #include "cat1_tcpServer.h" @@ -235,6 +237,7 @@ namespace OHOS static std::string getCurrentWatchadvdata() { + #ifdef SUPPORT_BLE_SERVICE uint32_t len = 64; char *buf_advdata = (char *)malloc(len); @@ -248,10 +251,13 @@ namespace OHOS free(buf_advdata); return (str); + #endif + return "bt service not support"; } std::string DebugOutputViewEventListener::get_bt_runtime_status_t(void) { + #ifdef SUPPORT_BLE_SERVICE WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DebugOutputViewEventListener::get_bt_runtime_status_t"); std::string result = "bt_powerOn:" + std::to_string(uapi_dev_runtime_get_bt_powerstat()) + " "; result += "bt_ble_connectstat:" + std::to_string(get_ble_connect()) + " "; @@ -265,6 +271,8 @@ namespace OHOS // 蓝牙ble广播开关,基础信息如,地址,广播状态 return result; + #endif + return "bt service not support"; } std::string DebugOutputViewEventListener::get_cat1_runtime_status_t(void) @@ -384,6 +392,7 @@ namespace OHOS // 获取电池相关信息 std::string DebugOutputViewEventListener::get_battery_info() { + #ifdef SUPPORT_BATTERY_SERVICE // 获取电池温度 float bat_temp = 0.0f; batteryservice_get_battery_temp(&bat_temp); @@ -411,6 +420,8 @@ namespace OHOS << "Charge: " << (isCharging ? "Yes" : "No"); return oss.str(); + #endif + return "battery service not support"; } // 获取死机列表 @@ -511,6 +522,7 @@ namespace OHOS // 获取电池状态 std::string DebugOutputViewEventListener::get_battery_percent(void) { + #ifdef SUPPORT_BATTERY_SERVICE std::string result; std::string charge_stat; int index = 0; @@ -632,6 +644,8 @@ namespace OHOS } free(data); return result; // 返回结果字符串 + #endif + return "battery service not support"; } // 获取系统free内存 @@ -850,8 +864,9 @@ namespace OHOS { // if (BluetoothModel::GetInstance()->GetAdvStartState() == false) // 如果广播是关的就去开启广播 // BleAdvStart(); - + #ifdef SUPPORT_BLE_SERVICE svr_ble_adv_start(); + #endif return true; } else if (viewId == DEBUGOUTPUTLABELBUTTON) // 点击的是刷新按钮 @@ -867,7 +882,9 @@ namespace OHOS { // toggleButton->SetState(false); SystemLogModel::GetInstance()->set_uart_status(false); + #ifdef SUPPORT_CAT1_SERVICE remove_debug_vote(); // 关闭uart的同时也取消 debug的投票,保证关闭开关后可以正常休眠 + #endif WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "uart_at_set false"); } else @@ -912,13 +929,17 @@ namespace OHOS { if (toggleButtonOffline->GetState() == false) { + #ifdef SUPPORT_PPG_SERVICE send_ppg_cmd_msg(PPG_SERVICE_CMD_TYPE_CLOSE_HRS_BLE); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "hrs_ble_switch false"); + #endif } else { + #ifdef SUPPORT_PPG_SERVICE send_ppg_cmd_msg(PPG_SERVICE_CMD_TYPE_OPEN_HRS_BLE); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "hrs_ble_switch true"); + #endif } } else @@ -952,7 +973,9 @@ namespace OHOS } else if (viewId == "CAT1_UPDATA") { + #ifdef SUPPORT_CAT1_SERVICE Cat1_OTA(CAT1_TCP_START_OTA); + #endif } else if (viewId == NEXTORPREPAGELABELBUTTON) { diff --git a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/findwatch_notification.cpp b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/findwatch_notification.cpp index 7dfe82317..33779322a 100644 --- a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/findwatch_notification.cpp +++ b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/findwatch_notification.cpp @@ -4,7 +4,6 @@ #include #include "uiservice/include/ui_service.h" #include -#include "bleEvent.h" #include #include #include "ConfigModel.h" @@ -17,6 +16,9 @@ #include #include "findwatch_notification.h" +#ifdef SUPPORT_BLE_SERVICE +#include "bleEvent.h" +#endif namespace OHOS { UIViewGroup *FindWatchGroupView{nullptr}; diff --git a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/goal_notification.cpp b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/goal_notification.cpp index f56113b04..00b66fb92 100644 --- a/code/sdk/application/wearable/fd230/service/msg_center/src/notify/goal_notification.cpp +++ b/code/sdk/application/wearable/fd230/service/msg_center/src/notify/goal_notification.cpp @@ -20,7 +20,9 @@ #include "ConfigModel.h" #include "uicomponents/UIComponents.h" +#ifdef SUPPORT_BATTERY_SERVICE #include "battery_service.h" +#endif #include "upg.h" #include "custom_runtime.h" #include "vibrator/service/vibrator_service.h" diff --git a/code/sdk/application/wearable/fd230/xts/nativeapp/brandy-native-js-xts/libuikit_fwk.a b/code/sdk/application/wearable/fd230/xts/nativeapp/brandy-native-js-xts/libuikit_fwk.a index 55d73657a..e3ce469ad 100644 Binary files a/code/sdk/application/wearable/fd230/xts/nativeapp/brandy-native-js-xts/libuikit_fwk.a and b/code/sdk/application/wearable/fd230/xts/nativeapp/brandy-native-js-xts/libuikit_fwk.a differ diff --git a/code/sdk/application/wearable/fd230/xts/service/msg_center/brandy-native-js-xts/libmsg_center.a b/code/sdk/application/wearable/fd230/xts/service/msg_center/brandy-native-js-xts/libmsg_center.a index 0e24be78a..b1e105a9c 100644 Binary files a/code/sdk/application/wearable/fd230/xts/service/msg_center/brandy-native-js-xts/libmsg_center.a and b/code/sdk/application/wearable/fd230/xts/service/msg_center/brandy-native-js-xts/libmsg_center.a differ diff --git a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_audio_manager_wrapper.a b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_audio_manager_wrapper.a index c02957674..ce395f70d 100644 Binary files a/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_audio_manager_wrapper.a and b/code/sdk/interim_binary/brandy/libs/bt/evb_standard/liteos/br/libbt_host_audio_manager_wrapper.a differ diff --git a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts-r/libgfx_rm.a b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts-r/libgfx_rm.a index 73a22fc3e..a73130193 100644 Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts-r/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts-r/libgfx_rm.a differ diff --git a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts/libgfx_rm.a b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts/libgfx_rm.a index 73a22fc3e..7337ef01e 100644 Binary files a/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts/libgfx_rm.a and b/code/sdk/middleware/services/gpu/api/rm/brandy-native-js-xts/libgfx_rm.a differ diff --git a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-xts/libdisplay_gfx.a b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-xts/libdisplay_gfx.a index 5b7a5036a..8864f8e31 100644 Binary files a/code/sdk/middleware/services/gui/hal/display/brandy-native-js-xts/libdisplay_gfx.a and b/code/sdk/middleware/services/gui/hal/display/brandy-native-js-xts/libdisplay_gfx.a differ diff --git a/code/sdk/middleware/services/gui/uikit/brandy-native-js-xts/libuikit_ext.a b/code/sdk/middleware/services/gui/uikit/brandy-native-js-xts/libuikit_ext.a index aa77c6800..9d278be5b 100644 Binary files a/code/sdk/middleware/services/gui/uikit/brandy-native-js-xts/libuikit_ext.a and b/code/sdk/middleware/services/gui/uikit/brandy-native-js-xts/libuikit_ext.a differ diff --git a/code/sdk/middleware/services/gui/uikit/ui/interfaces/innerkits/engines/gfx/gfx_engine_manager.h b/code/sdk/middleware/services/gui/uikit/ui/interfaces/innerkits/engines/gfx/gfx_engine_manager.h index 42c122033..ef1e3bc63 100644 --- a/code/sdk/middleware/services/gui/uikit/ui/interfaces/innerkits/engines/gfx/gfx_engine_manager.h +++ b/code/sdk/middleware/services/gui/uikit/ui/interfaces/innerkits/engines/gfx/gfx_engine_manager.h @@ -150,12 +150,14 @@ public: virtual uint16_t GetScreenWidth() { - return width_; + // return width_; + return HORIZONTAL_RESOLUTION; } virtual uint16_t GetScreenHeight() { - return height_; + // return height_; + return VERTICAL_RESOLUTION; } virtual void SetScreenShape(ScreenShape screenShape) diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts-r/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts-r/libx_vfs_private.a index 319a37815..ef8c37d47 100644 Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts-r/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts-r/libx_vfs_private.a differ diff --git a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts/libx_vfs_private.a b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts/libx_vfs_private.a index 319a37815..1c08fcb6b 100644 Binary files a/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts/libx_vfs_private.a and b/code/sdk/middleware/utils/fs/vfs/brandy-native-js-xts/libx_vfs_private.a differ diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts-r/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts-r/libfs_yaffs2.a index b9ee51284..00beb36cd 100644 Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts-r/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts-r/libfs_yaffs2.a differ diff --git a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts/libfs_yaffs2.a b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts/libfs_yaffs2.a index b9ee51284..50e244ad8 100644 Binary files a/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts/libfs_yaffs2.a and b/code/sdk/middleware/utils/fs/yaffs2/brandy-native-js-xts/libfs_yaffs2.a differ diff --git a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-xts/libams.a b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-xts/libams.a index 8279bdf6c..b294a766d 100644 Binary files a/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-xts/libams.a and b/code/sdk/open_source/openharmony/foundation/aafwk/aafwk_lite/brandy-native-js-xts/libams.a differ diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace.a b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace.a index f829a5801..e807091dc 100644 Binary files a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace.a and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace.a differ diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace_http.a b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace_http.a new file mode 100644 index 000000000..cdfdb3135 Binary files /dev/null and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libace_http.a differ diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libnetstack_http.a b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libnetstack_http.a new file mode 100644 index 000000000..b9c1bb00b Binary files /dev/null and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libnetstack_http.a differ diff --git a/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libwebsocket.a b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libwebsocket.a new file mode 100644 index 000000000..93b5e6f80 Binary files /dev/null and b/code/sdk/open_source/openharmony/foundation/ace/ace_engine_lite/brandy-native-js-xts/libwebsocket.a differ diff --git a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-xts/libbms.a b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-xts/libbms.a index ac4194c38..f262ad882 100644 Binary files a/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-xts/libbms.a and b/code/sdk/open_source/openharmony/foundation/appexecfwk/appexecfwk_lite/brandy-native-js-xts/libbms.a differ diff --git a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-xts/libjerryscript.a b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-xts/libjerryscript.a index 00de31cdc..bafd4fc5f 100644 Binary files a/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-xts/libjerryscript.a and b/code/sdk/open_source/openharmony/third_party/jerryscript/brandy-native-js-xts/libjerryscript.a differ diff --git a/code/sdk/zhihui/services/ble_service/transspecard/transspecard.h b/code/sdk/zhihui/services/ble_service/transspecard/transspecard.h index e5fd09b63..5c90c86e9 100644 --- a/code/sdk/zhihui/services/ble_service/transspecard/transspecard.h +++ b/code/sdk/zhihui/services/ble_service/transspecard/transspecard.h @@ -11,7 +11,9 @@ extern "C" #include "stdbool.h" #include "bts_def.h" #include "errcode.h" -#include +#ifdef SUPPORT_BLE_SERVICE +#include "bleEvent.h" +#endif #define ALIPAY_TRANSSPECARD 0x09 diff --git a/code/sdk/zhihui/utils/custom_utils.c b/code/sdk/zhihui/utils/custom_utils.c index 0829d14d9..d1e863d75 100644 --- a/code/sdk/zhihui/utils/custom_utils.c +++ b/code/sdk/zhihui/utils/custom_utils.c @@ -1559,7 +1559,9 @@ void uapi_set4GCapability(bool isopen) } // uapi_save_runtime_log(RUNTIME_LOG_CAT1_4G_OPEN); + #ifdef SUPPORT_CAT1_SERVICE power_on_cat1(); + #endif // if(!uapi_dev_runtime_get_saveele_status()) { uapi_dev_runtime_set_cat1_powerstat(1); @@ -1593,7 +1595,9 @@ void uapi_set4GCapability(bool isopen) return; } // uapi_save_runtime_log(RUNTIME_LOG_CAT1_4G_CLOSE); + #ifdef SUPPORT_CAT1_SERVICE power_off_cat1(); + #endif // if(!uapi_dev_runtime_get_saveele_status()) { uapi_dev_runtime_set_cat1_powerstat(0); @@ -2760,17 +2764,23 @@ void uapi_enter_power_saving_mode(void) //关闭cat1 if(uapi_dev_runtime_get_cat1_powerstat()) { + #ifdef SUPPORT_CAT1_SERVICE uapi_set4GCapability(false); + #endif } //停止心率周期检测 //进入normal模式 + #ifdef SUPPORT_CYWEE_SERVICE do_cywee_service_check_msg(CYWEE_SERVICE_CMD_NORMAL_MODE,NULL); //关闭运动识别 if(uapi_dev_runtime_get_motion_recognition_status()) + { do_cywee_service_check_msg(CYWEE_SERVICE_CMD_CLOSE_AR_ALERT,NULL); + } + #endif //关闭音乐 mmi_stop_music_play(); @@ -2810,9 +2820,13 @@ void uapi_exit_power_saving_mode(void) //开启心率周期检测(runtime) + #ifdef SUPPORT_CYWEE_SERVICE //开启运动识别 if(uapi_dev_runtime_get_motion_recognition_status()) + { do_cywee_service_check_msg(CYWEE_SERVICE_CMD_OPEN_AR_ALERT,NULL); + } + #endif //配置runtime uapi_dev_runtime_set_saveele_status(0);