yincheng.zhong
2023-01-04 ab16ddec95bf2abfed4a7b19ef59444b1a75f126
Src/application/dw_app.c
@@ -29,7 +29,7 @@
#include <stdio.h>
#include "beep.h"
#include "modbus.h"
#include "CRC.h"
/*------------------------------------ Marcos ------------------------------------------*/
/* Inter-ranging delay period, in milliseconds. */
#define RNG_DELAY_MS 100
@@ -800,7 +800,7 @@
uint16_t rec_ancpos;
uint8_t dist_noutenough_count;
uint8_t ancdist_hist[11];
uint16_t calCRC;
void NearPoll(void)
{
   
@@ -1100,6 +1100,9 @@
         if(para_update)
         {
         
                calCRC = CRC_Compute(rec_remotepara,5);
                if(memcmp(&calCRC,&rec_remotepara[5],2)==0)
                {
            pack_msgtype = rec_remotepara[0];
            pack_index = rec_remotepara[1];
            pack_length = rec_remotepara[2];
@@ -1122,6 +1125,7 @@
               }
            }
         }
         }
            if(get_newdist>=2)
            {
                notenoughdist_count = 0;