${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemShutdown.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/system/src/SystemFactoryResetView.cpp
- #系统更新
- ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/systemupdate/src/SystemUpdateModel.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/systemupdate/src/SystemUpdateView.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/systemupdate/src/SystemUpdatePresenter.cpp
-
#手表二维码
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/watchQRcode/src/WatchQRCodePresenter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/watchQRcode/src/WatchQRCodeView.cpp
)
+if("SUPPORT_CAT1_SERVICE" IN_LIST DEFINES)
+set(SOURCES
+ ${SOURCES}
+ #系统更新
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/systemupdate/src/SystemUpdateModel.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/systemupdate/src/SystemUpdateView.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/systemupdate/src/SystemUpdatePresenter.cpp
+)
+endif()
if("SUPPORT_A5133_SERVICE" IN_LIST DEFINES)
set(SOURCES
#include "motionrecognition/include/MotionRecognitionPresenter.h"
#include "motionrecognition/include/MotionRecognitionView.h"
-
+#ifdef SUPPORT_CAT1_SERVICE
#include "systemupdate/include/SystemUpdatePresenter.h"
#include "systemupdate/include/SystemUpdateView.h"
-
+#endif
#include "watchQRcode/include/WatchQRCodePresenter.h"
#include "watchQRcode/include/WatchQRCodeView.h"
/*系统更新*/
void NativeLauncher::InitSystemUpdateSlice(void)
{
+ #ifdef SUPPORT_CAT1_SERVICE
SliceProxy *systemupdate = new AbilitySliceProxy<SystemUpdateView, SystemUpdatePresenter>;
if (systemupdate == nullptr)
{
return;
}
NativeAbility::GetInstance().AddSliceProxy(VIEW_SYSTEM_UPDATE, systemupdate);
+ #endif
}
/*手表二维码*/
#include "sleep/include/SleepModel.h"\r
#include "sleepmode/include/SleepModeModel.h"\r
#include "safemodemanager/include/SafeModeManagerModel.h"\r
-#include "cat1_server_hal.h"\r
+// #include "cat1_server_hal.h"\r
#include "custom_runtime.h"\r
#include "uiservice/include/ui_service.h"\r
#include "power_display_service.h"\r
#include "bleEvent.h"
#include "broadcast_feature.h"
#include "broadcast_service.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_ctl.h"
#include "cat1_server.h"
+#include "lwip/apps/http_client.h"
+#endif
#include "custom_runtime.h"
#include "custom_utils.h"
#include "graphic_service.h"
-#include "lwip/apps/http_client.h"
#include "samgr_lite.h"
#include "tcxo.h"
#include "thread_adapter.h"
#include "custom_runtime.h"
#include "MainCallingView.h"
#include "dial_sos_c.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_ctl.h"
#include "cat1_server.h"
+#endif
#include "AlarmClockModel.h"
#include "PhoneAGService.h"
#include "custom_save_runtime.h"
NotificationManager::GetInstance()->SetWatchCallStatus(false);
CallerLogModel::GetInstance()->SetCallSource(CallerLogModel::CallSource::CallSourcePhone);
DisshakeTimer();
+ #ifdef SUPPORT_CAT1_SERVICE
set_call_hungup_flag(0);
+ #endif
set_TransCallToMobilePhone_falg(0);
OHOS::AlarmClockModel::GetInstance()->AlarmPlayerStop();
// }
}
-
+ #ifdef SUPPORT_CAT1_SERVICE
{
if(get_call_hungup_flag()>=2)
{
set_call_hungup_flag(get_call_hungup_flag()+1);
}
}
+ #endif
}
}
* @Author: luozheng 1732036298@qq.com\r
* @Date: 2024-03-30 09:14:38\r
* @LastEditors: SnickerSun snickersun@163.com\r
- * @LastEditTime: 2024-12-22 09:57:34\r
+ * @LastEditTime: 2024-12-29 16:25:27\r
* @FilePath: /FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/displaybrightness/src/DisplayBrightnessPresent.cpp\r
*/\r
#include "AppViewIDs.h"\r
#include "graphic_math.h"\r
#include "string.h"\r
#include "displaybrightness/include/DisplayBrightnessPresenter.h"\r
-#include "cat1_ctl.h"\r
+// #include "cat1_ctl.h"\r
#include "displaybrightness/include/DisplayBrightnessModel.h"\r
#include "power_display_service.h"\r
#include "common/key_code.h"\r
/*
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-08-21 11:54:00
- * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-11-05 15:09:04
+ * @LastEditors: SnickerSun snickersun@163.com
+ * @LastEditTime: 2024-12-29 20:49:56
* @FilePath: /FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/dropdown/DropDownCardPage1.cpp
*/
#include "main/include/dropdown/DropDownCardPage1.h"
uapi_set4GCapability(false);
#endif
state = toggleButton[DropDownCardPage1::toggleButton_4G]->GetState();
- Updat4GState(uapi_cat1_get_power_stat());
- ConfigModel::GetInstance()->SetCat1_4Gability(uapi_cat1_get_power_stat());
+ bool cat1_powerstat=false;
+ #ifdef SUPPORT_CAT1_SERVICE
+ cat1_powerstat=uapi_cat1_get_power_stat();
+ #endif
+ Updat4GState(cat1_powerstat);
+ ConfigModel::GetInstance()->SetCat1_4Gability(cat1_powerstat);
}
}
else if (viewId == DROPDOWN_ALIPAY_TOGGLEBUTTON_VIEWID) // 支付宝
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "DropDownCardPage1::InitPage");
bool state_bt = ConfigModel::GetInstance()->GetClassicBlueToothState(); // 传统蓝牙开关
- bool state_4g = uapi_cat1_get_power_stat();
+ bool state_4g = false;
+ #ifdef SUPPORT_CAT1_SERVICE
+ state_4g = uapi_cat1_get_power_stat();
+ #endif
bool state_savepower = uapi_dev_runtime_get_saveele_status();
bool state_sleep = uapi_sleep_mode_flag_get();
bool state_dnotdisturb = DnotDisturbModel::GetInstance().GetDoNotDisturbModeEnabled();
//刷新4g开关显示
void DropDownCardPage1::Refresh4GState()
{
- Updat4GState(uapi_cat1_get_power_stat());
+ bool cat1_powerstat=false;
+ #ifdef SUPPORT_CAT1_SERVICE
+ cat1_powerstat=uapi_cat1_get_power_stat();
+ #endif
+ Updat4GState(cat1_powerstat);
}
void DropDownCardPage1::UpdateDnotdisturbState(bool state)
#include "wearable_log.h"
#include "UiConfig.h"
#include "PhoneService.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_server.h"
#include "cat1_server_hal.h"
+#endif
#include "custom_utils.h"
#include "phoneaddressmodel.h"
#include "bletest.h"
#include "MainCallingView.h"
#include "PhoneService.h"
#include "WaitingHintsView.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_server.h"
#include "cat1_server_hal.h"
+#endif
#include "custom_utils.h"
#include "phoneaddressmodel.h"
#include "bletest.h"
}
//cat1_handle_call_disconnected((char *)CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
-
+ #ifdef SUPPORT_CAT1_SERVICE
cat1_call_hungup_timer();
-
+ #endif
}
else
if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1)
{
//cat1_handle_call_disconnected((char *)CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
+ #ifdef SUPPORT_CAT1_SERVICE
cat1_call_hungup_timer();
+ #endif
return true;
//#endif
if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1)
{
//cat1_handle_call_disconnected((char *)CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
+ #ifdef SUPPORT_CAT1_SERVICE
cat1_call_hungup_timer();
-
+ #endif
return true;
//#endif
if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1)
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MakephoneNotify 11111111 ");
+ #ifdef SUPPORT_CAT1_SERVICE
cat1_call_answer();
+ #endif
//incomedcall_event_sendmsg_toUI("ok");
return true;
#include "wearable_log.h"
#include "PhoneService.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_server.h"
#include "cat1_server_hal.h"
+#endif
#include "phoneaddressmodel.h"
/*
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-04-23 09:59:32
- * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-11-05 14:25:03
+ * @LastEditors: SnickerSun snickersun@163.com
+ * @LastEditTime: 2024-12-29 16:04:27
* @FilePath: /FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/networkandcall/src/NetworkAndCallPresenter.cpp
*/
#include "AppViewIDs.h"
#include "iostream"
#include "ConfigModel.h"
#include "networkandcall/include/NetworkAndCallC.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_ctl.h"
+#endif
namespace OHOS
{
else if (it->second == "4GCapability")
{
uapi_set4GCapability(true);
- ConfigModel::GetInstance()->SetCat1_4Gability(uapi_cat1_get_power_stat());
+ bool cat1_powerstat=false;
+ #ifdef SUPPORT_CAT1_SERVICE
+ cat1_powerstat=uapi_cat1_get_power_stat();
+ #endif
+ ConfigModel::GetInstance()->SetCat1_4Gability(cat1_powerstat);
if(p_NetworkAndCallView->GetVoLTEToggleButton())
{
p_NetworkAndCallView->GetVoLTEToggleButton()->SetTouchable(true);
#else
uapi_set4GCapability(false);
#endif
- ConfigModel::GetInstance()->SetCat1_4Gability(uapi_cat1_get_power_stat());
+ bool cat1_powerstat=false;
+ #ifdef SUPPORT_CAT1_SERVICE
+ cat1_powerstat=uapi_cat1_get_power_stat();
+ #endif
+ ConfigModel::GetInstance()->SetCat1_4Gability(cat1_powerstat);
if(p_NetworkAndCallView->GetVoLTEToggleButton() && p_NetworkAndCallView->GetVoLTEToggleButton()->GetState())
{
p_NetworkAndCallView->GetVoLTEToggleButton()->SetState(false);
#include "wearable_log.h"
#include "UiConfig.h"
#include "ConfigModel.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_ctl.h"
+#endif
#include "ui_resource_string.h"
namespace OHOS
{
{
MobileData_toggleButton->SetPosition(298, 145, 100, 50);
}
- MobileData_toggleButton->SetState(uapi_cat1_get_power_stat());
+ bool cat1_powerstat=false;
+ #ifdef SUPPORT_CAT1_SERVICE
+ cat1_powerstat=uapi_cat1_get_power_stat();
+ #endif
+ MobileData_toggleButton->SetState(cat1_powerstat);
MobileData_toggleButton->SetStyle(STYLE_BACKGROUND_OPA, 0x00);
MobileData_toggleButton->SetImages(PNG_TOGGLEBUTTON_ON_IMAGE, PNG_TOGGLEBUTTON_OFF_IMAGE);
MobileData_toggleButton->SetOnClickListener(presenter_);
/*
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-03-28 14:17:43
- * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-29 17:30:05
+ * @LastEditors: SnickerSun snickersun@163.com
+ * @LastEditTime: 2024-12-29 17:02:52
* @FilePath: /FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/language/src/DialingMethodPresenter.cpp
*/
#include "AppViewIDs.h"
#include <custom_utils.h>
#include "phone/include/TelephonyInitInterface.h"
#include "phone/include/phoneaddressmodel.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_server_hal.h"
+#include "cat1_ctl.h"
+#endif
#include "PhoneService.h"
#include "custom_runtime.h"
-#include "cat1_ctl.h"
namespace OHOS
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DialingMethodPresenter::OnClick");
std::string curViewId = view.GetViewId();
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s OnClick", curViewId.c_str());
+ #ifdef SUPPORT_CAT1_SERVICE
if (curViewId == USINGWATCHSIMBUTTON_VIEWID)
{
TelephonyInitInterface::DIALINGMETHOD = DIALINGMETHOD_USINGWATCHSIM; // 手表SIM卡拨号
}
else
calldial_event_sendmsg_toUI(get_address_number());
-
}
else
{
}
else if (curViewId == USINGPHONEBUTTON_VIEWID)
+ #else
+ if (curViewId == USINGPHONEBUTTON_VIEWID)
+ #endif
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s OnClick", curViewId.c_str());
TelephonyInitInterface::DIALINGMETHOD = DIALINGMETHOD_USINGPHONE; // 手机拨号
#include "string"\r
#include "phone/include/PhoneCallPresenter.h"\r
#include <iostream>\r
+#ifdef SUPPORT_CAT1_SERVICE\r
#include "cat1_server_hal.h"\r
+#endif\r
#include "PhoneService.h"\r
#include "phone/include/PhoneCallView.h"\r
#include "phone/include/TelephonyInitInterface.h"\r
if(TelephonyInitInterface::DIALINGMETHOD == DIALINGMETHOD_USINGWATCHSIM)\r
{\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "DIALINGMETHOD_USINGWATCHSIM");\r
+ #ifdef SUPPORT_CAT1_SERVICE\r
calldial_event_sendmsg_toUI((char *)phoneNumber.c_str());\r
+ #endif\r
}\r
else if(TelephonyInitInterface::DIALINGMETHOD == DIALINGMETHOD_USINGPHONE)\r
{\r
* Copyright (c) @CompanyNameMagicTag 2021. All rights reserved.
* Description: This module include test function of BT HFP Service module.
*/
-
#include "PhoneAGService.h"
#include <soc_osal.h>
#include <td_base.h>
#include "wearable_log.h"
#include "common_def.h"
#include "PhoneAudio.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_ctl.h"
+#endif
#include "BluetoothHeadsetEvent.h"
#include "PhoneServiceC.h"
void cat1_start_SCO_audio_(void)
{
+ #ifdef SUPPORT_CAT1_HFP_AG_SERV
uapi_cat1_start_SCO_volte_voice();
+ #endif
}
static void sample_hfp_ag_sco_conn_state_changed_callback(const bd_addr_t *bd_addr, hfp_sco_connect_state_t state)
break;
case HFP_SCO_STATE_CONNECTED:
+ #ifdef SUPPORT_CAT1_HFP_AG_SERV
if(volte_voice_state()==0)
{
do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT_HFP_SCO_AUDIO_START, nullptr, 0);
do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_CAT_HFP_SCO_AUDIO_START, nullptr, 0);
}
+ #endif
Call_headset_state_updata(1);
//AudioActInterrupt(AUDIO_STREAM_VOICE_CALL_VOLTE);
int ret=0;
+ #ifdef SUPPORT_CAT1_HFP_AG_SERV
hfp_phone_info_t phone_info={0};
if(info!=nullptr)
{
memcpy_s(phone_info.number,HFP_AG_PHONENUM_MAX_DIGITS,info,phone_info.num_len);
phone_info.alpha_str[0]=0;
}
-
switch (event_topic)
{
case TOPIC_EVENT_CAT1_INCOMMING:
ret=ERRCODE_BT_FAIL;
break;
}
+ #endif
return ret;
}
#include "wearable_log.h"
#include "audio_manager_c_wrapper.h"
#include "CallerLogModel.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_ctl.h"
+#endif
#include "PhoneServiceC.h"
{
int32_t ret;
+ #ifdef SUPPORT_CAT1_SERVICE
if(!volte_voice_state())
{
return 0;
}
+ #endif
ret=AudioStreamOutSetMute(isMute);
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[AudioStreamOutSetMute] end! ret = %d", ret);
return 0;
#include "service_id_define.h"
#include "samgr_lite.h"
#include "ui_service.h"
-#include "cat1_server_hal.h"
#include "BluetoothModel.h"
#include "notification_manager.h"
#include "CallerLogModel.h"
#include "vibrator_service.h"
#include "gfx_utils/mem_api.h"
#include "ConfigModelC.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_ctl.h"
+#include "cat1_server_hal.h"
+#endif
#include "UiConfig.h"
#include "PhoneAGService.h"
#include "cmath"
BtA2dpSnkAudioDestroy();
sleep(1);//等待释放音频
}
+ #ifdef SUPPORT_CAT1_SERVICE
uapi_cat1_start_volte_voice();
+ #endif
usleep(5000);//等待释放音频
}
void cat1_audio_AudioRelease(void)
{
+ #ifdef SUPPORT_CAT1_SERVICE
uapi_cat1_stop_volte_voice();
+ #endif
sleep(1);//等待释放音频
}
static void AudioSetup(void)
{
//如果已经建立了cat1 媒体通路,不能再建立,SCO通路
+ #ifdef SUPPORT_CAT1_SERVICE
if(volte_voice_state())
{
return;
}
+ #endif
if (g_audioState < AUDIO_STREAM_START_DN) {
AudioDn();
}
#include "producttest/include/testPing.h"
#include "AlarmClockModel.h"
#include "cmsis_os2.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_server.h"
#include "cat1_ctl.h"
#include "cat1_server_hal.h"
+#endif
#include "custom_runtime.h"
#include "producttest/include/testView.h"
{
char hostname[20] = {0};
char result[256] = {0};
+ #ifdef SUPPORT_CAT1_SERVICE
get_ping_hostname(hostname,sizeof(hostname));
get_ping_result(result,sizeof(result));
+ #endif
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "result : %s ",result);
OHOS::testPingView *pview = OHOS::testPingView::GetInstance();
pview->sethostname(hostname);
\r
if(strcmp(view.GetViewId(),"dial_112") == 0)\r
{ \r
+ #ifdef SUPPORT_CAT1_SERVICE\r
testcat1View::GetInstance()->dial_112(true);\r
+ #endif\r
} \r
\r
if(strcmp(view.GetViewId(),"gray_card") == 0)\r
#include "producttest/include/testPresenter.h"\r
#include "power_display_service.h"\r
#include "wearable_log.h"\r
+#ifdef SUPPORT_CAT1_SERVICE\r
#include "cat1_server.h"\r
#include "cat1_ctl.h"\r
#include "cat1_server_hal.h"\r
+#endif\r
#include "custom_utils.h"\r
#include "custom_runtime.h"\r
namespace OHOS\r
\r
bool testView::ChangeCAT1TESTView(int16_t thisView)\r
{\r
+ #ifdef SUPPORT_CAT1_SERVICE\r
if (SystemScrollView[thisView] == nullptr)\r
{\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::ChangeCAT1TESTView");\r
SystemScrollView[thisView] = test_cat1_view->testcat1InitIView(thisView);\r
RootView::GetInstance()->Add(SystemScrollView[thisView]);\r
}\r
+ #endif\r
return true;\r
}\r
\r
#include "producttest/include/testabout.h"
#include "ConfigModel.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_server.h"
#include "cat1_ctl.h"
+#endif
#include "custom_runtime.h"
#include "producttest/include/testView.h"
#include "producttest/include/testbt.h"
#include "AlarmClockModel.h"
#include "cmsis_os2.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_server.h"
#include "cat1_ctl.h"
#include "cat1_server_hal.h"
+#endif
#include "custom_runtime.h"
#include "bts_br_gap.h"
#include "bts_le_gap.h"
#include "producttest/include/testcat1.h"
#include "AlarmClockModel.h"
#include "cmsis_os2.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_server.h"
#include "cat1_ctl.h"
#include "cat1_server_hal.h"
}
return testcat1ScrollView;
}
-}
\ No newline at end of file
+}
+
+#endif
#include "producttest/include/testhrsenson.h"
#include "AlarmClockModel.h"
#include "cmsis_os2.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_server.h"
#include "cat1_ctl.h"
#include "cat1_server_hal.h"
+#endif
#include "ppg_service.h"
#include "producttest/include/testView.h"
#ifdef __cplusplus
#include "broadcast_feature.h"
#include "broadcast_service.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_ctl.h"
#include "cat1_server.h"
+#include "lwip/apps/http_client.h"
+#endif
#include "custom_runtime.h"
#include "custom_utils.h"
#include "graphic_service.h"
#include "iostream"
-#include "lwip/apps/http_client.h"
#include "string"
#include "tcxo.h"
#include "thread_adapter.h"
static SafeModeManagerModel instance;
return &instance;
}
-
extern "C" {
+#ifdef SUPPORT_CAT1_SERVICE
#include "custom_http_download.h"
errcode_t http_single_download_stop(void);
rx_len, rx_total_len, file_total_len);
return 0;
}
-
// uir:
// http://snicker.com.cn:8089/FD230/V1.1.49/user/res/font_bin/ja.bin
// 服务器:snicker.com.cn:8089
return true;
}
+
+#endif
+
}
/* ---------------------------------- map修改 ---------------------------------
*/
//开始修复
bool SafeModeManagerModel::RepairStart() {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Repair");
+ #ifdef SUPPORT_CAT1_SERVICE
if (download_repair_file(GetRepairUrl().c_str()) == false) {
RepairEnd();
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RepairEnd");
return false;
}
+ #endif
return true;
}
// 0.下载失败
// 1.下载成功
bool SafeModeManagerModel::RepairEnd() {
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RepairEnd");
+ #ifdef SUPPORT_CAT1_SERVICE
+
if (GetRepairCount() != GetFilenamesCount()) {
//下载失败
SetState(Safe_State::REPAIR_FILE, false);
SetState(Safe_State::REPAIR_FILE, true);
uapi_dev_runtime_set_repair_download_status(2);
}
+ #endif
repair_count = 0;
return true;
}
/*\r
* @Author: luozheng 1732036298@qq.com\r
* @Date: 2024-03-30 18:29:43\r
- * @LastEditors: luozheng 1732036298@qq.com\r
- * @LastEditTime: 2024-08-28 19:55:18\r
+ * @LastEditors: SnickerSun snickersun@163.com\r
+ * @LastEditTime: 2024-12-29 13:24:13\r
* @FilePath: /FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/system/include/SystemPresenter.h\r
*/\r
\r
#include "system/include/SystemModel.h"\r
#include "components/ui_radio_button.h"\r
#include "KeyInputListener.h"\r
+#ifdef SUPPORT_CAT1_SERVICE\r
#include "../../../../../../zhihui/drivers/slip/cat1Service/cat1_ctl.h"\r
-\r
+#endif\r
namespace OHOS\r
{\r
\r
+#ifdef SUPPORT_CAT1_SERVICE
#ifndef SYSTEM_UPGRADE_VIEW_H
#define SYSTEM_UPGRADE_VIEW_H
bool initViewStatus{false};
};
} // namespace OHOS
-#endif
\ No newline at end of file
+#endif
+
+#endif
#include <fstream>
#include "cJSON.h"
#include "ConfigModel.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "lwip/err.h"
+#include "lwip/apps/http_client.h"
+#include "cat1_server.h"
+#endif
#include "power_display_service.h"
#include "cmsis_os2.h"
#include "los_memory.h"
#include "thread_init.h"
- #include "lwip/apps/http_client.h"
- #include "tcxo.h"
- #include "cat1_server.h"
- #include "linux/delay.h"
+#include "tcxo.h"
+#include "linux/delay.h"
#define UPDATAREPORT_M UPDATAREPORT
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView:: OnSetUpView has nullptr");\r
return;\r
}\r
+ #ifdef SUPPORT_CAT1_SERVICE\r
if (SystemUpdateModel::GetInstance().IsLatestVersion() == false) // 如果不是最新系统版本出现小圆点\r
{\r
NeedToUpdateImageinit();\r
}\r
+ #endif\r
container_->Add(SystemScrollView[SYSTEMVIEW]);\r
Draw();\r
}\r
+#ifdef SUPPORT_CAT1_SERVICE
#include "system/include/Systemupgrade.h"
#include "system/include/SystemPresenter.h"
#include "wearable_log.h"
#include "cJSON.h"
#include "ConfigModel.h"
#include "lwip/err.h"
+#include "lwip/apps/http_client.h"
+#include "cat1_server.h"
#include "power_display_service.h"
#include "cmsis_os2.h"
#include "los_memory.h"
#include "thread_init.h"
- #include "lwip/apps/http_client.h"
- #include "tcxo.h"
- #include "cat1_server.h"
- #include "linux/delay.h"
+#include "tcxo.h"
+#include "linux/delay.h"
//http://r-oss.thisiot.com/device-ota/2024_05_06/1787425705369333762.fwpkg?Expires=1714998097&OSSAccessKeyId=LTAI5tJa2arDBmqSUsSTQJ1T&Signature=eLmtuPN10YXS8pNUtJO2E2vt%2FPM%3D
return scrollView;
}
-}
\ No newline at end of file
+}
+
+#endif
#include "tcxo.h"
#include "cat1_server.h"
#include "linux/delay.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_ctl.h"
+#endif
#include "AppViewIDs.h"
#include "NativeAbility.h"
namespace OHOS
/*
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-05-07 11:25:58
- * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-11-05 14:48:11
+ * @LastEditors: SnickerSun snickersun@163.com
+ * @LastEditTime: 2024-12-29 13:24:54
* @FilePath: /FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/systemupdate/src/SystemUpdateView.cpp
*/
#include "tcxo.h"
#include "cat1_server.h"
#include "linux/delay.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_ctl.h"
#include "cat1_server_hal.h"
+#endif
#include "bts_le_gap.h"
#include "custom_http_download.h"
#endif\r
#endif\r
\r
+#ifdef SUPPORT_CAT1_SERVICE\r
#define SUPPORT_CAT1_MODEM\r
+#endif\r
\r
#ifndef BROADCAST_FEATURE_NAME\r
#define BROADCAST_FEATURE_NAME "BROADCAST"\r
#include "VolumeSettingPresenter.h"
#include "PhoneService.h"
#include "power_display_service.h"
-#include "cat1_server.h"
#include "testchanging.h"
#include "message_notification.h"
#include "main/include/PullUpDownView.h"
#include "player/include/PlayersModelC.h"
#include "system/include/SystemLogModelC.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_ctl.h"
+#include "cat1_server.h"
+#endif
#include "ui_service.h"
#include "UiConfig.h"
#include "bluetooth/include/BluetoothModel.h"
#include "broadcast_feature.h"
#include "broadcast_service.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_ctl.h"
#include "cat1_server.h"
+#include "lwip/apps/http_client.h"
+#endif
#include "components/ui_image_view.h"
#include "components/ui_label_button.h"
#include "components/ui_label_ext.h"
#include "custom_runtime.h"
#include "custom_utils.h"
#include "graphic_service.h"
-#include "lwip/apps/http_client.h"
+
#include "notification_manager.h"
#include "samgr_lite.h"
#include "system/include/SystemLogModel.h"
#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_server.h"
#include "cat1_ctl.h"
+#include "cat1_server_hal.h"
#endif
#include "custom_runtime.h"
-#include "cat1_server_hal.h"
#include "custom_utils.h"
#include "phoneaddressmodel.h"
#include "components/ui_label_button.h"
{
if(OHOS::get_sos_number_count()<=0)
{
+ #ifdef SUPPORT_CAT1_SERVICE
calldial_event_sendmsg_toUI("SOS");
+ #endif
return;
}
printf("sos dial %d\r\n",sos_dail_falg);
+ #ifdef SUPPORT_CAT1_SERVICE
#if SOS_TEST_FLAG
if(1)
#else
{
calldial_event_sendmsg_toUI("SOS");
}
+ #else
+ if(uapi_hfp_connect_state())
+ {
+ DialCall((unsigned char *)OHOS::get_sos_number(sos_dail_falg),osal_strlen((const char*)OHOS::get_sos_number(sos_dail_falg)));
+ }
+ #endif
sos_dail_falg++;
if(sos_dail_falg>=OHOS::get_sos_number_count()*3)
{
{
if(OHOS::get_sos_number_count()<=0)
{
+ #ifdef SUPPORT_CAT1_SERVICE
calldial_event_sendmsg_toUI("SOS");
+ #endif
return;
}
+ #ifdef SUPPORT_CAT1_SERVICE
#if SOS_TEST_FLAG
if(1)
#else
#endif
{
calldial_event_sendmsg_toUI(OHOS::get_sos_number(0));
- sos_dail_falg=1;
+ sos_dail_falg=1;
}
#if SOS_HFP_FALG
else if(uapi_hfp_connect_state())
{
calldial_event_sendmsg_toUI("SOS");
}
+ #else
+ if(uapi_hfp_connect_state())
+ {
+ DialCall((unsigned char *)OHOS::get_sos_number(0),osal_strlen((const char*)OHOS::get_sos_number(0)));
+ sos_dail_falg=1;
+ }
+
+ #endif
}
// CallerLogModel::GetInstance()->SetCallSource(CallerLogModel::CallSource::CallSourceCat1);
NotificationManager::GetInstance()->SetWatchCallStatus(true);
+ #ifdef SUPPORT_CAT1_SERVICE
cat1_call_hungup();
+ #endif
CustomEventPublish(TOPIC_EVENT_HFP_HINT,NULL,0);
CallerLogModel::GetInstance()->set_RejectIncomingCall_falg(1);
return;
dail_falg++;
if(dail_falg>=DIAL_TIME)
{
+ #ifdef SUPPORT_CAT1_SERVICE
cat1_call_hungup_timer();
-
+ #endif
// cat1_handle_call_disconnected((char *)CallerLogModel::GetInstance()->GetPhoneNumber().c_str());
}
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "[AcceptIncomingCall] start");
+ #ifdef SUPPORT_CAT1_SERVICE
incomedcall_event_sendmsg_toUI("ok");
-
cat1_call_answer();
+ #endif
//#endif
}
// The watch rejects the call
if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1)
{
+ #ifdef SUPPORT_CAT1_SERVICE
cat1_call_hungup();
+ #endif
addcalllog();
NotificationManager::GetInstance()->StopNotify();
if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1)
{
+ #ifdef SUPPORT_CAT1_SERVICE
cat1_call_hungup();
+ #endif
NotificationManager::GetInstance()->StopNotify();
}
],
#添加自定义应用
'ram_component': [
- #'baidumapsdk',
'audio_at_service',
'media_at_service',
'bt_manager_at_service',
'MAG_MMC5603',
'ENABLE_VIBRATOR',
# 'ENABLE_SLIP',
- # 'CUSTOM_HID_SERVICE',
+ 'CUSTOM_HID_SERVICE',
'ENCODER_SUPPORT',
'SUPPORT_SPO2_NOTIFICATION',
'SUPPORT_SPO2_NOTIFICATION_TEST',
# 'SUPPORT_TCPIP',
'SUPPORT_HID_SERVICE',
'SUPPORT_BAIDU_MAP',
- 'CFG_FLASH_SIZE=8',
- # 'SUPPORT_BLE_SERVICE',
- # 'FD230',
+ 'CFG_FLASH_SIZE=16',
+ 'SUPPORT_BLE_SERVICE',
+ 'FD230',
#"MEM_CHECK",
#'ENABLE_WEBSOCKET',
'SINGLE_USER_PARTITION',
'NANDFLASH_DS35X'
],
'ram_component': [
- #'baidumapsdk',
'audio_at_service',
'media_at_service',
'bt_manager_at_service',
# "slip",
# "cat1_service",
"audio_manager",
- # "CustomUIcomponentTool",
+ "CustomUIcomponentTool",
"custom_utils",
"custom_utilscpp",
"custom_config",
"ppg_service",
# "acc_sensor",
"batterry_service",
- # "bleservice",
- # "ppgBleService",
- # "blemoder",
- # "factorytest_service",
- # "hid_service",
+ "bleservice",
+ "ppgBleService",
+ "blemoder",
+ "factorytest_service",
+ "hid_service",
"gnss",
"gnss_sample",
"cywee",
'brandy-native-js-u8-r': {
'base_target_name': 'brandy-native-js-r',
'defines': ['FT_SINGLE_UART',
- 'CFG_FLASH_SIZE=8',
+ 'CFG_FLASH_SIZE=16',
'SINGLE_USER_PARTITION',
'BOARD_U8',
'TPTYPE_CST86XX',
'defines': ['ENABLE_ECC',
'CFG_DRIVERS_NANDFLASH',
'SINGLE_USER_PARTITION',
- 'CFG_FLASH_SIZE=8',
+ 'CFG_FLASH_SIZE=16',
'FT_SINGLE_UART',
'BOARD_U8',
'NANDFLASH_DS35X'
#include "phoneaddressmodel.h"
#include "LanguageInit.h"
#include "ConfigModel.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_server.h"
+#endif
// #include "TraingCardPresenter.h"
#include "../../../../../../zhihui/drivers/vibrator/service/vibrator_service.h"
#include "../../../../../../zhihui/config/include/ConfigModelC.h"
}
void SendDtfmStrNumberToCat1(char ch) // ble发送单个字符到CAT1 DTMF功能
{
+ #ifdef SUPPORT_CAT1_SERVICE
send_dtfm_number_toCat1(ch);
+ #endif
}
void ble_mp3_list_update(void)
* @Author: penglei 1624952103@qq.com\r
* @Date: 2024-06-17 14:31:08\r
* @LastEditors: SnickerSun snickersun@163.com\r
- * @LastEditTime: 2024-12-29 13:11:17\r
+ * @LastEditTime: 2024-12-29 20:45:38\r
* @FilePath: /FD230/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c\r
* @Description: \r
* \r
#include "hx3695.h"\r
#include "ppg_service.h"\r
#include "button_porting.h"\r
+#ifdef SUPPORT_CAT1_SERVICE\r
#include "cat1_ctl.h"\r
#include "cat1_server.h"\r
-\r
+#endif\r
#ifdef PPG_HX3695\r
#include "hx3695_hrs_agc.h"\r
#include "hx3695_spo2_agc.h"\r
for(int i = 0; i < 11; i++) \r
phone_number[i] = data[i] + '0';\r
phone_number[11] = '\0';\r
-\r
- cat1_call_dial(phone_number); \r
+#ifdef SUPPORT_CAT1_SERVICE\r
+ cat1_call_dial(phone_number); \r
+#endif \r
factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_SOFT_TEST,\r
BLE_TEST_CMD_SOFT_TEST_SUB_MODE_CAT1,\r
0x07,\r
//接听电话\r
uint8_t send_data = 0x00;\r
\r
+#ifdef SUPPORT_CAT1_SERVICE\r
cat1_call_answer();\r
-\r
+#endif\r
factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_SOFT_TEST,\r
BLE_TEST_CMD_SOFT_TEST_SUB_MODE_CAT1,\r
0x08,\r
{\r
//挂断电话\r
uint8_t send_data = 0x00;\r
+#ifdef SUPPORT_CAT1_SERVICE\r
cat1_call_hungup();\r
-\r
+#endif\r
factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_SOFT_TEST,\r
BLE_TEST_CMD_SOFT_TEST_SUB_MODE_CAT1,\r
0x09,\r
{\r
//获取校准信息\r
uint8_t send_data = 0;\r
+#ifdef SUPPORT_CAT1_SERVICE\r
cat1_at_cmd("at*mrd_cdf=Q,LteCalData.nvm");\r
LOS_Msleep(500);\r
ble_get_cat1_at_msg((char *)&send_data,1);\r
+#endif\r
if(send_data == '1')\r
send_data = 1;\r
else\r
{\r
//设置强收模式\r
uint8_t send_data = 0;\r
+#ifdef SUPPORT_CAT1_SERVICE\r
cat1_at_cmd("at+QRFTESTMODE=1");\r
LOS_Msleep(500);\r
ble_get_cat1_at_msg((char *)&send_data,1);\r
+#endif\r
if(atol(send_data) == 0)\r
send_data = 1;\r
else\r
//查询信号值\r
char buf[20] = {0};\r
uint8_t send_data[2] = {0};\r
+#ifdef SUPPORT_CAT1_SERVICE\r
cat1_at_cmd("AT+QRXFTM=\"LTE BAND1\",300,\"on\",75");\r
LOS_Msleep(500);\r
ble_get_cat1_at_msg(buf,20);\r
+#endif\r
sscanf(buf, "+QRXFTM: -%d,-%d", (int *)&send_data[0], (int *)&send_data[1]);\r
factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_SOFT_TEST,\r
BLE_TEST_CMD_SOFT_TEST_SUB_MODE_CAT1,\r
{\r
//关闭强接受\r
uint8_t send_data = 0;\r
+#ifdef SUPPORT_CAT1_SERVICE\r
cat1_at_cmd("AT+QRXFTM=\"LTE BAND1\",300,\"off\",75");\r
LOS_Msleep(500);\r
ble_get_cat1_at_msg((char *)&send_data,1);\r
+#endif\r
if(atol(send_data) == 0)\r
send_data = 1;\r
else\r
extern "C" {
#endif /* __cplusplus */
#include "errcode.h"
+#ifdef SUPPORT_CAT1_SERVICE
#include "lwip/apps/http_client.h"
-
/**
* uint8_t *server,
* uint16_t port,
* stop函数要在result里面执行,表示下载结束
*/
errcode_t http_single_download_stop(void);
+#endif
#ifdef __cplusplus