| | |
| | | #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 0 |
| | | #define FIXSLOTPOS 1 |
| | | u16 slotpos_intoatl; |
| | | uint16_t bigslot_num; |
| | | uint8_t fix_slotpos =FIXSLOTPOS; |
| | | int32_t lpcount,lptime,target_time; |
| | | extern u16 tagslotpos; |
| | | void SetNextPollTime(u16 slotpos) |
| | | { |
| | | |
| | | #ifdef FIXSLOT |
| | | fix_slotpos = g_com_map[ALARM_DISTANCE1]; |
| | | slotpos = fix_slotpos; |
| | | tagslotpos = fix_slotpos; |
| | | #endif |
| | | |
| | | if(current_slotnum>=tag_frequency) |
| | |
| | | Usart1ParseDataCallback = UsartParseDataHandler; |
| | | parameter_init(); |
| | | //deca_sleep(1000); |
| | | g_com_map[VERSION] = 0x020b; |
| | | g_com_map[VERSION] = 0x020f; |
| | | #ifdef DEBUG_MODE |
| | | // g_com_map[DEV_ROLE]=1; |
| | | g_com_map[DEV_ID]=0x11; |
| | | // g_com_map[DEV_ID]=0x11; |
| | | // 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[IMU_ENABLE]=0; |
| | | //g_com_map[COM_INTERVAL]=50; |
| | | #endif |
| | | //g_com_map[NOMOVESLEEP_TIME]=10; |