优化已绑定下的有网之后的ota升级
authorCaisking <Casiking@zhihuishixun.com>
Sun, 28 Sep 2025 12:23:44 +0000 (20:23 +0800)
committerCaisking <Casiking@zhihuishixun.com>
Sun, 28 Sep 2025 12:23:44 +0000 (20:23 +0800)
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp

index 3dd3618..3809b16 100644 (file)
                     do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_GET_USER_ID, NULL, 0);
                     // 网络连接成功,调用HTTP服务获取设备Token
                     // 获取一下OTA 是否有最新版本
-                    int ota = ota_update_boot();
-                    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ota_update_boot:%d",ota);
-                    WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Network connected, calling HTTP service");
+
+                    // 需要是绑定状态才更新
+                    if(bind_status == true)
+                    {
+                        ota_update_boot();
+                    }   
+
                     #if JUHEPINGTAI
                     uapi_init_all_websocket_servers();
                     uapi_start_all_websocket_servers(); // 连接服务器