From 7d3477c256ef93ce3190c1d7740c90ee941311cd Mon Sep 17 00:00:00 2001 From: zhyinch <zhyinch@gmail.com> Date: 星期四, 07 四月 2022 21:00:49 +0800 Subject: [PATCH] V1.70 --- 源码/核心板/Src/stm32f10x_it.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/stm32f10x_it.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/stm32f10x_it.c" index 9eda2fe..730b3f6 100644 --- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/stm32f10x_it.c" +++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/stm32f10x_it.c" @@ -33,7 +33,7 @@ volatile uint32_t time32_incr; uint8_t tt=0; uint8_t g_start_send_flag = 0,sync_seq=0,usart_send_flag; -u16 usart_timer=0; +u16 usart_timer=0,pollsendtimer=0; uint16_t sysscal; u16 tag_recv_timer, tag_timer,last_polltime,userdata_timer; extern uint16_t g_Resttimer,heartbeat_timer,sync_timer; @@ -52,7 +52,15 @@ heartbeat_timer++; sync_timer++; neartimout_timer++; - synclost_timer++; + synclost_timer++; + if(g_com_map[DEV_ROLE]||g_com_map[ANC_POLL]) + { + if(pollsendtimer++>=g_com_map[COM_INTERVAL]) + { + pollsendtimer = 0; + g_start_send_flag = 1; + } +} //GPIO_WriteBit(GPIOA, GPIO_Pin_10, Bit_RESET); if(sync_timer>=1000) { @@ -82,7 +90,7 @@ { if(sync_timer==target_time) { - g_start_send_flag=1; + // g_start_send_flag=1; } } @@ -117,7 +125,7 @@ last_polltime=sync_timer; // GPIO_WriteBit(GPIOA, GPIO_Pin_9, Bit_SET); - g_start_send_flag=1; +// g_start_send_flag=1; } } -- Gitblit v1.9.3