From dd7cafaa933d27a9cabcf071147cb8ad09b49c62 Mon Sep 17 00:00:00 2001 From: zhyinch <zhyinch@gmail.com> Date: 星期四, 20 五月 2021 10:23:47 +0800 Subject: [PATCH] V1.50 增加小组功能 --- 源码/核心板/Src/main.c | 7 ++++--- 1 files changed, 4 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 e80c138..de17fd0 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" @@ -73,7 +73,7 @@ memcpy(&hbsend[14],&checksum,2); } uint16_t vel_factor,pos_factor; -u16 tyncpoll_time,dist_threshold; +u16 tyncpoll_time,dist_threshold,group_id; u16 slottime,max_slotpos; extern u8 module_power; extern u16 total_slotnum; @@ -101,7 +101,7 @@ g_com_map[COM_INTERVAL]=100; } - g_com_map[VERSION] = 0x012d; + g_com_map[VERSION] = 0x0132; dist_threshold = (g_com_map[SPEEDFILTER_THRES]*10)/(1000/g_com_map[COM_INTERVAL]); if(dist_threshold<300) {dist_threshold = 300;} @@ -109,6 +109,7 @@ {dist_threshold = 15000;} g_com_map[SW_TYPE] = SW_FANGZHUANG; dev_id = g_com_map[DEV_ID]; + group_id=g_com_map[GROUP_ID]; slottime=ceil((double)g_com_map[MAX_REPORT_ANC_NUM]*SLOT_SCALE)+3; max_slotpos=g_com_map[COM_INTERVAL]/slottime; tyncpoll_time=(g_com_map[DEV_ID]%max_slotpos)*slottime; @@ -185,7 +186,7 @@ if(heartbeat_timer>1000) { heartbeat_timer=0; - if(g_com_map[HEARTBEAT]&&g_com_map[DEV_ROLE]==0) + if(g_com_map[HEARTBEAT]) HeatBeat(); } if(flag_newsecond) -- Gitblit v1.9.3