| | |
| | | #include "global_param.h" |
| | | #include "TrackingDiff.h" |
| | | #include "dw_app.h" |
| | | #define DEBUG_MODE |
| | | //#define DEBUG_MODE |
| | | /* USER CODE END Includes */ |
| | | |
| | | /* Private typedef -----------------------------------------------------------*/ |
| | |
| | | |
| | | 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; |
| | |
| | | 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; |