zhyinch
2020-11-25 0fab14bd3b70cdb16f134eaeeaac7d0947f2078f
源码/核心板/Src/main.c
@@ -52,7 +52,7 @@
uint16_t vel_factor,pos_factor;
extern u8 module_power;
u16 slottime,max_slotnum,current_slotpos;
u16 slottime,max_slotnum,current_slotpos,dist_threshold;
void Program_Init(void)
{uint16_t i;
   float temp;
@@ -80,6 +80,11 @@
      group_id=g_com_map[GROUP_ID];
      vel_factor=g_com_map[FILTER_COEFFICIENT];
      pos_factor=g_com_map[FILTER_COEFFICIENT];
      dist_threshold = g_com_map[SPEEDFILTER_THRES]/(1000/g_com_map[COM_INTERVAL]);
      if(dist_threshold<30)
      {dist_threshold = 30;}
      if(dist_threshold>15000)
      {dist_threshold = 15000;}
      if(dev_id==0)
         sync_mainbase=1;
      module_power = g_com_map[POWER];