zhyinch
2022-03-28 96a63685fd53bd939772377296a9e732333e3748
源码/核心板/Src/main.c
@@ -96,7 +96,7 @@
#endif
   OUT485_ENABLE;
   ComMapCheck();
   g_com_map[VERSION] = 0x021e;
   g_com_map[VERSION] = (2<<8)|47;
   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;
@@ -162,6 +162,12 @@
memcpy(&hbsend[14],&checksum,2);
UART_PushFrame(hbsend,16);
}
u32 onesecondtimer;
void OneSecondTask(void)
{
   TagListUpdate();
   TagDistClear();
}
extern u8 g_start_sync_flag,usart_send_flag,anc_report_num;
u16 heartbeat_timer=58,poll_timer;
int16_t sync_timer;
@@ -188,6 +194,11 @@
      if(g_com_map[HEARTBEAT]&&g_com_map[DEV_ROLE]==0)
      HeatBeat();
   }
   if(time32_incr-onesecondtimer>=1000)
   {
      onesecondtimer = time32_incr;
      OneSecondTask();
   }
//   if(flag_newsecond)
//   {
//     flag_newsecond=0;