编译出错的问题
authordxy <1731678236qq.com>
Thu, 16 Oct 2025 06:59:48 +0000 (14:59 +0800)
committerdxy <1731678236qq.com>
Thu, 16 Oct 2025 06:59:48 +0000 (14:59 +0800)
2.code/1.sdk/apps/BK_app/BK_drive/bk_uart.c

index fafa592..dca613d 100644 (file)
@@ -1396,7 +1396,7 @@ int parse_uart_data(char *json_string)
             if (cJSON_IsObject(data)) {
                 // 从data对象中获取"switch_bt_state"字段
                 cJSON *switch_ble_js = cJSON_GetObjectItemCaseSensitive(data, "switch_ble_state");
-                if (cJSON_IsString(switch_bt_state) && (switch_ble_js->valuestring != NULL)) {
+                if (cJSON_IsString(switch_ble_js) && (switch_ble_js->valuestring != NULL)) {
                     printf("蓝牙广播状态: %s\n", switch_ble_js->valuestring);
                     if (strcmp(switch_ble_js->valuestring, "1") == 0) {
                         get_ble_switch=1;