From 6e7045056f9cb467f12bb2b3f2ce5ff7c75edaf2 Mon Sep 17 00:00:00 2001
From: zhyinch <zhyinch@gmail.com>
Date: 星期二, 31 八月 2021 09:47:00 +0800
Subject: [PATCH] 增加硬件版本号

---
 源码/核心板/Src/application/beep_logic_app.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/beep_logic_app.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/beep_logic_app.c"
index 702660a..c7df14f 100644
--- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/beep_logic_app.c"
+++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/beep_logic_app.c"
@@ -21,8 +21,8 @@
     static uint8_t beep_state,timer_state,beep_timer,beep_ontime,beep_offtime;
          if (min_dist <= g_com_map[ALARM_DISTANCE2]+distoffset1)
                 {
-                    beep_ontime = JDQ_time;
-                    beep_offtime = JDQ_time;
+                    beep_ontime = 1;
+                    beep_offtime = 0;
                     beep_state=2;
                     distoffset1=0;
                     distoffset2=0;
@@ -64,6 +64,9 @@
                             }
                         
                     }
+                }else {
+                    RELAY1_OFF;
+                 //    RELAY2_OFF;
                 }
 }
 void Relay2Task(u16 min_dist)
@@ -72,8 +75,8 @@
     static uint8_t beep_state2,timer_state2,beep_timer2,beep_ontime2,beep_offtime2;
          if (min_dist <= g_com_map[RELAY2_DISTANCE2]+distoffset12)
                 {
-                    beep_ontime2 = JDQ_time;
-                    beep_offtime2 = JDQ_time;
+                    beep_ontime2 = 1;
+                    beep_offtime2 = 0;
                     beep_state2=2;
                     distoffset12=0;
                     distoffset22=0;
@@ -115,6 +118,9 @@
                             }
                         
                     }
+                }else {
+                   // RELAY1_OFF;
+                     RELAY2_OFF;
                 }
 }
 void main_logic(void)	//主逻辑在这里执行
@@ -122,7 +128,7 @@
 	uint16_t i;
 	//除UWB之外的其他代码...
 	static uint16_t beep_judge_cnt = 0;
-    if(g_com_map[ALARM_DISTANCE1]!=0||g_com_map[ALARM_DISTANCE2]!=0||g_com_map[ALARM_DISTANCE3]!=0)
+    if(g_com_map[ALARM_DISTANCE1]!=0||g_com_map[ALARM_DISTANCE2]!=0||g_com_map[ALARM_DISTANCE3]!=0||g_com_map[RELAY2_DISTANCE1]!=0||g_com_map[RELAY2_DISTANCE2]!=0||g_com_map[RELAY2_DISTANCE3]!=0)
     {
             if(beep_judge_cnt++ >= 100)
             {	

--
Gitblit v1.9.3