#include "BluetoothWrapper.h"\r
#endif\r
#include "Bluetooyhpabpserver.h"\r
-#include "bletest.h"\r
+\r
+\r
+#ifdef BLE_INSTRUCT\r
+#include "bleInstruct.h"\r
+#endif\r
+\r
+\r
#include "ConfigModelC.h"\r
#include "uiservice/include/ui_service.h"\r
#include "vibrator_service.h"\r
*/
#include "findphone/include/FindPhoneModel.h"
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
#include <custom_runtime.h>
#include "wearable_log.h"
#include "bleEvent.h"
#include "wearable_log.h"
#include "findphone/include/FindPhoneModel.h"
#include "UiConfig.h"
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
#include "bleEvent.h"
#include "ui_resource_string.h"
#include "uicomponents/UIComponents.h"
#endif
#include "custom_utils.h"
#include "phoneaddressmodel.h"
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
#include "ui_resource_string.h"
#include "PhoneAGService.h"
#endif
#include "custom_utils.h"
#include "phoneaddressmodel.h"
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
#include "NativeAbility.h"
#include "dial_sos_c.h"
#include "soundandvibration/include/SoundAndVibrationVolumeSettingC.h"
#include "CallerLogModel.h"
#include "MainCallingPresenter.h"
#include "ui_resource_string.h"
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+#endif
#include "custom_utils.h"
#include "wearable_log.h"
#ifndef MESSAGE_MODEL_H
#define MESSAGE_MODEL_H
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
#include "message/include/MessagePresenter.h"
#include <cstdint>
#include <map>
#include <vector>
+#include "bleANCS.h"
+
namespace OHOS {
// 消息数据结构体
struct MessageData {
#include "ConfigModel.h"
#include "bleEvent.h"
-#include "bletest.h"
+
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
#include "broadcast_feature.h"
#include "broadcast_service.h"
#include "custom_runtime.h"
#include "traing/training_card/include/TrainingDataView.h"\r
#include "traing/training_card/include/TrainingDetailView.h"\r
\r
-#include "bletest.h"\r
+\r
+#ifdef BLE_INSTRUCT\r
+#include "bleInstruct.h"\r
+#endif\r
+\r
#include "components/root_view.h"\r
#include "components/ui_swipe_view.h"\r
#include "components/ui_view.h"\r
#ifndef GOAL_NOTIFICATION_H
#define GOAL_NOTIFICATION_H
// #include "components/ui_image_animator.h"
-#include "bletest.h"
+
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
#include "components/ui_view_group.h"
namespace OHOS
#ifndef TRANSMITTING_H
#define TRANSMITTING_H
#include "components/ui_image_animator.h"
-#include "bletest.h"
+
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
#include "components/ui_view_group.h"
namespace OHOS
#include "testhrsenson.h"
#include "ConfigModel.h"
#include "power_display_service.h"
-#include "bletest.h"
+
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
//#include "TraingCardPresenter.h"
#include "custom_runtime.h"
#include "custom_utils.h"
#include "custom_utils.h"
#include "phoneaddressmodel.h"
#include "components/ui_label_button.h"
-#include "bletest.h"
+
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
#include "NativeAbility.h"
#include "dial_sos_c.h"
#include <string>
'CONFIG_DFX_SUPPORT_DIAG_UP_MACHINE=1',
'TPTYPE_FT6X46',
'ROTARYENCODER_HX3507',
- 'NANDFLASH_DS35X'
+ 'NANDFLASH_DS35X',
+ 'BLE_INSTRUCT',
+ 'FACTORYTEST_SERVICE',
],
#添加自定义应用
'ram_component': [
#'ROTARYENCODER_HX3507',
'ROTARYENCODER_U8',
'FUNC_KEY2',
- 'NANDFLASH_DS35X'
+ 'NANDFLASH_DS35X',
+ 'BLE_INSTRUCT',
+ 'FACTORYTEST_SERVICE',
],
'ram_component': [
'audio_at_service',
'SUPPORT_HID_SERVICE',
'SUPPORT_BAIDU_MAP',
'CFG_FLASH_SIZE=8',
- # 'SUPPORT_BLE_SERVICE',
+ 'SUPPORT_BLE_SERVICE',
# 'FD230',
#"MEM_CHECK",
#'ENABLE_WEBSOCKET',
'TEST_4G_UI',
'NANDFLASH_F35UQA',
'PPG_VC921X',
- 'ROTARYENCODER_HX3509'
+ 'ROTARYENCODER_HX3509',
+ 'FACTORYTEST_SERVICE',
+ # 'BLE_INSTRUCT'
+
],
'ram_component': [
#'baidumapsdk',
"gnss",
"gnss_sample",
# "acc_sensor",
- "batterry_service",
- # "bleservice",
- # "ppgBleService",
+ "batterry_service",
+ "bleservice",
+ "ppgBleService",
# "blemoder",
- # "factorytest_service",
- # "hid_service",
+ "factorytest_service",
+ "hid_service",
"producttest",
"cywee",
"charge_ic",
#include "ble_gatts_callbacks.h"
#include "bts_uuid.h"
#include "ble_hid_take_photo_server.h"
-
+#ifndef SUPPORT_HID_SERVICE
/* HID information flag remote wakeup */
#define BLE_HID_INFO_FLAG_REMOTE_WAKE_UP_MSK 0x01
/* HID information flag normally connectable */
return;
}
g_hid_input_report_att_hdl = srvc_handle + BLE_HID_CHARACTER_INPUT_REPORT_VALUE_HANDLE_OFFSET;
-}
\ No newline at end of file
+}
+
+#endif
\ No newline at end of file
${ROOT_DIR}/middleware/services/gui/uikit/ui/frameworks
${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/utils/innerkits
+ ${ROOT_DIR}/zhihui/services/factorytest_service
# /home/hcj/615/FD230/code/sdk/application/wearable/nativeapp/nativeui/player/include/PlayersPresenter.h
# /home/hcj/615/FD230/code/sdk/middleware/services/gui/uikit/ui/frameworks/font/glyphs_manager.h
# /home/hcj/615/FD230/code/sdk//UiServersMsg.h
)
+# /home/hcj/615/FD230/code/sdk/
+
if("FD230" IN_LIST DEFINES)
set(PRIVATE_HEADER
${PRIVATE_HEADER}
${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarmclockmanage/include
${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/include
${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/player/include
+ ${ROOT_DIR}/zhihui/services/factorytest_service
)
else()
set(PRIVATE_HEADER
${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarmclockmanage/include
${ROOT_DIR}/application/wearable/nativeapp/nativeui/alarmclocktimerconfig/include
${ROOT_DIR}/application/wearable/nativeapp/nativeui/player/include
+ ${ROOT_DIR}/zhihui/services/factorytest_service
)
endif()
TP,\r
MAGETIC,\r
LUMINANCE,\r
- CHAR,\r
+ CHARG,\r
SPEAK,\r
MOTOR,\r
#ifdef SUPPORT_CAT1_MODEM\r
testCHANINGView *test_charging_view{nullptr};\r
testSPEAKView *test_speak_view{nullptr};\r
testMOTORView *test_motor_view{nullptr};\r
- #ifdef SUPPORT_CAT1_MODEM\r
- testcat1View *test_cat1_view{nullptr};\r
- #endif\r
+ // #ifdef SUPPORT_CAT1_MODEM\r
+ testcat1View *test_cat1_view{nullptr};\r
+ // #endif\r
testbuttonView *test_KEY_view{nullptr};\r
testMagicView *test_MG_view{nullptr};\r
testhrsenson1View *test_hr_view{nullptr};\r
#include "components/ui_label_ext.h"
#include "components/ui_image_view.h"
#include "producttest/include/testmagnetic.h"
-#include "CompassModel.h"
+// #include "CompassModel.h"
#include "components/ui_label_button_ext.h"
//#include "cmsis_os.h"
#include <iostream>
private:
UILabelButtonExt *SetTheButton_ext(ButtonConfig_ext_t &buttonconfig);//, UIView::OnTouchListener *clickListener);
UILabel *InitLabel(LabelConfig &labelConfig);
- bool tesScat1ScrollViewcrollViewinit(uint8_t);
+ bool testhrsensonScrollViewcrollViewinit(uint8_t);
UIScrollView *testhrsensonScrollView{nullptr};
UILabel *label_1_cat1msg_1=NULL;
// UILabel *label_1_cat1msg_oper{nullptr};
#include "components/ui_label_ext.h"
#include "components/ui_image_view.h"
#include "producttest/include/testmagnetic.h"
+#ifdef FD230
#include "CompassModel.h"
+#endif
#include "components/ui_label_button_ext.h"
//#include "cmsis_os.h"
#include <iostream>
#include "components/ui_label_button_ext.h"
//#include "cmsis_os.h"
+
+
#include <iostream>
namespace OHOS
{
#include "AppViewIDs.h"\r
#include "components/ui_label_ext.h"\r
-#include"ui_resource_string.h"\r
+#ifdef FD230\r
+ #include"ui_resource_string.h"\r
+#endif\r
+\r
#include "NativeAbility.h"\r
#include "graphic_math.h"\r
#include "string.h"\r
#include "producttest/include/testPresenter.h"\r
#include "font/font_global_manager.h"\r
#include "font/ui_font.h"\r
-#include "languagecode/LanguageInit.h"\r
+#ifdef FD230\r
+ #include "languagecode/LanguageInit.h"\r
+#endif\r
#include "../../../../../../zhihui/utils/custom_utils.h"\r
#include "power_display_service.h"\r
#include "components/ui_slider.h"\r
\r
#include "audio_capture_wrapper.h"\r
#include "cywee_service.h"\r
-#include "factorytest_protocol.h"\r
+\r
+#ifdef FD230\r
+ #include "factorytest_protocol.h"\r
+#endif\r
+\r
+\r
+\r
#include "custom_runtime.h"\r
#include "gnss_ctl.h"\r
\r
{ \r
if(uapi_dev_runtime_get_cat1_powerstat())\r
uapi_set4GCapability(false);\r
- factorytest_start_aging_test();\r
+ #ifdef FD230\r
+ factorytest_start_aging_test();\r
+ #endif\r
}\r
if(strcmp(view.GetViewId(),"stop") == 0)\r
{ \r
- factorytest_stop_aging_test();\r
+ #ifdef FD230\r
+ factorytest_stop_aging_test();\r
+ #endif\r
}\r
if(strcmp(view.GetViewId(),"exit") == 0)\r
{ \r
- NativeAbility::GetInstance().ChangeSlice(VIEW_TEST);\r
+ for (int i = 1; i < MAX_TESTVIEWID; i++)\r
+ {\r
+ if (p_SystemView->GetSystemScrollView(i))\r
+ {\r
+ p_SystemView->ChangeView(i, TESTVIEW);\r
+ break;\r
+ }\r
+ }\r
+ return true;\r
}\r
if(strcmp(view.GetViewId(),"deep") == 0)\r
{ \r
\r
#include "custom_utils.h"\r
#include "custom_runtime.h"\r
+\r
+\r
+#ifdef FD230\r
+ #include "factorytest_protocol.h"\r
+#endif\r
+\r
namespace OHOS\r
{\r
\r
{TP,"TPButton","TP","TPButton_next", &testView::ChangeTPTESTView,true},\r
{MAGETIC,"MAGETICButton","Magetic","MAGETICButton_next", &testView::ChangeMGTESTView,true},\r
{LUMINANCE,"luminanceButton","luminance","luminanceButton_next", &testView::ChangLUMTESTView,true},\r
- {CHAR,"chargingButton","bat&charger","chargingButton_next",&testView::ChangchargingTESTView,true},\r
+ {CHARG,"chargingButton","bat&charger","chargingButton_next",&testView::ChangchargingTESTView,true},\r
{SPEAK,"speakButton","speak","speakButton_next" ,&testView::ChangspeakTESTView,true},\r
\r
{MOTOR,"motorButton","motor","motorButton_next" ,&testView::ChangmotorTESTView,true},\r
{PingTest,"PingTestbutton","PingTest","PingTestbutton_next" ,&testView::ChangePingTESTView,true},\r
\r
{GPSTEST,"GPSTestbutton","GPSTest","GPSTestbutton_next" ,&testView::ChangeGPSTESTView,true},\r
-\r
+ #ifdef AGINGTEST\r
{OLDTEST,"oldtestbutton","aging" ,"oldtestexit",&testView::ChangeoldTESTView,true},\r
+ #endif\r
{DEEPSLEEP,"deepsleep","DeepSleepCurrent","xxxxxxxxx" ,&testView::ChangeoldTESTView,true},\r
{shutdown,"shutdown","shutdown", "xxxxxxxxx",&testView::ChangeoldTESTView,true},\r
{RESET,"reset","reset", "xxxxxxxxx",&testView::ChangeoldTESTView,true},\r
}\r
return true;\r
}\r
+ \r
\r
bool testView::ChangeoldTESTView(int16_t thisView)\r
{\r
+ #ifdef AGINGTEST\r
if (SystemScrollView[thisView] == nullptr)\r
{\r
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemView::ChangeoldTESTView");\r
SystemScrollView[thisView] = test_old_view->testoldInitIView(thisView);\r
RootView::GetInstance()->Add(SystemScrollView[thisView]);\r
}\r
+ #endif\r
return true;\r
+ \r
}\r
+ \r
\r
bool testView::ChangeBTTESTView(int16_t thisView)\r
{\r
test_lum_view = nullptr;\r
SystemScrollView[hideView]=nullptr;\r
break;\r
- case CHAR:\r
+ case CHARG:\r
RootView::GetInstance()->Remove(SystemScrollView[hideView]);\r
delete test_charging_view; \r
test_charging_view = nullptr;\r
#include "custom_runtime.h"
#include "bts_br_gap.h"
#include "bts_le_gap.h"
+
#include "bleService.h"
+
#include "BluetoothModel.h"
#include "producttest/include/testView.h"
#ifdef __cplusplus
}
bool ret = gap_br_cancel_discovery();
-
- BluetoothModel::GetInstance()->set_test_bt_falg(false);
+ #ifdef FD230
+ BluetoothModel::GetInstance()->set_test_bt_falg(false);
+ #endif
uint8_t cnt = pm_veto_get_id_cnt(PM_ID_P_TEST);
if (cnt == 1) {
bool ret = gap_br_start_discovery();
BluetoothModel::GetInstance()->SortScansCaseRssi();
- BluetoothModel::GetInstance()->set_test_bt_falg(true);
+ #ifdef FD230
+ BluetoothModel::GetInstance()->set_test_bt_falg(true);
+ #endif
+
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"gap_br_start_discovery bool %d!\n",ret);
#endif
button->SetText("scaning");
- bool testhrsenson1View::tesScat1ScrollViewcrollViewinit(uint8_t id)
+ bool testhrsenson1View::testhrsensonScrollViewcrollViewinit(uint8_t id)
{
testhrsensonScrollView = new UIScrollView();
UIScrollView *testhrsenson1View::testhrsensonInitIView(uint8_t id)
{
- if (!tesScat1ScrollViewcrollViewinit(id))
+ if (!testhrsensonScrollViewcrollViewinit(id))
{
return nullptr;
}
if(testmagicScrollView)
{
testmagicScrollView->RemoveAll();
+#ifdef FD230
#ifndef TEST_BATTERY
CompassModel::GetInstance()->CloseCompassSensor();
+#endif
#endif
if (magneyic_TEST_timer != NULL) {
osTimerStop(magneyic_TEST_timer);
{
uint32_t tick;
osStatus_t retTimer;
+#ifdef FD230
#ifndef TEST_BATTERY
CompassModel::GetInstance()->OpenCompassSensor();
+#endif
#endif
testmagicScrollView = new UIScrollView();
if (testmagicScrollView == nullptr)
#include "cmsis_os2.h"
#include "audio_capture_wrapper.h"
#include "producttest/include/testView.h"
-#include "findwatch_notification.h"
+#ifdef FD230
+ #include "findwatch_notification.h"
+#endif
#ifdef __cplusplus
#if __cplusplus
extern "C"
else if(makphone_falg==1)
{
#ifndef AUDIO_ECHO_TEST
+#ifdef FD230
int32_t argc = 1;
uint8_t *argv = (uint8_t*)"stop";
AudioCaptureSample(argc, (const char **)&argv);
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ffffffffffffffffsssssss");
}
fclose(file);
+#endif
#else
uapi_stop_audio_test();
button[0]->SetText("start");
#endif
}
#ifndef AUDIO_ECHO_TEST
+#ifdef FD230
else if(makphone_falg==2)
{
button->SetText("stop play");
FindWatchViewEventListener::GetInstance().PopInterCancelMusic();
makphone_falg = 0;
}
+#endif
#endif
}
void check_mic(bool isopen)
{
+ #ifdef FD230
if(isopen)
{
// AlarmClockModel::GetInstance()->testPlayerStart("/user/userdata/microphone.mp3");
+
FindWatchViewEventListener::GetInstance().setVolumeVal(100);
FindWatchViewEventListener::GetInstance().PopInterPlayMusic_product("/user/userdata/microphone.mp3");
// AlarmClockModel::GetInstance()->AlarmPlayerStart();
FindWatchViewEventListener::GetInstance().PopInterCancelMusic_product();
// AlarmClockModel::GetInstance()->AlarmPlayerStop();
}
+ #endif
}
#include "AlarmClockModel.h"
#include "cmsis_os2.h"
#include "producttest/include/testView.h"
-#include "factorytest_protocol.h"
+
+#ifdef FD230
+ #include "factorytest_protocol.h"
+#endif
+
+#ifdef AGINGTEST
+
+// #ifdef AGINGTEST
namespace OHOS
{
static testoldView *g_pSystemAboutTheWatchView{nullptr};
static osTimerId_t g_aging_timer=NULL;
+
+ #ifdef FD230
static ble_aging_t aging_t;
+ #endif
+
+
testoldView::testoldView()
{
}
-}
\ No newline at end of file
+}
+
+#endif
\ No newline at end of file
#include <sys/time.h>
#ifdef SUPPORT_BLE_SERVICE
-#include "bletest.h"
+
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
#include "bleANCS.h"
#endif
#include "custom_utils.h"
set(COMPONENT_NAME "blemoder")
set(PUBLIC_HEADER
-${CMAKE_CURRENT_SOURCE_DIR}
-)
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ )
set(PRIVATE_HEADER
-${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/innerkits
-${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits
-${ROOT_DIR}/application/wearable/nativeapp/nativeui/heartrate/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/weather/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/heart_blood/health_service
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/sleep/include/
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/phone/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/languagecode/
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/language
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/traing/training_card/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/config/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/traing/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/uiservice/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/codedlock/include
+ ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/innerkits
+ ${ROOT_DIR}/middleware/services/gui/uikit/utils/interfaces/kits
+ ${ROOT_DIR}/application/wearable/nativeapp/nativeui/heartrate/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/weather/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/heart_blood/health_service
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/sleep/include/
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/phone/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/languagecode/
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/language
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/traing/training_card/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/config/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/traing/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/uiservice/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/codedlock/include
#${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarm/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarmclockmanage/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarmclockmanage/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/include
#code/sdk/middleware/services/gui/uikit/proprietary/src/utils/innerkits/hals/gralloc_engines.h
#/home/hcj/FD230/code/sdk/open_source/openharmony/drivers/peripheral/display/interfaces/include/display_gralloc.h
-${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
-${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src
-${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/utils/innerkits
-${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include
-${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include/common
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/set_dial/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/aivoice/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarm/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/musicplayer/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/schedule/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/bluetooth/include
-${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/innerkits
-${ROOT_DIR}/application/wearable/nativeapp/nativeui/alipay/include
+ ${ROOT_DIR}/open_source/openharmony/drivers/peripheral/display/interfaces/include
+ ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src
+ ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/src/utils/innerkits
+ ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include
+ ${ROOT_DIR}/middleware/services/gui/uikit/proprietary/include/common
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/set_dial/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/aivoice/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alarm/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/musicplayer/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/schedule/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/bluetooth/include
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/interfaces/innerkits
+ ${ROOT_DIR}/application/wearable/nativeapp/nativeui/alipay/include
# /home/hcj/FD230/code/sdk/middleware/services/gui/uikit/ui/interfaces/innerkits/engines/gfx/gfx_engine_manager.h
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alipay/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/alipay/include
# /home/hcj/FD230/code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayModel.h
#/home/hcj/FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarm/include/AlarmClockModel.h
#/home/hcj/FD230/code/sdk/middleware/services/media/foundation/player/interfaces/kits/player.h
#/home/hcj/FD230/code/sdk/middleware/services/gui/uikit/surface/interfaces/kits/surface.h
# ${ROOT_DIR}/middleware/services/media/foundation/player/interfaces/kits
# ${ROOT_DIR}/middleware/services/gui/uikit/surface/interfaces/kits
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/player/include
-${ROOT_DIR}/application/wearable/fd230/nativeapp/nativelauncher/include
-${ROOT_DIR}/middleware/services/gui/uikit/ui/frameworks
-# ${ROOT_DIR}/middleware/services/gui/uikit/surface/interfaces/kits
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativeui/player/include
+ ${ROOT_DIR}/application/wearable/fd230/nativeapp/nativelauncher/include
+ ${ROOT_DIR}/middleware/services/gui/uikit/ui/frameworks
+ # ${ROOT_DIR}/middleware/services/gui/uikit/surface/interfaces/kits
# /home/hcj/FD230/code/sdk/middleware/services/gui/uikit/surface/interfaces/kits/ibuffer_consumer_listener.h
# /home/hcj/FD230/code/sdk/middleware/services/gui/uikit/ui/frameworks/common/typed_text.h
)
set(SOURCES
-#${CMAKE_CURRENT_SOURCE_DIR}/bletest.cpp
-${CMAKE_CURRENT_SOURCE_DIR}/bletest.cpp
+${CMAKE_CURRENT_SOURCE_DIR}/bleInstruct.cpp
)
set(COMPONENT_PUBLIC_CCFLAGS
#include "samgr_lite.h"
#include "thread_adapter.h"
#include "graphic_service.h"
-#include "health_service.h"
-#include "phoneaddressmodel.h"
-#include "LanguageInit.h"
+
+
+
#include "ConfigModel.h"
#ifdef SUPPORT_CAT1_SERVICE
#include "cat1_server.h"
#include "../../../../../../zhihui/utils/custom_runtime.h"
#ifdef FD230
-
#include "uiservice/include/ui_service.h"
#include "TraingModel.h"
#include "WeatherModel.h"
#include "font/ui_font.h"
#include "font/base_font.h"
#include "common/typed_text.h"
-
+#include "health_service.h"
#include "AlipayC.h"
#include "PlayersModelC.h"
-
-
-#endif
+#include "LanguageInit.h"
+#include "phoneaddressmodel.h"
#include "AlmmgrAlarmClockManage.h"
#include "AlarmClockTimerConfig.h"
#include "AlarmClockManage.h"
-
#include "SetDialModel.h"
-//#include "AlarmClockModel.h"
#include "AiVoiceModel.h"
#include "SleepModel.h"
#include "BluetoothModel.h"
#include "MusicPlayerModel.h"
#include "UiConfig.h"
-// #include "AlarmClockModel.h"
-//#include "AlarmClockModel.h"
+#endif
+
+
+
+
+
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#include "custom_utils.h"
#include "string.h"
#include "bleService.h"
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
#include <cywee_hal.h>
#include <dirent.h>
{
SendMsgToUIService(UI_UPDATE_WEATHER_DATA,0,nullptr,0);
}
-message_infor_t message_infor_s;
-void read_message_data(void)
-{
- if(!creatMessageDir())//创建失败
- {
- return;
- }
- uint32_t data_len = 0;
- FILE *jsfile = fopen(ANCS_DATA_CJSON_PATH, "r");
- cJSON *data_root;
- if (jsfile != NULL) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"succes opening file\n");
- fseek(jsfile, 0, SEEK_END);
- long fileSize = ftell(jsfile);
- fseek(jsfile, 0, SEEK_SET);
-
- char *jsonData = (char *)malloc(fileSize + 1);
- fread(jsonData, 1, fileSize, jsfile);
- jsonData[fileSize] = '\0';
- fclose(jsfile);
-
- // 解析JSON数据
- // WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"jsonData %s",jsonData);
- data_len = strlen(jsonData);
- data_root= cJSON_Parse(jsonData);
- free(jsonData);
- if(data_len > 0)//只有读出来的内容不为空就认为文件里面有数据
- {
- cJSON *dataList = cJSON_GetObjectItem(data_root, "infor");
- if (dataList != NULL && cJSON_IsArray(dataList))//判断是否为NULL并且是否为数组类型的内容
- {
- int count = cJSON_GetArraySize(dataList);//获取数组的大小 10//9 8 7 6 5 4 3 2 1 0
- memset(&message_infor_s,0,sizeof(message_infor_t));
- message_infor_s.num = count;
- for (uint8_t i = 0; i < count; i++)//反序存储是反序 所以读出来显示也需要反序度
- {
- cJSON *object = NULL;
- cJSON *uid_t = NULL;
- cJSON *appid_t = NULL;
- cJSON *title_buf = NULL;
- cJSON *msg_buf = NULL;
- cJSON *time = NULL;
- cJSON *hasCode = NULL;
- cJSON *read_t = NULL;
- object = cJSON_GetArrayItem(dataList,i);//1 0
- uid_t = cJSON_GetObjectItem(object, "uid");
- appid_t = cJSON_GetObjectItem(object, "appid_t");
- title_buf = cJSON_GetObjectItem(object, "title");
- msg_buf = cJSON_GetObjectItem(object, "msg");
- time = cJSON_GetObjectItem(object, "time");
- hasCode = cJSON_GetObjectItem(object, "hasCode");
- read_t = cJSON_GetObjectItem(object, "read");
- message_infor_s.message_t[i].uid = uid_t->valueint;//
- message_infor_s.message_t[i].appid = appid_t->valueint;
- if(strlen(title_buf->valuestring) != 0)//10
- {
- memcpy(message_infor_s.message_t[i].title,title_buf->valuestring,strlen(title_buf->valuestring));
- }else{
- memset(message_infor_s.message_t[i].title,0,TITLE_BUF_LEN);
-
- }
- // WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s.message_t[i].title:%s",message_infor_s.message_t[i].title);
-
- if(strlen(msg_buf->valuestring) != 0)
- {
- memcpy(message_infor_s.message_t[i].msg,msg_buf->valuestring,strlen(msg_buf->valuestring));
- }else{
- memset(message_infor_s.message_t[i].msg,0,MSG_BUF_LEN);
- }
- // WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s.message_t[count - 1- i].msg:%s",message_infor_s.message_t[i].msg);
- message_infor_s.message_t[i].time = time->valueint;
- message_infor_s.message_t[i].hasCode = hasCode->valueint;
- message_infor_s.message_t[i].read = read_t->valueint;
- }
- }
- }
- cJSON_Delete(data_root);
- }
- // WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s.num%d\r\n",message_infor_s.num); //2 1 0
- // for(uint8_t i = message_infor_s.num-1;i > 0 ;i--)
- // {
- // // WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s:title %s msg :%s\r\n",message_infor_s.message_t[i].title,message_infor_s.message_t[i].msg);
- // }
-}
-message_infor_t *get_message_info(void)
-{
- return &message_infor_s;
-}
void ble_add_message_index(uint32_t old_index)
{
p_ConfigModel->set_condigData_Int(OHOS::ConfigModel::CONFIGMODEL_ITEM_SLEEP_REMIND,data.bedtime_alarm);
//更新睡眠配置
- OHOS::SleepModel::GetInstance().set_sleep_goal();
+ #ifdef FD230
+ OHOS::SleepModel::GetInstance().set_sleep_goal();
+ #endif
}
return;
char *addressbook(void)//获取通讯录保存文件地址路径
{
+ #ifdef FD230
return ADDRESS_BOOK_PATH;
+ #endif
+ return NULL;
}
void addressbookToRead(char *buf)//转化用于·c文件
{
}
-message_infor_t message_infor_s;
-void read_message_data(void)
-{
- if(!creatMessageDir())//创建失败
- {
- return;
- }
- uint32_t data_len = 0;
- FILE *jsfile = fopen(ANCS_DATA_CJSON_PATH, "r");
- cJSON *data_root;
- if (jsfile != NULL) {
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"succes opening file\n");
- fseek(jsfile, 0, SEEK_END);
- long fileSize = ftell(jsfile);
- fseek(jsfile, 0, SEEK_SET);
-
- char *jsonData = (char *)malloc(fileSize + 1);
- fread(jsonData, 1, fileSize, jsfile);
- jsonData[fileSize] = '\0';
- fclose(jsfile);
-
- // 解析JSON数据
- // WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"jsonData %s",jsonData);
- data_len = strlen(jsonData);
- data_root= cJSON_Parse(jsonData);
- free(jsonData);
- if(data_len > 0)//只有读出来的内容不为空就认为文件里面有数据
- {
- cJSON *dataList = cJSON_GetObjectItem(data_root, "infor");
- if (dataList != NULL && cJSON_IsArray(dataList))//判断是否为NULL并且是否为数组类型的内容
- {
- int count = cJSON_GetArraySize(dataList);//获取数组的大小 10//9 8 7 6 5 4 3 2 1 0
- memset(&message_infor_s,0,sizeof(message_infor_t));
- message_infor_s.num = count;
- for (uint8_t i = 0; i < count; i++)//反序存储是反序 所以读出来显示也需要反序度
- {
- cJSON *object = NULL;
- cJSON *uid_t = NULL;
- cJSON *appid_t = NULL;
- cJSON *title_buf = NULL;
- cJSON *msg_buf = NULL;
- cJSON *time = NULL;
- cJSON *hasCode = NULL;
- cJSON *read_t = NULL;
- object = cJSON_GetArrayItem(dataList,i);//1 0
- uid_t = cJSON_GetObjectItem(object, "uid");
- appid_t = cJSON_GetObjectItem(object, "appid_t");
- title_buf = cJSON_GetObjectItem(object, "title");
- msg_buf = cJSON_GetObjectItem(object, "msg");
- time = cJSON_GetObjectItem(object, "time");
- hasCode = cJSON_GetObjectItem(object, "hasCode");
- read_t = cJSON_GetObjectItem(object, "read");
- message_infor_s.message_t[i].uid = uid_t->valueint;//
- message_infor_s.message_t[i].appid = appid_t->valueint;
- if(strlen(title_buf->valuestring) != 0)//10
- {
- memcpy(message_infor_s.message_t[i].title,title_buf->valuestring,strlen(title_buf->valuestring));
- }else{
- memset(message_infor_s.message_t[i].title,0,TITLE_BUF_LEN);
-
- }
- // WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s.message_t[i].title:%s",message_infor_s.message_t[i].title);
- if(strlen(msg_buf->valuestring) != 0)
- {
- memcpy(message_infor_s.message_t[i].msg,msg_buf->valuestring,strlen(msg_buf->valuestring));
- }else{
- memset(message_infor_s.message_t[i].msg,0,MSG_BUF_LEN);
- }
- // WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s.message_t[count - 1- i].msg:%s",message_infor_s.message_t[i].msg);
- message_infor_s.message_t[i].time = time->valueint;
- message_infor_s.message_t[i].hasCode = hasCode->valueint;
- message_infor_s.message_t[i].read = read_t->valueint;
- }
- }
- }
- cJSON_Delete(data_root);
- }
- // WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s.num%d\r\n",message_infor_s.num); //2 1 0
- // for(uint8_t i = message_infor_s.num-1;i > 0 ;i--)
- // {
- // // WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"message_infor_s:title %s msg :%s\r\n",message_infor_s.message_t[i].title,message_infor_s.message_t[i].msg);
- // }
-}
-message_infor_t *get_message_info(void)
-{
- return &message_infor_s;
-}
void ble_add_message_index(uint32_t old_index)
{
* @Date: 2024-04-18 17:25:04
* @LastEditors: Caisking 3449750381@qq.com
* @LastEditTime: 2024-04-18 17:44:00
- * @FilePath: /XTS_FD230/FD230/code/sdk/application/wearable/service/ble_service/blemoder/bletest.h
*/
/**
* Copyright (c) @CompanyNameMagicTag 2022-2022. All rights reserved. \n
#include "stdint.h"
#include "errcode.h"
+
#include "bleEvent.h"
+
#include "cJSON.h"
} transmitting_type;
- enum PAIRING
+enum PAIRING
{
DEVICEBIND = 0,
DEVICEUNBIND, // 设备解绑通知
uint8_t controlmd; // 训练控制md
} training_ble;
-#define MAX_MESSAGE_NUM 10
-#define TITLE_BUF_LEN 256
-#define MSG_BUF_LEN 1024
-typedef struct ancs_data_info
-{
- uint32_t time;//时间戳
- int uid;//uid 消息唯一编号
- int appid;//消息类型:1:微信 2:QQ 3:短信 4:其他
- char *title;//消息发送者
- char *msg;//消息内容
- int hasCode;//消息hash code
- int read; //是否已读 0 未读 1 已读
- int titlelen;
- int msglen;
-}ancs_data_info_t;
-
-struct message_infor_t
-{
- uint8_t num;
- ancs_data_info_t message_t[MAX_MESSAGE_NUM];
-};
typedef struct
{
void read_message_data(void);//读内存信息数据开机读一次
-struct message_infor_t *get_message_info(void);
void set_weather_now_data(int humidity, char* windScale, char* textNight,int uvIndex,int temp,int iconNight);
void set_weather_address_data(int lat, char* atm, char* city,char* subLocality,int lon);
${ROOT_DIR}/application/wearable/nativeapp/nativeui/screennotify/include
)
endif()
+if("FD230" IN_LIST DEFINES)
set(SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/bleService.c
${CMAKE_CURRENT_SOURCE_DIR}/bleEvent.c
${CMAKE_CURRENT_SOURCE_DIR}/bleANCS.c
-
+
+)
+else()
+set(SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/bleService.c
+ # ${CMAKE_CURRENT_SOURCE_DIR}/bleEvent.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/bleANCS.c
+
)
+endif()
+
set(COMPONENT_PUBLIC_CCFLAGS
)
#include "build_version.h"
#include "custom_runtime.h"
#include "custom_utils.h"
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
#ifdef SUPPORT_AT_OHOSFWK
#include "BluetoothWrapper.h"
#endif
char name[filtration_data_max_len];
}filtration_data;
+#define MAX_MESSAGE_NUM 10
+#define TITLE_BUF_LEN 256
+#define MSG_BUF_LEN 1024
+typedef struct ancs_data_info
+{
+ uint32_t time;//时间戳
+ int uid;//uid 消息唯一编号
+ int appid;//消息类型:1:微信 2:QQ 3:短信 4:其他
+ char *title;//消息发送者
+ char *msg;//消息内容
+ int hasCode;//消息hash code
+ int read; //是否已读 0 未读 1 已读
+ int titlelen;
+ int msglen;
+}ancs_data_info_t;
+
void gattc_reg_id(void);
uint8_t ble_ancs_client_cmd_setup_and_subscribe(uint16_t conn_id);
#include "errcode.h"\r
#include "sys/statfs.h"\r
\r
-#include "bletest.h"\r
+#ifdef BLE_INSTRUCT\r
+#include "bleInstruct.h"\r
+#endif\r
+\r
#include "custom_utils.h"\r
#include "custom_runtime.h"\r
#include "bleANCS.h"\r
#include "stdbool.h"
#include "errcode.h"
#include "bts_def.h"
-// #include "bletest.h"
+
+// #ifdef BLE_INSTRUCT
+// // #include "bleInstruct.h"
+// #endif
+
#define PHONE_WATCH_CONFIG_PATH "/user/userdata/phone_watch.json"
#define ALARM_DATA_CONFIG_PATH "/user/userdata/alarm_test.json"
uint8_t frequenc;//提醒频率
}msg_sedent_set_param_info_t;
-
#pragma pack()
/******************************************
*
} file_recv_stat_t;
-
uint8_t get_OTA_recv_value(void);
#include "build_version.h"\r
#include "custom_runtime.h"\r
#include "custom_utils.h"\r
-#include "bletest.h"\r
+#ifdef BLE_INSTRUCT\r
+#ifdef BLE_INSTRUCT\r
+#include "bleInstruct.h"\r
+#endif\r
+#endif\r
+\r
#include "ConfigModelC.h"\r
#ifdef SUPPORT_AT_CYWEE\r
#include "cywee_ble_Service.h"\r
\r
// }\r
else{\r
+ #ifdef BLE_INSTRUCT\r
revBleOldData(p_msgbuf,msg_len,server_handle);\r
+ #endif\r
}\r
#endif\r
if(mail.msg_data)\r
#include "nandflash_config.h"\r
#include "string.h"\r
#include "custom_runtime.h"\r
-#include "bletest.h"\r
+\r
+#ifdef BLE_INSTRUCT\r
+#include "bleInstruct.h"\r
+#endif\r
+\r
#include "battery_service.h"\r
#include "cywee_service.h"\r
#include "broadcast_feature.h"\r
#include "lwip/api_shell.h"\r
#endif\r
#include "input_app.h"\r
+#ifdef FD230\r
#include "PhoneServiceC.h"\r
-\r
+#endif\r
#pragma pack(1)\r
typedef struct factorytest_cmd_header_t\r
{\r
0x01,\r
&send_data,\r
1);\r
+ #ifdef FD230\r
uapi_hfp_connect_();\r
LOS_Msleep(500);\r
uapi_a2dp_snk_connect_();\r
+ #endif\r
+\r
} else if (testitem == 0x02)\r
{\r
\r
{\r
//通讯录\r
uint8_t send_data = 0x00;\r
-\r
+ #ifdef BLE_INSTRUCT\r
add_addressbookToRead((char *)data);\r
+ #endif\r
\r
factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_SOFT_TEST,\r
BLE_TEST_CMD_SOFT_TEST_SUB_MODE_CONTACTS,\r
\r
if (testitem == 0x06)\r
{\r
- uint8_t send_data = 0x00;\r
+ #ifdef FD230\r
+ \r
uapi_hfp_connect_();\r
LOS_Msleep(500);\r
uapi_a2dp_snk_connect_();\r
+ #endif\r
+\r
+ uint8_t send_data = 0x00;\r
factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_SOFT_TEST,\r
BLE_TEST_CMD_SOFT_TEST_SUB_MODE_SPEAKER,\r
0x03,\r
&send_data,\r
1);\r
+ \r
}\r
\r
break;\r
//软件测试 子模式ID 支付宝
#define BLE_TEST_CMD_SOFT_TEST_SUB_MODE_ALIPAY 0x31
+#define AGINGTEST
#pragma pack(1)
typedef struct
set(PUBLIC_HEADER
${CMAKE_CURRENT_SOURCE_DIR}
-
)
set(PRIVATE_HEADER
-
${ROOT_DIR}/application/audio/thread/
${ROOT_DIR}/application/audio
${ROOT_DIR}/drivers/drivers/driver/audio/source/include
${ROOT_DIR}/application/wearable/nativeapp/nativeui/screennotify/include
)
endif()
+
set(PRIVATE_DEFINES
TARGET_NAME="${TARGET_COMMAND}"
BUILD_TIME="${BUILD_TIME}"
void HandleUpdatelcdMode(int f){}
void set_ota_upgrade(void){}
void custom_timer_callback(void){}
-void Check_ble_adv_status(void){}
+// void Check_ble_adv_status(void){}
void check_dial_space(void){}
int uapi_hfp_disconnect_(void){return 0;}
#endif
#ifdef SUPPORT_BLE_SERVICE
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
#endif
typedef struct
case CUSTOM_CMD_MSG_TYPE_RESTORE_FACTORY_SETTING:
{
#ifdef SUPPORT_BLE_SERVICE
+#ifdef BLE_INSTRUCT
ble_Alipayunbind();
+
// UnbindSucessCmd(1);//1确认解绑
watch_clean_pairs();
+#endif
#endif
uapi_restore_factory_setting();
}
case CUSTOM_CMD_MSG_BR_CONNECT:
#ifdef SUPPORT_BLE_SERVICE
+#ifdef FD230
switch (mail.data[0])
{
//hfp connect
default:
break;
}
+#endif
#endif
break;
case CUSTOM_CMD_MSG_CHECK_RES:
void update_sleep_data(uint32_t sleep_timestamp,uint32_t wake_timestamp,uint32_t totaltime){}
void update_nap_data(uint32_t sleep_timestamp,uint32_t wake_timestamp,uint32_t totaltime){}
void custom_read_wear_data(void){}
-void factorytest_save_aging_data(void){}
-void factorytest_read_aging_data(void){}
-// void factorytest_get_aging_data(ble_aging_t *data){}
-void factorytest_start_aging_test(void){}
-void factorytest_stop_aging_test(void){}
+#ifndef FACTORYTEST_SERVICE
+// void factorytest_save_aging_data(void){}
+// void factorytest_read_aging_data(void){}
+// // void factorytest_get_aging_data(ble_aging_t *data){}
+// void factorytest_start_aging_test(void){}
+// void factorytest_stop_aging_test(void){}
+#endif
+
void stopPlayingMusic(void){}
void custom_setUpListCase(void){}
bool canSyncMusic(uint32_t songSize){return true;}
#endif
#ifdef SUPPORT_BLE_SERVICE
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
+
#include "factorytest_protocol.h"
#endif
#include "alarmclocktimerconfig/include/AlarmClockTimerConfig.h"
#endif
#ifdef SUPPORT_BLE_SERVICE
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
#endif
#include <dirent.h>
{
// printf();
#ifdef SUPPORT_BLE_SERVICE
+#ifdef FD230
C_ScheduleDataWriteToFile(); //同步的时候进行保存
+#endif
#endif
// mmi_sleep_mode_switch_write();//不需要保存
uapi_dev_runtime_set_br_connect_stat(stat);
return true;
}
+#ifdef SUPPORT_BLE_SERVICE
+ extern void bluetooth_close_all(void);
+ extern void bluetooth_enable_all(void);
+#endif
-extern void bluetooth_close_all(void);
-extern void bluetooth_enable_all(void);
bool start_custom_ble_service(void)
{
//加锁避免bt 初始化失败
// uint32_t irq_sts = osal_irq_lock();
#ifdef SUPPORT_BLE_SERVICE
+#ifdef FD230
PRINT("start custom protocol classic bt ble service !\r\n");
bluetooth_enable_all();
+#endif
#endif
//if(!uapi_dev_runtime_get_saveele_status())
{
{
#ifdef SUPPORT_BLE_SERVICE
PRINT("stop custom protocol classic bt ble service !\r\n");
+#ifdef FD230
bluetooth_close_all();
+#endif
+
#endif
//if(!uapi_dev_runtime_get_saveele_status())
{
}
#ifdef SUPPORT_BLE_SERVICE
+#ifdef BLE_INSTRUCT
addressbookToRead(NULL);
+#endif
+
#endif
ble_SOS_data_init();
}
#ifdef SUPPORT_BLE_SERVICE
-#include "bletest.h"
+#ifdef BLE_INSTRUCT
+#include "bleInstruct.h"
+#endif
#endif
#ifdef FD230
if(pdu_data_t[pdu_flag].total_num==1)
{
#ifdef SUPPORT_BLE_SERVICE
+#ifdef FD230
message_data(0,0,phone_number,text,0);
+#endif
#endif
free(pdu_data_t[pdu_flag].phone_number);
free(pdu_data_t[pdu_flag].text);
printf("pdu_data_t[%d].text %s\r\n",find_fist_seq,pdu_data_t[find_fist_seq].text);
#ifdef SUPPORT_BLE_SERVICE
+#ifdef FD230
message_data(0,0,pdu_data_t[find_fist_seq].phone_number,pdu_data_t[find_fist_seq].text,0);
+#endif
#endif
free(pdu_data_t[find_fist_seq].phone_number);
pdu_data_t[find_fist_seq].phone_number=NULL;