FIX 修正debug同步模式;

main
wangbo 3 weeks ago
parent aee3837d86
commit 3c0d5bbd68

@ -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);
}
}
}

@ -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));

Loading…
Cancel
Save