From b930edd3675dbc937717ae680b2aee4593a3e414 Mon Sep 17 00:00:00 2001 From: zhyinch <zhyinch@gmail.com> Date: 星期二, 11 十月 2022 15:49:16 +0800 Subject: [PATCH] V2.52 改正dicpoll FINAL 标志位bug --- 源码/核心板/Src/main.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 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 175b9b4..f90d4d9 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" @@ -96,7 +96,7 @@ #endif OUT485_ENABLE; ComMapCheck(); - g_com_map[VERSION] = 0x021e; + g_com_map[VERSION] = (2<<8)|52; 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; @@ -162,6 +162,12 @@ memcpy(&hbsend[14],&checksum,2); UART_PushFrame(hbsend,16); } +u32 onesecondtimer; +void OneSecondTask(void) +{ + TagListUpdate(); + TagDistClear(); +} extern u8 g_start_sync_flag,usart_send_flag,anc_report_num; u16 heartbeat_timer=58,poll_timer; int16_t sync_timer; @@ -188,6 +194,11 @@ if(g_com_map[HEARTBEAT]&&g_com_map[DEV_ROLE]==0) HeatBeat(); } + if(time32_incr-onesecondtimer>=1000) + { + onesecondtimer = time32_incr; + OneSecondTask(); + } // if(flag_newsecond) // { // flag_newsecond=0; -- Gitblit v1.9.3