From: SnickerSun Date: Sat, 5 Oct 2024 06:43:26 +0000 (+0800) Subject: 在安全模式里,打开AutoOta开启 SPP 服务 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=ce45199897605e08feb24392938608ccf49d6ded;p=mirrors%2FFD230.git 在安全模式里,打开AutoOta开启 SPP 服务 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/safemodemanager/src/SafeModeManagerPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/safemodemanager/src/SafeModeManagerPresenter.cpp index 7dbccf57b..95e7e2ecf 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/safemodemanager/src/SafeModeManagerPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/safemodemanager/src/SafeModeManagerPresenter.cpp @@ -93,10 +93,16 @@ bool SafeModeManagerPresenter::OnClick(UIView &view, const ClickEvent &event) { } if (strcmp(view.GetViewId(), BLE_OTA) == 0) { - /*蓝牙ota*/ - } + /*蓝牙ota*/ + } if (strcmp(view.GetViewId(), AUTO_OTA) == 0) { /*auto ota*/ + static int sppinit=0; + if (sppinit == 0) + { + BtInitSpp(); + sppinit = 1; + } } if (strcmp(view.GetViewId(), FACTORY_RESET_SAFE) == 0) { /*恢复出厂*/ diff --git a/code/sdk/drivers/peripheral/utils/custom_utils.h b/code/sdk/drivers/peripheral/utils/custom_utils.h index c42415052..99a43ed0a 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils.h +++ b/code/sdk/drivers/peripheral/utils/custom_utils.h @@ -347,6 +347,12 @@ uint16_t get_drag_limit(uint8_t direction); errcode_t touch_resume_in_cmd_queue(void); +/** + * 在BluetoothModel.cpp中有实现 +*/ +void BtInitSpp(void); + + #include "custom_utilscpp.h"