Merge #2319 into sdk650pathc0423 from refs/changes/2319/head 2322/target/1
author罗正 <1732036298@qq.com>
Fri, 19 Sep 2025 10:03:36 +0000 (10:03 +0000)
committer袁清梦 <3449750381@qq.com>
Fri, 19 Sep 2025 10:03:36 +0000 (10:03 +0000)
Code review from 罗正

* refs/changes/2319/head: (2 commits squashed)

  - 关闭cat1_ctl.c的高频打印

  - Merge branch &#39;sdk650pathc0423&#39; of codeup.aliyun.com:64191456b9581d62e8f81ac0/FD230 into sdk650pathc0423

Signed-off-by: 罗正 <1732036298@qq.com>
Merged-by: Caisking <3449750381@qq.com>
link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/2319
code/sdk/zhihui/4g/cat1Service/Service/cat1_ctl.c
code/sdk/zhihui/leiniao/imsl_ln/ln_api_ota.c

index d968838..7275652 100644 (file)
@@ -321,7 +321,7 @@ void cat1_api_wakeup_cat1(uint8_t wakeup)
     uapi_gpio_set_dir(en_pin, GPIO_DIRECTION_OUTPUT);
     if( wake == 1)
     {
-        cat1_print_warning("wakeup cat1\n");
+        // cat1_print_warning("wakeup cat1\n");
         if(en_value != uapi_gpio_get_output_val(en_pin))
         {
             uapi_gpio_set_val(en_pin, en_value);
index 1b76473..9face57 100644 (file)
@@ -1,5 +1,6 @@
 #include "ln_api.h"
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <stdlib.h>
 
@@ -308,7 +309,7 @@ uint32_t ln_ota_download_flow_http(const char *device_id,
         char *msg = (char *)malloc(64);
         if (msg)
         {
-            int n = snprintf(msg, 64, "{\"status\":%d,\"error\":\"download failed\"}", 2);
+            int n = snprintf(msg, 64, "{\"status\":%d,\"error\":\"download failed\"}", OTA_DOWNLOAD_STATUS_FAILED);
             if (n > 0)
                 do_ln_http_server_recv_data(LN_HTTP_RECV_OTA_DOWNLOAD_MSG, msg, (uint32_t)n);
             free(msg);
@@ -321,7 +322,7 @@ uint32_t ln_ota_download_flow_http(const char *device_id,
     char *done = (char *)malloc(done_cap);
     if (done)
     {
-        int m = snprintf(done, done_cap, "{\"status\":%d,\"filePath\":\"%s\",\"md5\":\"%s\"}", 1, save_path, g_ln_last_package_md5);
+        int m = snprintf(done, done_cap, "{\"status\":%d,\"filePath\":\"%s\",\"md5\":\"%s\"}", OTA_DOWNLOAD_STATUS_COMPLETED, save_path, g_ln_last_package_md5);
         if (m > 0)
             do_ln_http_server_recv_data(LN_HTTP_RECV_OTA_DOWNLOAD_MSG, done, (uint32_t)m);
         free(done);