| | |
| | | #include "HIDO_TypeDef.h" |
| | | #include "PCA9555.h" |
| | | #include "mk_misc.h" |
| | | //#include "lis3dh_driver.c" |
| | | /********************************************结构体**************************************************************/ |
| | | typedef enum |
| | | { |
| | |
| | | extern uint8_t stationary_flag; |
| | | extern uint8_t SOS_KEY_STATE; |
| | | uint32_t LORA_POLL_COUNT=0; |
| | | extern uint32_t step_count; |
| | | //extern u16_m f_step; |
| | | void LoraReportPoll(void) |
| | | { |
| | | // delay_ms(100); |
| | |
| | | printf("气压值:%d",intheight); |
| | | #endif |
| | | |
| | | // TagListUpdate(); |
| | | TagListUpdate(); |
| | | |
| | | LoraReportFreqPoll(); |
| | | flag_getwgresp = 0; |
| | | |
| | | SwitchLoraSettings(wg_report_freq,REPORT_CHANNEL_SF,22); |
| | | |
| | | mir3da_get_step(); |
| | | if(heatbeat_count++>HEATBEAT_UPDATE_TIME && WG_Connected == wg_state) //如果心跳包到达上传时间,并且网关处于链接状态,就上传心跳包 |
| | | { |
| | | heatbeat_count = 0; |
| | |
| | | // } |
| | | // if(abs(sleep_time_count_LAST-sleep_time_count)>2000||REV_WG_pack==1) |
| | | // { |
| | | sleep_timer_start(sleep_time_count); |
| | | // sleep_timer_start(sleep_time_count); |
| | | time_count++; |
| | | // } |
| | | break; |