From: xue <2144439972@qq.com> Date: Wed, 29 Apr 2026 08:30:41 +0000 (+0800) Subject: 修复编译错误 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F3390%2F1;p=mirrors%2FFD230.git 修复编译错误 --- 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