1
zhyinch
2020-11-13 67e9f19a27e24c4804ebe321c72951380637fef2
Src/main.c
@@ -29,7 +29,7 @@
#include "global_param.h"
#include "TrackingDiff.h"
#include "dw_app.h"
#define DEBUG_MODE
//#define DEBUG_MODE
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
@@ -210,8 +210,8 @@
u16 current_slotnum;
extern int32_t offsettimeus;
//#define FIXSLOT
#define FIXSLOTPOS  8
#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;