1
zhyinch
2020-11-13 67e9f19a27e24c4804ebe321c72951380637fef2
Src/main.c
@@ -210,8 +210,8 @@
u16 current_slotnum;
extern int32_t offsettimeus;
//#define FIXSLOT
#define FIXSLOTPOS  10
#define FIXSLOT
#define FIXSLOTPOS  16
u16 slotpos_intoatl;
uint16_t bigslot_num;
uint8_t fix_slotpos =FIXSLOTPOS; 
@@ -230,9 +230,10 @@
   if(current_slotnum==19)
   {slotpos_intoatl = current_slotnum*bigslot_num+slotpos;}
   target_time=(slotpos_intoatl*SLOTTIME_MS+100)*100;
   //if(target_time<90000)
   {
      lptime=target_time-offsettimeus;
      lptime=target_time-offsettimeus-10000;
      lpcount = lptime/LPTIMER_LSB;
   if(lpcount>LPTIMER_1S_COUNT)
      lpcount-=LPTIMER_1S_COUNT;
@@ -257,11 +258,12 @@
//   g_com_map[COM_INTERVAL]=100;
//   g_com_map[MAX_REPORT_ANC_NUM]=1;
//   g_com_map[NOMOVESLEEP_TIME]=10;
         g_com_map[IMU_ENABLE]=0;
   g_com_map[COM_INTERVAL]=50;
      //   g_com_map[IMU_ENABLE]=0;
   //g_com_map[COM_INTERVAL]=50;
#endif
//g_com_map[NOMOVESLEEP_TIME]=10;
   // g_com_map[COM_INTERVAL]=100;
//   g_com_map[IMU_ENABLE]=0;
//    g_com_map[COM_INTERVAL]=50;
      if(g_com_map[COM_INTERVAL]==0)
   {
     g_com_map[COM_INTERVAL]=100;