From ce45199897605e08feb24392938608ccf49d6ded Mon Sep 17 00:00:00 2001 From: SnickerSun Date: Sat, 5 Oct 2024 14:43:26 +0800 Subject: [PATCH] =?utf8?q?=E5=9C=A8=E5=AE=89=E5=85=A8=E6=A8=A1=E5=BC=8F?= =?utf8?q?=E9=87=8C=EF=BC=8C=E6=89=93=E5=BC=80AutoOta=E5=BC=80=E5=90=AF=20?= =?utf8?q?SPP=20=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../safemodemanager/src/SafeModeManagerPresenter.cpp | 10 ++++++++-- code/sdk/drivers/peripheral/utils/custom_utils.h | 6 ++++++ 2 files changed, 14 insertions(+), 2 deletions(-) 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" -- 2.17.1