zhyinch
2020-11-08 fc77980ff8e2386cff624d4337db09902c600352
源码/核心板/Src/main.c
@@ -44,6 +44,7 @@
   checksum = Checksum_u16(&hbsend[2],12);
   memcpy(&hbsend[14],&checksum,2);
}
uint16_t vel_factor,pos_factor;
u16 tyncpoll_time;
u16 slottime,max_slotpos;
extern u8 module_power;
@@ -71,13 +72,15 @@
   {
     g_com_map[COM_INTERVAL]=100;
   }
   g_com_map[VERSION] = 0x011e;
   g_com_map[VERSION] = 0x0122;
   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;
   tyncpoll_time=(g_com_map[DEV_ID]%max_slotpos)*slottime;   
   module_power = g_com_map[POWER];
   total_slotnum = 1000/g_com_map[COM_INTERVAL];
         vel_factor=g_com_map[FILTER_COEFFICIENT];
      pos_factor=g_com_map[FILTER_COEFFICIENT];
      if(module_power>67)
      {
         module_power=67;
@@ -172,7 +175,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)