| | |
| | | uint16_t testflag; |
| | | uint32_t Zhongjian_data[60]; |
| | | uint16_t app1_or_app2; |
| | | extern IWDG_HandleTypeDef hiwdg; |
| | | void LoraUp_Poll() |
| | | { uint16_t result ; |
| | | uint16_t crc16; |
| | |
| | | // while(1); |
| | | if(lora_up_rec_flag) |
| | | { |
| | | HAL_IWDG_Refresh(&hiwdg); |
| | | crc16=Cal_CRC16(rxbuffer,DATA_IDX+ONE_BAG_DAXIAO); |
| | | if(muqiandeshengjibao==rxbuffer[MUQIAN_BAG]&&!memcmp(&crc16,&rxbuffer[DATA_IDX+ONE_BAG_DAXIAO],2)&&!memcmp(&dev_id,&rxbuffer[DEST_ID_IDX],2)&& !memcmp(&wangguan_up_id,&rxbuffer[SOURCE_ID_IDX],2)) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | HAL_IWDG_Refresh(&hiwdg); |
| | | huifushengjibaoerror_num++; |
| | | if(huifushengjibaoerror_num>=20) |
| | | { |