| | |
| | | #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 5 |
| | | //#define FIXSLOT |
| | | #define FIXSLOTPOS 8 |
| | | u16 slotpos_intoatl; |
| | | uint16_t bigslot_num; |
| | | uint8_t fix_slotpos =FIXSLOTPOS; |
| | |
| | | Usart1ParseDataCallback = UsartParseDataHandler; |
| | | parameter_init(); |
| | | //deca_sleep(1000); |
| | | g_com_map[VERSION] = 0x0207; |
| | | g_com_map[VERSION] = 0x0209; |
| | | #ifdef DEBUG_MODE |
| | | // g_com_map[DEV_ROLE]=1; |
| | | // g_com_map[DEV_ID]=0x123; |
| | | // 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; |
| | | } |
| | | if(g_com_map[IMU_THRES]>10) |
| | | {g_com_map[IMU_THRES]=2;} |
| | | if(g_com_map[POWER]>MAX_RFPOWER) |
| | | {g_com_map[POWER]=MAX_RFPOWER;} |
| | | if(g_com_map[POWER]<0) |