| | |
| | | #include "serial_at_cmd_app.h" |
| | | #include "global_param.h" |
| | | #include "ADC.h" |
| | | |
| | | #include "modbus.h" |
| | | //#define DEBUG_MODE |
| | | |
| | | void Device_Init(void) |
| | |
| | | } |
| | | u16 tyncpoll_time; |
| | | TrackingDiffClass *pUWBDistanceTrackingDiff; |
| | | u8 group_id; |
| | | void Program_Init(void) |
| | | {uint16_t i; |
| | | float temp; |
| | |
| | | g_com_map[ANC_POLL]=0; |
| | | g_com_map[ALARM_DISTANCE1]=100; |
| | | #endif |
| | | pUWBDistanceTrackingDiff = NewTrackingDiffClass(2, 4, 0.1); |
| | | //pUWBDistanceTrackingDiff = NewTrackingDiffClass(2, 4, 0.03); |
| | | dev_id = g_com_map[DEV_ID]; |
| | | g_com_map[VERSION] = 0x010b; |
| | | group_id=g_com_map[GROUP_ID]; |
| | | g_com_map[VERSION] = 0x0113; |
| | | temp=(float)g_com_map[MAX_REPORT_ANC_NUM]*4/3; |
| | | temp2=g_com_map[DEV_ID]*g_com_map[MAX_REPORT_ANC_NUM]*4/3; |
| | | if(temp2<temp) |