Procházet zdrojové kódy

1,4路开关检测定时1S

liyi před 1 rokem
rodič
revize
52f5653c63

+ 2 - 2
control/PDU-AC-COMBINE/App/Main/Main.c

@@ -682,13 +682,13 @@ static  void  Proc2msTask_Start(void)
 *********************************************************************************************************/
 static  void  Proc1SecTask(void)
 { 
-	detection_value = get_detection();
+	//detection_value = get_detection();
   if(Get1SecFlag()) //ÅжÏ1s±ê־״̬
   {
 		LEDFlicker2();
     Clr1SecFlag();  //Çå³ý1s±êÖ¾
 #if SUPPORT_DETECTION
-		//detection_value = get_detection();
+		detection_value = get_detection();
 #endif
 #if SUPPORT_SELF_LOCK
 		key_1 = get_key_io_1();

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

@@ -5,11 +5,11 @@
 
 #define  	PRJ_4_BASE                0
 #define 	PRJ_4_ALL_O_ALL_C					0
-#define   PRJ_4_SELF_LOCK_SWITCH    1
+#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_SELF_LOCK_SWITCH    0
+#define   PRJ_1_SELF_LOCK_SWITCH    1
 #define   PRJ_TWIN_FIRE             0
 #define 	PRJ_ITK_8_CHANNEL					0
 #define   PRJ_2_2_BASE              0
@@ -31,6 +31,7 @@
 	#define 	ACSingCurrid 							2 
 #elif PRJ_4_SELF_LOCK_SWITCH
 	#define 	RelaySlaveChaNum 					4
+	//#define 	SUPPORT_SWITCH_REMENBER		1
 	#define 	SUPPORT_SELF_LOCK         1
 	#define   SUPPORT_DETECTION         1
 	#define 	ACSingCurrid 							2 
@@ -55,7 +56,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

+ 2 - 2
control/PDU-AC-COMBINE/HW/Timer/Timer.c

@@ -454,12 +454,12 @@ void TIMER15_IRQHandler(void)
 #if SUPPORT_DETECTION
   detection_count_1++;
 	detection_count_2++;
-	if(detection_count_1 >= 100)
+	if(detection_count_1 >= 1000)
 	{
 		key_detection_1 = 0;
 		detection_count_1 = 0;
 	}
-	if(detection_count_2 >= 100)
+	if(detection_count_2 >= 1000)
 	{
 		key_detection_2 = 0;
 		detection_count_2 = 0;

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 17 - 17
control/PDU-AC-COMBINE/Project/GD32KeilPrj.uvguix.Gowon