فهرست منبع

修改 : 直流数据对接;

lch 10 ماه پیش
والد
کامیت
9133a97b8d

+ 4 - 3
README.md

@@ -46,6 +46,7 @@
    
 # 202512(15-21)
 01. 修改 : 南网定值;
-02. 修改: qu16、qs16、qu08、qs08数据类型为int,以适配点表文件中对应数据类型的偏移是按32位的。
-03. 修复: rt_sockioctl接口强制转换导致指针地址截断进而导致虚拟网卡ip获取失败的问题。
-04. 修复: rt_get_netcard_id_from_socket函数中ip转换处理问题。
+02. 修改 : qu16、qs16、qu08、qs08数据类型为int,以适配点表文件中对应数据类型的偏移是按32位的。
+03. 修复 : rt_sockioctl接口强制转换导致指针地址截断进而导致虚拟网卡ip获取失败的问题。
+04. 修复 : rt_get_netcard_id_from_socket函数中ip转换处理问题。
+05. 修改 : 直流数据对接;

+ 2 - 2
app_public/fuxi_public/fuxi_bsp/include/ad7616.h

@@ -81,8 +81,8 @@ extern s16 (*g_adc_dots)[CFG_ADC_DOTS_PER_CHANNEL*2];
 extern s16 (*g_adc_dots_rec)[CFG_ADC_CHANNEL];
 extern struct timespec ts_adc_dots[CFG_ADC_DOTS_PER_CHANNEL];
 
-#define AD7616_DC0_CHANNEL		14
-#define AD7616_DC1_CHANNEL		-1
+#define AD7616_DC0_CHANNEL		13
+#define AD7616_DC1_CHANNEL		15
 
 #ifdef CFG_256_DOTS_PER_PERIOD
 #define ADC_REC_SAMPLE            256        // ¼²¨Ã¿ÖܲÉÑùµãÊý

+ 26 - 26
app_public/fuxi_public/fuxi_bsp/include/debug_print.h

@@ -19,64 +19,64 @@
 
 /***** 宏定义 *****/
 
-#define DP_COLOR_NONE		"\e[0m"
-#define DP_COLOR_RED		"\e[31m"
-#define DP_COLOR_GREEN		"\e[32m"
-#define DP_COLOR_YELLOW	    "\e[33m"
-#define DP_COLOR_BLUE		"\e[34m"
-#define DP_COLOR_PURPLE		"\e[35m" // 紫色
-#define DP_COLOR_WATHET		"\e[36m" // 浅蓝
-#define DP_COLOR_WHITE		"\e[37m"
+#define DP_COLOR_NONE		"\033[0m"
+#define DP_COLOR_RED		"\033[31m"
+#define DP_COLOR_GREEN		"\033[32m"
+#define DP_COLOR_YELLOW	    "\033[33m"
+#define DP_COLOR_BLUE		"\033[34m"
+#define DP_COLOR_PURPLE		"\033[35m" // 紫色
+#define DP_COLOR_WATHET		"\033[36m" // 浅蓝
+#define DP_COLOR_WHITE		"\033[37m"
 
 /* 信息提示 nt整行不带[tag] h只有[tag]显示浅蓝色 n[tag]显示为浅蓝色内容为蓝色 a[tag]整行为浅蓝色 */
 #define dp_info_nt(fmt, args...) \
-    printf(DP_COLOR_WATHET fmt DP_COLOR_NONE, ##args)
+    printf(DP_COLOR_WATHET fmt DP_COLOR_NONE "\r\n", ##args)
 
 #define dp_info_h_s(fmt, args...) \
-    printf(DP_COLOR_WATHET "[INFO] " DP_COLOR_NONE fmt, ##args)
+    printf(DP_COLOR_WATHET "[INFO] " DP_COLOR_NONE fmt "\r\n", ##args)
 #define dp_info_h_c(fmt, args...) \
-    printf(DP_COLOR_WATHET "[INFO][%s:%d] " DP_COLOR_NONE fmt, __func__, __LINE__, ##args)
+    printf(DP_COLOR_WATHET "[INFO][%s:%d] " DP_COLOR_NONE fmt "\r\n", __func__, __LINE__, ##args)
 
 #define dp_info_n_s(fmt, args...) \
-    printf(DP_COLOR_WATHET "[INFO] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, ##args)
+    printf(DP_COLOR_WATHET "[INFO] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", ##args)
 #define dp_info_n_c(fmt, args...) \
-    printf(DP_COLOR_WATHET "[INFO][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, __func__, __LINE__, ##args)
+    printf(DP_COLOR_WATHET "[INFO][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", __func__, __LINE__, ##args)
 
 #define dp_info_a_s(fmt, args...) \
-    printf(DP_COLOR_WATHET "[INFO] " fmt DP_COLOR_NONE, ##args)
+    printf(DP_COLOR_WATHET "[INFO] " fmt DP_COLOR_NONE "\r\n", ##args)
 #define dp_info_a_c(fmt, args...) \
-    printf(DP_COLOR_WATHET "[INFO][%s:%d] " fmt DP_COLOR_NONE, __func__, __LINE__, ##args)
+    printf(DP_COLOR_WATHET "[INFO][%s:%d] " fmt DP_COLOR_NONE "\r\n", __func__, __LINE__, ##args)
 
 /* 错误提示 nt整行不带[tag] h只有[tag]显示红色 n[tag]显示为红色内容为蓝色 a[tag]整行为红色 */
 #define dp_err_nt(fmt, args...) \
-    printf(DP_COLOR_RED fmt DP_COLOR_NONE, ##args)
+    printf(DP_COLOR_RED fmt DP_COLOR_NONE "\r\n", ##args)
 
 #define dp_err_h_s(fmt, args...) \
-    printf(DP_COLOR_RED "[ERR] " DP_COLOR_NONE fmt, ##args)
+    printf(DP_COLOR_RED "[ERR] " DP_COLOR_NONE fmt "\r\n", ##args)
 #define dp_err_h_c(fmt, args...) \
-    printf(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE fmt, __func__, __LINE__, ##args)
+    printf(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE fmt "\r\n", __func__, __LINE__, ##args)
     
 #define dp_err_n_s(fmt, args...) \
-    printf(DP_COLOR_RED "[ERR] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, ##args)
+    printf(DP_COLOR_RED "[ERR] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", ##args)
 #define dp_err_n_c(fmt, args...) \
-    printf(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, __func__, __LINE__, ##args)
+    printf(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", __func__, __LINE__, ##args)
     
 #define dp_err_a_s(fmt, args...) \
-    printf(DP_COLOR_RED "[ERR] " fmt DP_COLOR_NONE, ##args)
+    printf(DP_COLOR_RED "[ERR] " fmt DP_COLOR_NONE "\r\n", ##args)
 #define dp_err_a_c(fmt, args...) \
-    printf(DP_COLOR_RED "[ERR][%s:%d] " fmt DP_COLOR_NONE, __func__, __LINE__, ##args)
+    printf(DP_COLOR_RED "[ERR][%s:%d] " fmt DP_COLOR_NONE "\r\n", __func__, __LINE__, ##args)
 
 
 #define dp_err_n_s_rt(fmt, args...) \
-    rt_printf(DP_COLOR_RED "[ERR] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, ##args)
+    rt_printf(DP_COLOR_RED "[ERR] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", ##args)
 #define dp_err_n_c_rt(fmt, args...) \
-    rt_printf(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, __func__, __LINE__, ##args)
+    rt_printf(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", __func__, __LINE__, ##args)
 
     
 #define dp_err_n_s_pk(fmt, args...) \
-    printk(DP_COLOR_RED "[ERR] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, ##args)
+    printk(DP_COLOR_RED "[ERR] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", ##args)
 #define dp_err_n_c_pk(fmt, args...) \
-    printk(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE, __func__, __LINE__, ##args)
+    printk(DP_COLOR_RED "[ERR][%s:%d] " DP_COLOR_NONE DP_COLOR_BLUE fmt DP_COLOR_NONE "\r\n", __func__, __LINE__, ##args)
 
 /***** 头文件 *****/
 

+ 15 - 8
app_public/fuxi_public/fuxi_bsp/source/ad7616.c

@@ -559,17 +559,24 @@ static void updata_adc(struct t_shmdata_adc *sample_data0, uint16_t us_adc_dot_i
     // 每片16路
     for (uint8_t j = 0; j < CFG_ADC_CHANNEL; j++)
     {
-        g_adc_dots_rec[g_adc_dots_index_rec][j] = sample_data0->data.usa_sample_dots[j][us_adc_dot_index0];
-
-        if (opt == TRUE)
+        if (AD7616_DC0_CHANNEL == j)
         {
-            g_adc_dots[j][g_adc_dots_index] = sample_data0->data.usa_sample_dots[j][us_adc_dot_index0];
+            g_adc_dots_dc[0][g_adc_dots_data_count & CFG_ADC_DOTS_MASK] = sample_data0->data.usa_sample_dots[AD7616_DC0_CHANNEL][us_adc_dot_index0];
         }
-    }
+        else if(AD7616_DC1_CHANNEL == j)
+        {
+            g_adc_dots_dc[1][g_adc_dots_data_count & CFG_ADC_DOTS_MASK] = sample_data0->data.usa_sample_dots[AD7616_DC0_CHANNEL][us_adc_dot_index0];
+        }
+        else
+        {
+            g_adc_dots_rec[g_adc_dots_index_rec][j] = sample_data0->data.usa_sample_dots[j][us_adc_dot_index0];
 
-    // 直流采样 国网集中式暂时不需要 zhl TODO
-    // g_adc_dots_dc[0][g_adc_dots_data_count & CFG_ADC_DOTS_MASK] =
-    // 	sample_data->data.usa_sample_dots[AD7616_DC0_CHANNEL][us_adc_dot_index];
+            if (opt == TRUE)
+            {
+                g_adc_dots[j][g_adc_dots_index] = sample_data0->data.usa_sample_dots[j][us_adc_dot_index0];
+            }
+        }
+    }
 
     if (opt == TRUE)
     {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 890 - 890
app_public/fuxi_public/fuxi_bsp/source/dido.c


+ 1 - 1
app_public/fuxi_public/fuxi_bsp/source/factor.c

@@ -158,7 +158,7 @@ int factor_init(void)
 	if(ret != 0)
 	{
 		rt_err_set(ERR_CODE_FACTOR,0);
-		dp_err_n_c("交流系数文件错误: (ret=%d)\r\n", ret);
+		dp_err_n_c("交流系数文件错误: (ret=%d)", ret);
 
 		return -2;
 	}

+ 2 - 1
app_public/fuxi_public/fuxi_bsp/source/freq.c

@@ -151,7 +151,8 @@ float freq_get(unsigned int index)
 	if(ret < 0)
 		return 0.0;
 
-	freq = (float)shm_f.us_freq[index]/1000;
+	// freq = (float)shm_f.us_freq[index]/1000;
+    freq = (float)shm_f.us_freq[index] * 0.001f;
 
 #ifdef DTIM_FREQ_DEBUG
 	rt_stat_in(&g_stat_freq[index],rt_round(shm_f.us_freq[index]*Q16_BASE));

+ 12 - 12
app_public/fuxi_public/fuxi_bsp/source/gpio.c

@@ -199,13 +199,13 @@ int sysfs_gpio_init(int gpio, int direction)
 	ret = sysfs_gpio_export(gpio);
 	if(ret < 0)
 	{
-		dp_err_n_c("sysfs_gpio_export error ret = %d!\n", ret);
+		dp_err_n_c("sysfs_gpio_export error ret = %d!", ret);
 		return -1;
 	}
 	ret = sysfs_gpio_set_direction(gpio, direction);
 	if(ret < 0)
 	{
-		dp_err_n_c("sysfs_gpio_set_direction error\n");
+		dp_err_n_c("sysfs_gpio_set_direction error");
 	}
 
 	return sysfs_gpio_set_value(gpio, GPIO_LOW);	// 初始化IO为低电平
@@ -232,7 +232,7 @@ int rt_write(int fd, char *buf, int len) {
         // Xenomai RTDM设备:需要转换为二进制值
         value = atoi(buf);
         if(value != 0 && value != 1) {
-            dp_err_n_c("value :%d ERR, Please enter '0' or '1'\n", value);
+            dp_err_n_c("value :%d ERR, Please enter '0' or '1'", value);
             return -1;
         }
         return write(fd, &value, sizeof(value));
@@ -281,7 +281,7 @@ int gpio_init(void)
 			gpio_val_fd[i] = sysfs_gpio_init(gpio_val[i], GPIO_OUTPUT);
 			if(gpio_val_fd[i] < 0)
 			{
-				dp_err_n_c("gpio_val_fd[%d] error\n", i);
+				dp_err_n_c("gpio_val_fd[%d] error", i);
 				gpio_val_fd[i] = -1;
 				gpio_dev_type[i] = -1;
 				return -1;
@@ -300,7 +300,7 @@ int gpio_init(void)
 			gpio_val_fd_other[i] = sysfs_gpio_init(gpio_val_other[i], GPIO_OUTPUT);
 			if(gpio_val_fd_other[i] < 0)
 			{
-				dp_err_n_c("gpio_val_fd_other[%d] error\n", i);
+				dp_err_n_c("gpio_val_fd_other[%d] error", i);
 				gpio_val_fd_other[i] = -1;
 				gpio_dev_type_other[i] = -1;
 				return -1;
@@ -386,7 +386,7 @@ int gpio_init(void)
     exportfd = open("/sys/class/gpio/export", O_WRONLY);
     if (exportfd < 0)
     {
-        dp_err_n_c("Cannot open GPIO to export it\n");
+        dp_err_n_c("Cannot open GPIO to export it");
         return -1;
     }
 #ifdef NW_AREA_MAIN_2021
@@ -414,7 +414,7 @@ int gpio_init(void)
         gpio_val_fd[i] = open(path, O_RDWR);
         if (gpio_val_fd[i] < 0)
         {
-            dp_err_n_c("Cannot open GPIO%d value!\n", gpio_val[i]);
+            dp_err_n_c("Cannot open GPIO%d value!", gpio_val[i]);
             for(j = 0; j < i; j ++)
             {
             	close(gpio_val_fd[j]);
@@ -432,7 +432,7 @@ int gpio_init(void)
 		directionfd = open(path, O_RDWR);
 		if (directionfd < 0)
 		{
-			dp_err_n_c("Cannot open GPIO%d direction!\n", gpio_val[i]);
+			dp_err_n_c("Cannot open GPIO%d direction!", gpio_val[i]);
 			return -2;
 		}
 		write(directionfd, "out", 4);
@@ -450,7 +450,7 @@ int gpio_init(void)
         gpio_val_fd_other[i] = open(path, O_RDWR);
         if (gpio_val_fd_other[i] < 0)
         {
-            dp_err_n_c("Cannot open GPIO%d value!\n", gpio_val_other[i]);
+            dp_err_n_c("Cannot open GPIO%d value!", gpio_val_other[i]);
             for(j = 0; j < i; j ++)
             {
             	close(gpio_val_fd_other[j]);
@@ -474,7 +474,7 @@ int gpio_init(void)
 		directionfd = open(path, O_RDWR);
 		if (directionfd < 0)
 		{
-			dp_err_n_c("Cannot open GPIO%d direction!\n", gpio_val_other[i]);
+			dp_err_n_c("Cannot open GPIO%d direction!", gpio_val_other[i]);
 			return -3;
 		}
 		write(directionfd, "out", 4);
@@ -519,7 +519,7 @@ int gpio_exit(void)
 	unexportfd = open("/sys/class/gpio/unexport", O_WRONLY);
     if (unexportfd < 0)
     {
-        dp_err_n_c("Cannot open GPIO to unexport it\n");
+        dp_err_n_c("Cannot open GPIO to unexport it");
         return -1;
     }
 #ifdef NW_AREA_MAIN_2021
@@ -917,7 +917,7 @@ int gpio_test(void)
 			
 		for(i=DO_OUT0; i<DO_NUM; i++)
 		{
-			rt_printf("kout number = %d!\n\r", i);
+			rt_printf("kout number = %d!\r", i);
 			//msleep();
 			sleep(1);
 			gpio_kout_do(1,i-DO_OUT0);

+ 2 - 2
app_public/fuxi_public/fuxi_bsp/source/uart.c

@@ -256,7 +256,7 @@ int uart_open(int channel, uint32_t baudRate, int setting)
 		am335x_uarts_fd[channel] = open(tty_name, O_RDWR, 0);
 		if(am335x_uarts_fd[channel] < 0)
 		{
-			dp_err_n_c("inside open %s failed!\n", tty_name);
+			dp_err_n_c("inside open %s failed!", tty_name);
 			return am335x_uarts_fd[channel];
 		}
 	} 
@@ -410,7 +410,7 @@ int uart_init(void)
 		ret = uart_open(i,115200,PARITY_NONE);
 		if (ret < 0)
 		{
-			dp_err_n_c("%s: outside uart %d open failed!\n", __FUNCTION__, i);
+			dp_err_n_c("%s: outside uart %d open failed!", __FUNCTION__, i);
 		}
 	}
 

+ 2 - 2
app_public/fuxi_public/rt_lite/source/rt.c

@@ -73,7 +73,7 @@ int rt_init(void)
 		if(ret != 0)
 		{
 			rt_err_set(g_rt_init_func[i].err_code,0);
-			dp_err_n_c("rt_init err(i=%d,ret=%d)\r\n",i,ret);
+			dp_err_n_c("rt_init err(i=%d,ret=%d)",i,ret);
 			return ret;
 		}
 	}
@@ -91,7 +91,7 @@ int rt_exit(void)
 		ret = g_rt_exit_func[i]();
 		if(ret != 0)
 		{
-			dp_err_n_c("rt_exit err(i=%d,ret=%d)\r\n",i,ret);
+			dp_err_n_c("rt_exit err(i=%d,ret=%d)",i,ret);
 		}
 	}
 

+ 3 - 3
app_public/fuxi_public/rt_lite/source/rt_error.c

@@ -223,7 +223,7 @@ int rt_err_init(void)
 	num = sizeof(g_err_txt)/sizeof(g_err_txt[0]);
 	if(num != ERR_CODE_NUM)
     {
-        dp_err_n_c_rt("rt_err_init error(ERR_CODE_NUM=%d,num=%d).\r\n", ERR_CODE_NUM, num);
+        dp_err_n_c_rt("rt_err_init error(ERR_CODE_NUM=%d,num=%d).", ERR_CODE_NUM, num);
         return -1;
     }
     atomic_init(&g_err_cnt_hw, 0);
@@ -305,7 +305,7 @@ int rt_err_set(u32 err_code,u32 err_arg)
 			rt_printf("rt_err_clr g_err_queue full!\r\n");
 		}
 	
-		dp_err_n_c_rt("%s产生[错误参数:%lu]!\r\n",g_err_txt[err_code].txt,err_arg);
+		dp_err_n_c_rt("%s产生[错误参数:%lu]!",g_err_txt[err_code].txt,err_arg);
 	}
 
 	return 0;
@@ -394,7 +394,7 @@ int rt_err_clr(u32 err_code,int err_arg)
 			rt_printf("rt_err_clr g_err_queue full!\r\n");
 		}
 		
-		dp_err_n_c_rt("%s消失[错误参数:%d]!\r\n",g_err_txt[err_code].txt,err_arg);
+		dp_err_n_c_rt("%s消失[错误参数:%d]!",g_err_txt[err_code].txt,err_arg);
 	}
 
 	return 0;

+ 3 - 1
app_public/fuxi_public/rt_lite/source/rt_socket.c

@@ -1031,7 +1031,9 @@ int rt_get_net_linkstatus(int if_index)
 
 	if (ioctl(skfd, SIOCGMIIPHY, (uint64_t)&ifr) < 0)
 	{  
-		rt_printf( "SIOCGMIIPHY on %s failed!\n",  ifr.ifr_name);  
+        /* TODO usb扩展网口这里会报错 需要后期进行处理 */
+		rt_printf( "if_index = %d, SIOCGMIIPHY on %s failed!\n", if_index, ifr.ifr_name);  
+        perror("err");
 		close(skfd);
 		return -2;  
 	}  

+ 1 - 1
app_public/xdljd/jdxx.c

@@ -2043,7 +2043,7 @@ void _getjdxxdz_inf(void)
 	pfile = rt_file_open("/app/data/pcolcfg.ini",O_RDONLY ,0);
 	if(IS_ERR(pfile))
 	{
-		dp_err_n_c_rt("error! ÎŞ·¨´ò¿ª pcolcfg.ini\r\n");
+		dp_err_n_c_rt("error! ÎŞ·¨´ò¿ª pcolcfg.ini");
 		goto jdxx_err;
 	}
 	

+ 1 - 1
dtu/dtu_main_t536/app/IECLINK.c

@@ -1646,7 +1646,7 @@ static int  lnk_init_cfg(IECLINK_DEF *pt,u8 *keystr)
 	pfile = rt_file_open("/app/data/pcolcfg.ini",O_RDONLY ,0);
 	if(IS_ERR(pfile))
 	{
-		dp_err_n_c_rt("\r\nerror! ÎŞ·¨´ò¿ª pcolcfg.ini\r\n");
+		dp_err_n_c_rt("\r\nerror! ÎŞ·¨´ò¿ª pcolcfg.ini");
 		return -1;
 	}
 

+ 1 - 1
dtu/dtu_main_t536/app/MmiData.c

@@ -7883,7 +7883,7 @@ int mmd_menu_cfg_init(void)
 	pfile = rt_file_open("/app/data/lcd_menu.csv",O_RDONLY ,0);
 	if(IS_ERR(pfile))
 	{
-		dp_err_n_c_rt("无法打开 lcd_menu.csv,新建...\r\n");
+		dp_err_n_c_rt("无法打开 lcd_menu.csv,新建...");
 		mmd_create_menufile();
 		pfile = rt_file_open("/app/data/lcd_menu.csv",O_RDONLY ,0);
 		if(IS_ERR(pfile))

+ 1 - 1
dtu/dtu_main_t536/app/Modbus.c

@@ -323,7 +323,7 @@ static int  modbus_init_inf(MODBUS_DEF *pt)
 	pfile = rt_file_open("/app/data/pcolcfg.ini",O_RDONLY ,0);
 	if(IS_ERR(pfile))
 	{
-		dp_err_n_c_rt("error! ÎŞ·¨´ò¿ª pcolcfg.ini\r\n");
+		dp_err_n_c_rt("error! ÎŞ·¨´ò¿ª pcolcfg.ini");
 		return -1;
 	}
 

+ 2 - 2
dtu/dtu_main_t536/app/app.c

@@ -98,7 +98,7 @@ int app_init(void)
 		if(ret != 0)
 		{
 			rt_err_set(g_app_init_func[i].err_code,0);
-			dp_err_n_c_pk("%s err(i=%d,ret=%d)\r\n",g_app_init_func[i].init_name,i,ret);
+			dp_err_n_c_pk("%s err(i=%d,ret=%d)",g_app_init_func[i].init_name,i,ret);
 		}
 	}
 	
@@ -115,7 +115,7 @@ int app_exit(void)
 		ret = g_app_exit_func[i]();
 		if(ret != 0)
 		{
-			dp_err_n_c_pk("app_exit err(i=%d,ret=%d)\r\n",i,ret);
+			dp_err_n_c_pk("app_exit err(i=%d,ret=%d)",i,ret);
 		}
 	}
 

+ 2 - 2
dtu/dtu_main_t536/app/dcfactor.c

@@ -56,7 +56,7 @@ int dcfactor_init(void)
 	{
 		rt_err_set(ERR_CODE_DCFACTOR,0);
 		rt_file_del("/app/data/dcfactor.bin");
-		dp_err_n_c_rt("直流系数文件错误: %d\r\n", ret);
+		dp_err_n_c_rt("直流系数文件错误: %d", ret);
 		
 		for (i=0; i<DC_NUM; i++)
 		{
@@ -330,7 +330,7 @@ void _getdcfactorinf(void)
 	pfile = rt_file_open("/app/data/pcolcfg.ini",O_RDONLY ,0);
 	if(IS_ERR(pfile))
 	{
-		dp_err_n_c_rt("error! 无法打开 pcolcfg.ini\r\n");
+		dp_err_n_c_rt("error! 无法打开 pcolcfg.ini");
 		goto dc_err;
 	}
 	// 得到文件长度

+ 1 - 1
dtu/dtu_main_t536/app/defineSys.h

@@ -12,7 +12,7 @@
 #ifndef _DEFINE_SYS_H
 #define _DEFINE_SYS_H
 
-#define DEVICE_VERSION_INFORMATION "NW24_20251218_008" // NW2022意思是按照22年南网标准文件(总调)来做的
+#define DEVICE_VERSION_INFORMATION "NW24_20251219_003" // NW2022意思是按照22年南网标准文件(总调)来做的
 
 #ifdef ___defineSys____//!!!此宏定义不开启,以下宏不直接开启,只用于注释显示
 

+ 4 - 4
dtu/dtu_main_t536/app/equ.c

@@ -465,7 +465,7 @@ int equ_init(void)
 	if(ret != 0)
 	{
 		rt_err_set(ERR_CODE_EQU_RESOURCE,0);
-		dp_err_n_c_rt("equ_init_file_resource err(ret=%d)\r\n",ret);
+		dp_err_n_c_rt("equ_init_file_resource err(ret=%d)",ret);
 		return -1;
 	}
 
@@ -474,7 +474,7 @@ int equ_init(void)
 	if(ret != 0)
 	{
 		rt_err_set(ERR_CODE_EQU_CONFIG,0);
-		dp_err_n_c_rt("equ_init_file_config err(ret=%d)\r\n",ret);
+		dp_err_n_c_rt("equ_init_file_config err(ret=%d)",ret);
 		return -2;
 	}
 
@@ -486,7 +486,7 @@ int equ_init(void)
 		if(equ_info_brd_type(g_equ_config->brd_type[i]) == 0)
 		{
 			equ_led_init();
-			dp_err_n_c_rt("板卡类型不存在(type=%d)!\r\n",g_equ_config->brd_type[i]);
+			dp_err_n_c_rt("板卡类型不存在(type=%d)!",g_equ_config->brd_type[i]);
 			return -3;
 		}
 		
@@ -542,7 +542,7 @@ int equ_init(void)
 	ret = equ_config_check();
 	if(ret)
 	{
-		dp_err_n_c_rt("%s:ret=%d\r\n",__func__,ret);
+		dp_err_n_c_rt("%s:ret=%d",__func__,ret);
 		return -4;
 	}
 

+ 7 - 7
dtu/dtu_main_t536/app/main.c

@@ -156,13 +156,13 @@ int app_main (void *unused)
               	"app_main_loop", (int)getpid(), (int)syscall(SYS_gettid));
 #endif
 
-	dp_info_nt("最大定值个数 MAX_SET_NUMBER = %d\r\n", MAX_SET_NUMBER);
-	dp_info_nt("装置参数 EQUIP_PARA_NUMBER = %d, PARA_NUM = %d\r\n", EQUIP_PARA_NUMBER, PARA_NUM);
-	dp_info_nt("保护定值 SW_SET_NUMBER = %d, SW_SET_NUMBER = %d\r\n", SW_SET_NUMBER, SW_SET_NUMBER);
-	dp_info_nt("开关个数 SWITCH_NUM_MAX = %d, 全部开关保护定值总个数 SET_NUMBER = %d\r\n", SWITCH_NUM_MAX, SET_NUMBER);
-	dp_info_nt("公共定值 PUB_SET_NUMBER = %d, SET_PUB_NUM = %d\r\n", PUB_SET_NUMBER, SET_PUB_NUM);
-	dp_info_nt("内部定值 CSTSET_NUMBER = %d, CSTSET_NUM = %d\r\n", CSTSET_NUMBER, CSTSET_NUM);
-	dp_info_nt("固有参数 FIXEDSET_TABLE_NUMBER = %d\r\n", FIXEDSET_TABLE_NUMBER);
+	dp_info_nt("最大定值个数 MAX_SET_NUMBER = %d", MAX_SET_NUMBER);
+	dp_info_nt("装置参数 EQUIP_PARA_NUMBER = %d, PARA_NUM = %d", EQUIP_PARA_NUMBER, PARA_NUM);
+	dp_info_nt("保护定值 SW_SET_NUMBER = %d, SW_SET_NUMBER = %d", SW_SET_NUMBER, SW_SET_NUMBER);
+	dp_info_nt("开关个数 SWITCH_NUM_MAX = %d, 全部开关保护定值总个数 SET_NUMBER = %d", SWITCH_NUM_MAX, SET_NUMBER);
+	dp_info_nt("公共定值 PUB_SET_NUMBER = %d, SET_PUB_NUM = %d", PUB_SET_NUMBER, SET_PUB_NUM);
+	dp_info_nt("内部定值 CSTSET_NUMBER = %d, CSTSET_NUM = %d", CSTSET_NUMBER, CSTSET_NUM);
+	dp_info_nt("固有参数 FIXEDSET_TABLE_NUMBER = %d", FIXEDSET_TABLE_NUMBER);
 
 	{
 		struct timespec ts;

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 499 - 524
dtu/dtu_main_t536/app/net_104.c


+ 1 - 1
dtu/dtu_main_t536/app/ptl_pwrm.c

@@ -111,7 +111,7 @@ static int  pwrm_init_inf(pwdmodlue_def *pt)
 	pfile = rt_file_open("/app/data/pcolcfg.ini",O_RDONLY ,0);	/*打开文件*/
 	if(IS_ERR(pfile))
 	{
-		dp_err_n_c_rt("error! 无法打开 pcolcfg.ini\r\n");
+		dp_err_n_c_rt("error! 无法打开 pcolcfg.ini");
 		return -1;
 	}
 

+ 3 - 2
dtu/dtu_main_t536/app/set.c

@@ -3786,7 +3786,8 @@ void GetDefDebugNetPara(void)
 
 	
 }
-#if (1)
+
+#if (0)
 void eth0_debug_ip_setup(void)//ÉèÖÃÍø¿Ú1ÐéÄâÍøÂçIPµØÖ·
 {
 	char *argv[] = {"/sbin/ifconfig", "eth0:3", "192.168.64.240", NULL};
@@ -4092,7 +4093,7 @@ void MakeRunPara(bool bFirstInit, bool bUboot)
 #endif
     }
 
-#if (1)
+#if (0)
     eth0_debug_ip_setup();
 #endif
 

+ 7 - 6
dtu/dtu_main_t536/main_mod.c

@@ -318,10 +318,10 @@ int di_do_adc (void *unused)
 	// zhl add
 	struct shmem_fd shmem_fd;
 	if (share_mem_init_v2(&shmem_fd) < 0){
-		dp_err_n_c("--->shmem_init fail !!!\r\n");
+		dp_err_n_c("--->shmem_init fail !!!");
 		return -1;
 	} else {
-		dp_info_n_c("--->shmem_init success !!!\r\n");
+		dp_info_n_c("--->shmem_init success !!!");
 	}
 
 	// 装置类型us_machine_type (分布式:1,集中式:2)
@@ -339,7 +339,7 @@ int di_do_adc (void *unused)
 		rt_err_set(ERR_CODE_INIT_ADC, 0);
 	}
     else {
-	    dp_info_nt("adc init ok!\r\n");
+	    dp_info_nt("adc init ok!");
     }	
 	// printf("ret_flag: %d, read SHM_ADDR_W_FLAG:0x%X -> us_updata: %u, us_op: %u, us_op_bk: %u, us_cfg_adc_err: %u, us_crc: 0x%04x\n\n", 
 	// 		ret_flag, SHM_ADDR_W_FLAG, adc_flag.us_updata, adc_flag.us_op, adc_flag.us_op_bk, adc_flag.us_cfg_adc_err, adc_flag.us_crc);
@@ -468,9 +468,10 @@ int main(void)
 
 	call_usermodehelper("/sbin/ifconfig", argv, envp, UMH_WAIT_PROC);
 
-    dp_info_nt("%s %s\r\n", __DATE__, __TIME__);
-    dp_info_nt("版本信息: SV%02d.%03d %s\r\n", (VER_NUM >> 16) & 0XFF, VER_NUM & 0XFFF, DEVICE_VERSION_INFORMATION);
-    
+    rt_printf("\r\n");
+    dp_info_nt("%s %s", __DATE__, __TIME__);
+    dp_info_nt("版本信息: SV%02d.%03d %s", (VER_NUM >> 16) & 0XFF, VER_NUM & 0XFFF, DEVICE_VERSION_INFORMATION);
+
 	//if(mod_init() < 0)    //jack.liu 20200904 认证信息先不使用
 	//	return -1;
 

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است