| | |
| | | #include "global_param.h" |
| | | #include "ADC.h" |
| | | |
| | | #define DEBUG_MODE |
| | | //#define DEBUG_MODE |
| | | |
| | | void Device_Init(void) |
| | | { |
| | |
| | | //deca_sleep(1000); |
| | | HeartBeatInit(); |
| | | #ifdef DEBUG_MODE |
| | | g_com_map[DEV_ROLE]=0; |
| | | g_com_map[DEV_ID]=4; |
| | | g_com_map[DEV_ROLE]=1; |
| | | g_com_map[DEV_ID]=1; |
| | | g_com_map[COM_INTERVAL]=100; |
| | | g_com_map[MAX_REPORT_ANC_NUM]=3; |
| | | g_com_map[NEARBASE_NUM]=1; |
| | | g_com_map[NEARBASE_ID1]=2; |
| | | #endif |
| | | OUT485_ENABLE; |
| | | g_com_map[VERSION] = 0x0107; |
| | | g_com_map[VERSION] = 0x0108; |
| | | dev_id = g_com_map[DEV_ID]; |
| | | slottime=ceil((double)g_com_map[MAX_REPORT_ANC_NUM]*4/3); |
| | | max_slotpos=g_com_map[COM_INTERVAL]/slottime; |