关闭cat1_ctl.c的高频打印
authorcheng <chengyf@zhihuishixun.com>
Fri, 19 Sep 2025 07:51:09 +0000 (15:51 +0800)
committercheng <chengyf@zhihuishixun.com>
Fri, 19 Sep 2025 07:51:09 +0000 (15:51 +0800)
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);