From d5777a0e26f94314af6408c1dff8d34abf8ff9fc Mon Sep 17 00:00:00 2001 From: zhyinch <zhyinch@gmail.com> Date: 星期一, 11 四月 2022 17:49:40 +0800 Subject: [PATCH] 去掉基站修改标签参数 --- 源码/核心板/Src/application/beep_logic_app.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 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 c7df14f..70c5716 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" @@ -12,7 +12,18 @@ #define ONTIME3 5 // 500ms #define OFFTIME3 5 // 500ms +uint8_t send485_delayon[10] = {0xFE,0x0F,0x00,0x00,0x00,0x04,0x01,0xFF,0x31,0xD2 }; +uint8_t send485_delayoff[10] = {0xFE,0x0F,0x00,0x00,0x00,0x04,0x01,0x0,0x71,0x92 }; +void Send385ControlDelay(u8 state) +{ + if(state) + { + UART_PushFrame(send485_delayon, 10); + }else{ + UART_PushFrame(send485_delayoff, 10); + } +} uint16_t min_dist1,min_dist2; extern u16 JDQ_time; void Relay1Task(u16 min_dist) @@ -48,6 +59,7 @@ if(beep_timer++ < beep_ontime) { RELAY1_ON; + Send385ControlDelay(1); }else{ timer_state=0; @@ -57,6 +69,7 @@ if(beep_timer++ < beep_offtime) { RELAY1_OFF; + Send385ControlDelay(0); }else{ timer_state=1; @@ -66,6 +79,7 @@ } }else { RELAY1_OFF; + Send385ControlDelay(0); // RELAY2_OFF; } } @@ -155,9 +169,11 @@ if(g_com_map[RELAY1ON_INDEX]==1) { RELAY1_ON; + Send385ControlDelay(1); }else if(g_com_map[RELAY1ON_INDEX]==0) { RELAY1_OFF; + Send385ControlDelay(0); } if(g_com_map[RELAY2ON_INDEX]==1) { -- Gitblit v1.9.3