From d15e63a190863f2515627924a43f3cb1e3fcc047 Mon Sep 17 00:00:00 2001 From: xue <2144439972@qq.com> Date: Wed, 29 Apr 2026 16:30:41 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E9=94=99?= =?utf8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../thunderbird/src/ThunderBirdModel.cpp | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp index 15f67ba2e..bfbae9737 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp @@ -55,8 +55,6 @@ #include "ai_media.h" #include "ConfigModelC.h" #include "ConfigModel.h" -#include "build_version.h" -#include #include "cmsis_os2.h" #include "los_task.h" #include "custom_runtime.h" @@ -94,29 +92,13 @@ extern "C" { namespace { -/** 当前手表软件版本是否为 1.0.47(与 OTA 侧 ln_ota_target_is_1047 语义一致) */ +/** 当前手表软件版本是否为 1.0.47(仅用 uapi_get_fw_version,避免链接 build_version 的 get_version_string) */ static bool IsSoftwareVersion_1_0_47(void) { uint8_t major = 0; uint8_t mid = 0; uint8_t minor = 0; - if (uapi_get_fw_version(&major, &mid, &minor) == ERRCODE_SUCC && major == 1 && mid == 0 && minor == 47) { - return true; - } - const char *v = get_version_string(); - if (v == nullptr || v[0] == '\0') { - return false; - } - if (strcmp(v, "1.0.47") == 0 || strcmp(v, "V1.0.47") == 0) { - return true; - } - if (strncmp(v, "1.0.47", 6) == 0 && (v[6] == '\0' || v[6] == '_')) { - return true; - } - if (strncmp(v, "V1.0.47", 7) == 0 && (v[7] == '\0' || v[7] == '_')) { - return true; - } - return false; + return uapi_get_fw_version(&major, &mid, &minor) == ERRCODE_SUCC && major == 1 && mid == 0 && minor == 47; } } // namespace -- 2.17.1