From e22d53c43eb0c0e51313af82336ce3223afc570d Mon Sep 17 00:00:00 2001 From: zhyinch <zhyinch@gmail.com> Date: 星期四, 29 十月 2020 12:44:53 +0800 Subject: [PATCH] V1.32 修复标签无数据BUG --- 源码/核心板/Src/main.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c" index 953c548..68bb4a7 100644 --- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c" +++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c" @@ -71,7 +71,7 @@ { g_com_map[COM_INTERVAL]=100; } - g_com_map[VERSION] = 0x011c; + g_com_map[VERSION] = 0x0120; dev_id = g_com_map[DEV_ID]; slottime=ceil((double)g_com_map[MAX_REPORT_ANC_NUM]*SLOT_SCALE)+3; max_slotpos=g_com_map[COM_INTERVAL]/slottime; @@ -151,6 +151,16 @@ } if(flag_newsecond) { + uint32_t temp23; + temp23 = dwt_read32bitreg(CHAN_CTRL_ID) ; + if(temp23!=0x4A480022) + { + temp23 = dwt_read32bitreg(CHAN_CTRL_ID) ; + if(temp23!=0x4A480022) + { + NVIC_SystemReset(); + } + } flag_newsecond=0; tagpos_binary=0; memcpy(ancidlist_send,ancidlist_rec,ancidlist_num*2); @@ -162,7 +172,7 @@ tagpos_rec[i] = 0; } } - if(target_time>1000) + if(target_time>=1000) {target_time-=1000;} #ifdef USART_INTEGRATE_OUTPUT if(g_com_map[DEV_ROLE]==0&&usart_send_flag) -- Gitblit v1.9.3