From 3c0d5bbd6852bf7cd04301642b7a16aee82eecf7 Mon Sep 17 00:00:00 2001 From: wangbo Date: Sat, 11 Oct 2025 06:51:46 +0000 Subject: [PATCH] =?UTF-8?q?FIX=20=E4=BF=AE=E6=AD=A3debug=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/lib/a_process/pd_dau.c | 2 +- app/lib/a_process/pd_dbg.c | 21 ++++----------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/app/lib/a_process/pd_dau.c b/app/lib/a_process/pd_dau.c index 248bf68..52013d2 100755 --- a/app/lib/a_process/pd_dau.c +++ b/app/lib/a_process/pd_dau.c @@ -1092,7 +1092,7 @@ void _dau_set_time(uint32_t tval) if (IS_BITMAP_SET(pd_config.config.pt_B_sync_mode, PD_BIT_BCODE)) { dau[i]->reg->reg_global.ps_epoch_sec = tval; - printf("####Z# time:%d\r\n", tval); + printh("####Z# time:%d\r\n", tval); } } } diff --git a/app/lib/a_process/pd_dbg.c b/app/lib/a_process/pd_dbg.c index 501c482..78c2be7 100755 --- a/app/lib/a_process/pd_dbg.c +++ b/app/lib/a_process/pd_dbg.c @@ -211,9 +211,10 @@ int32_t _debug_pkt_factory_cfg_set(char *buf, int len) DBG(DBG_M_DEBUG, " CSG 服务器 IP (csg_ipv4): %u.%u.%u.%u\r\n", (info->csg_ipv4 >> 24) & 0xFF, (info->csg_ipv4 >> 16) & 0xFF, (info->csg_ipv4 >> 8) & 0xFF, info->csg_ipv4 & 0xFF); + _debug_pkt_common_send(buf, DEBUG_CONFIG_FACTORY_SET, 0); + if (boottype) { - _debug_pkt_common_send(buf, DEBUG_CONFIG_FACTORY_SET, 0); sleep(1); reboot_system(LOG_DEBUG, boottype); } @@ -233,14 +234,7 @@ int32_t _debug_pkt_global_cfg_set(char *pkt, int len) pd_config.config.trend_up_period = config->trend_up_period; pd_config.config.heartbeat_period = config->heartbeat_period; pd_config.config.ch_en_mask = config->ch_en_mask; - if (config->sync_mode == 0) - { - BITMAP_RESET(pd_config.config.pt_B_sync_mode, PD_BIT_PT); - } - else - { - BITMAP_SET(pd_config.config.pt_B_sync_mode, PD_BIT_PT); - } + pd_config.config.pt_B_sync_mode = config->sync_mode; pd_config.config.pt_internal_period = 1000000000UL / config->pt_internal_period; if(dau_node->is_connect == TRUE) @@ -267,14 +261,7 @@ int32_t _debug_pkt_global_cfg_get(char *pkt, int len) pconfig->trend_up_period = pd_config.config.trend_up_period; pconfig->heartbeat_period = pd_config.config.heartbeat_period; pconfig->ch_en_mask = pd_config.config.ch_en_mask; - if (IS_BITMAP_SET(pd_config.config.pt_B_sync_mode, PD_BIT_PT)) - { - pconfig->sync_mode = 1; - } - else - { - pconfig->sync_mode = 0; - } + pconfig->sync_mode = pd_config.config.pt_B_sync_mode; pconfig->pt_internal_period = 1000000000UL / pd_config.config.pt_internal_period; _debug_pkt_common_send(pkt, DEBUG_CONFIG_GLOBAL_GET, sizeof(dbg_global_config_t));