From 6ea1a42391f86e72f53042a966dae970a3fd77cb Mon Sep 17 00:00:00 2001
From: jinlicong <493886250@qq.com>
Date: Fri, 17 May 2024 17:18:57 +0800
Subject: [PATCH] 阀门控制进一步完善

---
 Soft/system_run_fun.c |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/Soft/system_run_fun.c b/Soft/system_run_fun.c
index e7eda78..52a7a11 100644
--- a/Soft/system_run_fun.c
+++ b/Soft/system_run_fun.c
@@ -10,6 +10,7 @@
 #include "wireless_remote_comm.h"
 #include "power_manage.h"
 #include "pulse_and_alarm_line.h"
+#include "valve_control.h"
 
 
 RS485_START_REASON	start_rs485_g = RS485_START_REASON_NONE;
@@ -18,7 +19,8 @@
 
 void allGpioInit(void)
 {
-
+	E2P_Ctrl_Gpio_Init();
+	
 	RTC_GPIO_Init();
 	
 	Key_GPIO_Init();
@@ -27,8 +29,11 @@
 	
 	Power_IO_Init();//��Դ���
 	
+	Valve_CTRL_GPIO_Init();
+	
 	Pulse_And_Alarm_Line_IO_Init();
 	
+	RS485_read_data_GPIO_Init();
 }
 
 //����������������
@@ -95,6 +100,7 @@
 	SYSTEM_EEP_IDENTIFICATION_T		sys_eep_id_B_l={0};
 	uint8_t 	eep_none_flag = 1; //0����գ���0����ǿ�
 	
+	EEPROM_CTRL_ENABLE;
 	//��ȡ������ʼ�����ñ�ʶ 
 	//�����ʶ�޷�ʶ�������洢��Ҫȫ��д��Ĭ��ֵ
 	//�����ʶʶ��ɹ��������в���������ֱ�ӴӴ洢�����ȡ
@@ -129,6 +135,8 @@
 	//��ȡϵͳ������ʶ
 	//���������ʶ�޷�ʶ�����С�ڲ���ʱ�䣬����Ҫ�򲹶�����
 	allParaPatchPro();
+	
+	EEPROM_CTRL_DISABLE;
 	
 }
 
@@ -201,6 +209,7 @@
 	/*���ؿ��ƣ�����ͨ����������ָ��쳣�ȿ��ƣ���Ҫ����ʱֱ�ӵ���ValveCtrlOrder�������ɣ����ڴ˴�����*/
 	
 	
+	
 	/*Զ��ͨѶ�������ƣ���������������ڡ��쳣������*/
 	if((wrc_para_sizhu_g.time_start_type&WRC_TIME_START_INTERVAL)==WRC_TIME_START_INTERVAL){
 		for(uint16_t count_i=0;count_i<wrc_para_sizhu_g.timing_send_num;count_i++){
@@ -224,8 +233,12 @@
 	
 	
 	if(start_wrc_g  != WRC_MEANS_NONE){
+		
 		start_wrc_g = WRC_MEANS_NONE;
-		sys_fun_run_ctrl_p->wrc_ctrl_flag.start_flag = SET;
+		if(sys_fun_run_ctrl_p->wrc_ctrl_flag.start_flag == RESET){
+			pwr_vol_g.alka_flag = AMS_WRC_BEFORE;
+			sys_fun_run_ctrl_p->wrc_ctrl_flag.start_flag = SET;
+		}
 	}
 	
 }

--
Gitblit v1.9.3