Browse Source

709 自锁 开关记忆功能

liyi 1 year ago
parent
commit
80d5438373

+ 7 - 1
control/PDU-AC-COMBINE/App/Main/Main.c

@@ -512,6 +512,7 @@ void switch_recode()
 						handle_status[i] = EE_ACDC_State_ReadReg[i].ACDC_Cha_On_Off_State;
 				}
 				handle_detection[0] = 0;
+				EE_ACDC_State_ReadReg[0].ACDC_ALLCha_Off_State=true;
 				for(int i = 0;i < RelaySlaveChaNum;i++)
 					EE_ACDC_State_ReadReg[i].ACDC_Cha_On_Off_State = false;
 				RelayState();
@@ -522,7 +523,12 @@ void switch_recode()
 				handle_detection[0] = 1;
 				for(int i = 0;i < RelaySlaveChaNum;i++)
 					EE_ACDC_State_ReadReg[i].ACDC_Cha_On_Off_State=handle_status[i];
-				RelayState();
+				EE_ACDC_State_ReadReg[0].ACDC_ALLCha_On_State=true;
+				All_On_Flag = 1;																										//È«¿ª±êÖ¾ÖÃ1
+				All_Off_Flag = 0;	
+				Delay_Ms_2 = 0;
+				timer_enable(TIMER14);
+				//RelayState();
 			}
 		}
 	#endif

+ 4 - 4
control/PDU-AC-COMBINE/App/Main/board_cfg.h

@@ -8,13 +8,13 @@
 #define   PRJ_4_SELF_LOCK_SWITCH    0
 #define 	PRJ_6_BASE								0
 #define 	PRJ_8_BASE								0
-#define   PRJ_1_ALL_O_ALL_C         0
+#define   PRJ_1_ALL_O_ALL_C         1
 #define   PRJ_1_SELF_LOCK_SWITCH    0
 #define   PRJ_TWIN_FIRE             0
 #define 	PRJ_ITK_8_CHANNEL					0
 #define   PRJ_2_2_BASE              0
 #define   PRJ_8_NEW									0
-#define 	PRJ_OLD_4                 1
+#define 	PRJ_OLD_4                 0
 
 
 
@@ -32,7 +32,7 @@
 	#define 	ACSingCurrid 							2 
 #elif PRJ_4_SELF_LOCK_SWITCH
 	#define 	RelaySlaveChaNum 					4
-	//#define 	SUPPORT_SWITCH_REMENBER		1
+	#define 	SUPPORT_SWITCH_REMENBER		1
 	#define 	SUPPORT_SELF_LOCK         1
 	#define   SUPPORT_DETECTION         1
 	#define 	ACSingCurrid 							2 
@@ -57,7 +57,7 @@
 #elif PRJ_1_SELF_LOCK_SWITCH
 	#define 	RelaySlaveChaNum 					1
 	#define 	SUPPORT_SELF_LOCK         1
-	//#define 	SUPPORT_SWITCH_REMENBER		1
+	#define 	SUPPORT_SWITCH_REMENBER		1
 	#define   SUPPORT_DETECTION         1
 	#define 	ACSingCurrid 							2 
 #elif PRJ_TWIN_FIRE