From e61d1595ebb1fa76b499cddec2df4bd66ec92b97 Mon Sep 17 00:00:00 2001
From: jinlicong <493886250@qq.com>
Date: Mon, 20 May 2024 20:02:47 +0800
Subject: [PATCH] 继续完善

---
 Function/STORAGE/system_mem_para.c |   99 +++++++++++++++++++++++++++++++------------------
 1 files changed, 63 insertions(+), 36 deletions(-)

diff --git a/Function/STORAGE/system_mem_para.c b/Function/STORAGE/system_mem_para.c
index b399d86..0a66459 100644
--- a/Function/STORAGE/system_mem_para.c
+++ b/Function/STORAGE/system_mem_para.c
@@ -1,28 +1,34 @@
 #include "system_mem_para.h"
-#include "mbcrc.h"
+#include "mbcrc1.h"
 #include "eeprom.h"
 #include "system_eep_mem_manage.h"
 #include "rs485_data_analysis_pro.h"
 
 SYSTEM_EEP_IDENTIFICATION_T system_eep_id_g;
-EQUIPMENT_BASIC_INF_T 			    equipment_basic_inf_g={ .product_type= DM_SCM_SZV103,		\
-																												.caliber_type = DN50_TYPE,			\
-																												.valve_type = VM_HADE,					\
-																												.equipment_type = EM_SIFRCT,};
+EQUIPMENT_BASIC_INF_T 			    equipment_basic_inf_g={ 
+	.product_type= DM_SCM_SZV103,		\
+	.caliber_type = DN50_TYPE,			\
+	.valve_type = VM_HADE,					\
+	.equipment_type = EM_SIFRCT,};
+
 MAIN_EQUIPM_HARDWARE_SOFTWARE_INF_T        main_equipment_hardware_software_inf_g;
 LCD_EQUIPM_HARDWARE_SOFTWARE_INF_T         lcd_equipment_hardware_software_inf_g;
 WIRELESS_EQUIPM_HARDWARE_SOFTWARE_INF_T    wireless_equipment_hardware_software_inf_g;
 __IO SAVE_REALTIME_DATA_T					save_realtime_data_g;
-__IO SAVE_VALVE_PARA_T							save_valve_para_g={	.valve_status = VALVE_NONE, \
-																									.valve_lock_state = VL_UNLOCK,};
+	
+__IO SAVE_VALVE_PARA_T							save_valve_para_g={	
+	.valve_status = VALVE_NONE, \
+	.valve_lock_state = VL_UNLOCK,};
 
 
-FLOW_METER_PARA_T	flow_meter_para_g ={ .flow_meter_conn_type = FLOW_METER_CONN_RS485, \
-																			.flow_meter_code = SIZHUMODBUSV2_0, 					 \
-																			.pulse_width = 50,  											     \
-																			.baudrate_code = 	BAUDRATE_9600, 							 \
-																			.parity_bit = PARITY_NONE, 									   \
-																			.slave_address = 1, };
+FLOW_METER_PARA_T	flow_meter_para_g ={ 
+	.flow_meter_conn_type = FLOW_METER_CONN_RS485, \
+	.flow_meter_code = SIZHUMODBUSV2_0, 					 \
+	.pulse_width = 50,  											     \
+	.baudrate_code = 	BAUDRATE_9600, 							 \
+	.parity_bit = PARITY_NONE, 									   \
+	.output_voltage_code = RS485_V1_5V,           \
+	.slave_address = 1, };
 
 TEM_PRE_PARA_T tem_pre_para_g = { 
 	.tem_up_limit = 70, 					   \
@@ -43,12 +49,12 @@
 };
 
 BAT_PARA_T bat_para_g = {
-	.lith_bat_low_v = 55,           \
+	.lith_bat_low_v = 55,           	\
 	.lith_bat_under_v = 50,           \
-	.alka_bat_low_v = 55,           \
+	.alka_bat_low_v = 55,           	\
 	.alka_bat_under_v = 50,           \
-	.lith_bat_max_hour = 26280,           \
-	.lith_bat_used_hour = 0,           \
+	.lith_bat_max_hour = 26280,       \
+	.lith_bat_used_hour = 0,          \
 	.lith_bat_used_sec = 0,           \
 };
 
@@ -58,27 +64,43 @@
 	.PC_manage_user_password = {0x75,0x97},            \
 };
 
+UP_COMM_PARA_T	up_comm_para_g = {
+	.slave_address = 1,         							  \
+	.baudrate_code = BAUDRATE_115200,           \
+	.parity_bit = PARITY_NONE,          				 \
+};
+
 WRC_PARA_SIZHU_T wrc_para_sizhu_g = {
 	
-	.ip1 = {120,77,85,236},           \
-	.ip_port1 = 9692,          			 \
-	.ip1_connect_type = LINK_TCP,           \
-	.ip2 = {120,77,85,236},           \
-	.ip_port2 = 9692,          			 \
-	.ip2_connect_type = LINK_TCP,           \
-	.bat_power_data_interval = 60,           \
-	.ext_power_data_interval = 60,           \
-	.time_start_type = WRC_TIME_START_INTERVAL,           \
-	.bat_power_send_interval = 1440,           \
-	.ext_power_send_interval = 60,           \
-	.send_first_time_BCD ={0x05,0x20}  ,           \
-	.timing_send_num = 1,           				\
-	.timing_send_time_BCD = {{0x05,0x20}},           \
-	.retransmission_interval = 10,           \
-	.retransmission_num = 0,           		 \
-	.comm_timeout_time =120,           		\
+	.ip1 = {120,77,85,236},          								\
+	.ip_port1 = 9692,          			 								\
+	.ip1_connect_type = LINK_TCP,           				\
+	.ip2 = {120,77,85,236},         				  			\
+	.ip_port2 = 9692,          											\
+	.ip2_connect_type = LINK_TCP,           				\
+	.bat_power_data_interval = 60,           				\
+	.ext_power_data_interval = 60,           				\
+	.time_start_type = WRC_TIME_START_INTERVAL,     \
+	.bat_power_send_interval = 1440,           			\
+	.ext_power_send_interval = 60,          		 		\
+	.send_first_time_BCD ={0x05,0x20}  ,           	\
+	.timing_send_num = 1,           								\
+	.timing_send_time_BCD = {{0x05,0x20}},          \
+	.retransmission_interval = 10,          		 		\
+	.retransmission_num = 0,           		 					\
+	.comm_timeout_time =120,           							\
 	.KVer_AES_128[0] ={8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0},  \
 };
+
+BILLING_VALVE_CTRL_PATA_T billing_valve_ctrl_para_g = {
+	.balance_valve_ctrl_byte = {0},           		\
+	.conditional_valve_ctrl_byte = {0},           \
+  .balance_small_value = {500,100,0,0,0},       \
+  .cumulate_flow_threshold = 0,           			\
+  .no_wrc_days = 3,          										\
+  .no_use_gas_days = 0,         								\
+};
+
 
 //EEPROM����д��Ͷ�ȡ���,ֻ֧��1024���ֽڵ�д�����ȡ���
 ErrorStatus	eepWriteAndReadCheck(uint8_t * write_data,uint32_t addr,uint16_t length)
@@ -218,7 +240,7 @@
 }
 
 
-//���в�����ʼ��ΪĬ��ֵ��д��EEPROM
+//?���в�����ʼ��ΪĬ��ֵ��д��EEPROM
 void allParaDefaultInit(void)
 {
 	ErrorStatus	return_flag = PASS;
@@ -227,6 +249,9 @@
 	
 	
 	//�豸������Ϣ��ʼ��д��
+	
+	
+	//?�������䣬����������־�洢�IJ���
 	
 	
 	//ʵʱ���ݳ�ʼ��д��
@@ -238,7 +263,7 @@
 
 
 
-//���в���ֱ�Ӷ�ȡ
+//?���в���ֱ�Ӷ�ȡ
 void allParaReadFromEep(void)
 {
 	ErrorStatus	return_flag = PASS;
@@ -247,6 +272,8 @@
 	
 	//�豸������Ϣ��ȡ
 	
+	//?�������䣬����������־�洢�IJ���
+	
 	//�����ж�return_flag==FAIL���򱨾��洢�쳣�����������������Ļ�
 	
 }

--
Gitblit v1.9.3