在安全模式里,打开AutoOta开启 SPP 服务 1108/1
authorSnickerSun <snickersun@163.com>
Sat, 5 Oct 2024 06:43:26 +0000 (14:43 +0800)
committerSnickerSun <snickersun@163.com>
Sat, 5 Oct 2024 06:43:26 +0000 (14:43 +0800)
code/sdk/application/wearable/fd230app/nativeui/safemodemanager/src/SafeModeManagerPresenter.cpp
code/sdk/drivers/peripheral/utils/custom_utils.h

index 7dbccf5..95e7e2e 100644 (file)
@@ -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) {
     /*恢复出厂*/
index c424150..99a43ed 100644 (file)
@@ -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"