|
|
|
@ -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",
|
|
|
|
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);
|
|
|
|
(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)
|
|
|
|
if (boottype)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_debug_pkt_common_send(buf, DEBUG_CONFIG_FACTORY_SET, 0);
|
|
|
|
|
|
|
|
sleep(1);
|
|
|
|
sleep(1);
|
|
|
|
reboot_system(LOG_DEBUG, boottype);
|
|
|
|
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.trend_up_period = config->trend_up_period;
|
|
|
|
pd_config.config.heartbeat_period = config->heartbeat_period;
|
|
|
|
pd_config.config.heartbeat_period = config->heartbeat_period;
|
|
|
|
pd_config.config.ch_en_mask = config->ch_en_mask;
|
|
|
|
pd_config.config.ch_en_mask = config->ch_en_mask;
|
|
|
|
if (config->sync_mode == 0)
|
|
|
|
pd_config.config.pt_B_sync_mode = config->sync_mode;
|
|
|
|
{
|
|
|
|
|
|
|
|
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_internal_period = 1000000000UL / config->pt_internal_period;
|
|
|
|
pd_config.config.pt_internal_period = 1000000000UL / config->pt_internal_period;
|
|
|
|
|
|
|
|
|
|
|
|
if(dau_node->is_connect == TRUE)
|
|
|
|
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->trend_up_period = pd_config.config.trend_up_period;
|
|
|
|
pconfig->heartbeat_period = pd_config.config.heartbeat_period;
|
|
|
|
pconfig->heartbeat_period = pd_config.config.heartbeat_period;
|
|
|
|
pconfig->ch_en_mask = pd_config.config.ch_en_mask;
|
|
|
|
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 = pd_config.config.pt_B_sync_mode;
|
|
|
|
{
|
|
|
|
|
|
|
|
pconfig->sync_mode = 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
pconfig->sync_mode = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
pconfig->pt_internal_period = 1000000000UL / pd_config.config.pt_internal_period;
|
|
|
|
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));
|
|
|
|
_debug_pkt_common_send(pkt, DEBUG_CONFIG_GLOBAL_GET, sizeof(dbg_global_config_t));
|
|
|
|
|
|
|
|
|
|
|
|
|