From 8bb29b81dd7462af85db79164c280966c6f713b2 Mon Sep 17 00:00:00 2001 From: yincheng.zhong <zhyinch@gmail.com> Date: 星期四, 21 十一月 2019 20:25:54 +0800 Subject: [PATCH] 配临近开发,未完成 --- 源码/核心板/Src/main.c | 8 +------- 1 files changed, 1 insertions(+), 7 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 5214f75..b5de573 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" @@ -63,13 +63,7 @@ OUT485_ENABLE; g_com_map[VERSION] = 0x0107; dev_id = g_com_map[DEV_ID]; - temp=(float)g_com_map[MAX_REPORT_ANC_NUM]*4/3; - temp2=g_com_map[MAX_REPORT_ANC_NUM]*4/3; - if(temp2<temp) - { - temp2++; - } - slottime=temp2; + slottime=ceil((double)g_com_map[MAX_REPORT_ANC_NUM]*4/3); max_slotpos=g_com_map[COM_INTERVAL]/slottime; tyncpoll_time=(g_com_map[DEV_ID]%max_slotpos)*slottime; -- Gitblit v1.9.3