zhyinch
2020-05-08 829eef8555abe71bc3eb5b090d690fbe53763ad7
源码/核心板/Src/main.c
@@ -65,9 +65,9 @@
      save_com_map_to_flash();
#endif
   OUT485_ENABLE;
   g_com_map[VERSION] = 0x010c;
   g_com_map[VERSION] = 0x010e;
   dev_id = g_com_map[DEV_ID];
   slottime=ceil((double)g_com_map[MAX_REPORT_ANC_NUM]/3)+1;
   slottime=ceil((double)g_com_map[MAX_REPORT_ANC_NUM]/4)+4;
   max_slotpos=g_com_map[COM_INTERVAL]/slottime;
   tyncpoll_time=(g_com_map[DEV_ID]%max_slotpos)*slottime;   
   
@@ -112,7 +112,7 @@
u16 heartbeat_timer,poll_timer,sync_timer;
void IdleTask(void)
{
   g_start_sync_flag=0;
      main_logic();
         UART_CheckReceive();
      UART_CheckSend();
   if(heartbeat_timer>1000)
@@ -168,7 +168,7 @@
   
   while(1)
   {
   g_start_sync_flag=0;
   if(g_start_send_flag)
   {
      g_start_send_flag = 0;      
@@ -177,6 +177,7 @@
      IdleTask();      
if(g_com_map[DEV_ROLE]==0)
      Anchor_App();
   }
}