From 35ee22677fd90dee7b6fa93c1098f48f16c07aff Mon Sep 17 00:00:00 2001 From: zhyinch <zhyinch@gmail.com> Date: 星期三, 01 七月 2020 22:54:43 +0800 Subject: [PATCH] 提供给安徽星心V1.30,10对10测试成功 --- 源码/核心板/Src/main.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 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 2a5ee9e..f8ce3ce 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" @@ -52,6 +52,7 @@ uint16_t vel_factor,pos_factor; extern u8 module_power; +u16 slottime,max_slotnum,current_slotpos; void Program_Init(void) {uint16_t i; float temp; @@ -86,14 +87,17 @@ { module_power=67; } - g_com_map[VERSION] = 0x0117; + g_com_map[VERSION] = 0x011e; temp=(float)g_com_map[MAX_REPORT_ANC_NUM]*4/3; - temp2=g_com_map[DEV_ID]*g_com_map[MAX_REPORT_ANC_NUM]*4/3; + temp2=g_com_map[MAX_REPORT_ANC_NUM]*4/3; if(temp2<temp) { temp2++; } - tyncpoll_time=g_com_map[DEV_ID]*(temp2); + slottime=temp2; + max_slotnum=g_com_map[COM_INTERVAL]/temp2; + current_slotpos=g_com_map[DEV_ID]; + tyncpoll_time=(current_slotpos%max_slotnum)*slottime; if(g_com_map[DEV_ROLE]) { printf("标签ID: %d .\r\n",dev_id); -- Gitblit v1.9.3