zhyinch
2022-09-01 12c58931b1bf47cbe49dfdd40e3975502a7893c0
Src/application/dw_app.c
@@ -78,7 +78,7 @@
   NEARPOLL,
}tag_state=NEARPOLL;
static dwt_config_t config = {
   5,               /* Channel number. */
   2,               /* Channel number. */
   DWT_PRF_64M,     /* Pulse repetition frequency. */
   DWT_PLEN_128,    /* Preamble length. */
   DWT_PAC8,        /* Preamble acquisition chunk size. Used in RX only. */
@@ -447,17 +447,17 @@
                           lastsync_timer=sync_timer;
                           offsettimeus=ancsync_time-current_count*LPTIMER_LSB+offset;
                           SetNextPollTime(tyncpoll_time);
                           if(rec_remotepara_state==1)
                           {
                                      memcpy(rec_remotepara,&rx_buffer[REMOTEPARA_INDEX],REMOTEPARA_LEN);
                              memcpy(&g_com_map[COM_INTERVAL],&rec_remotepara[0],8);
                              memcpy(&g_com_map[POWER],&rec_remotepara[8],10);
                                        if(g_com_map[COM_INTERVAL]>0&&g_com_map[COM_INTERVAL]<1000&&g_com_map[POWER]<67&&g_com_map[POWER]>0)
                              {save_com_map_to_flash();
                              delay_ms(100);
                                        }
                                        NVIC_SystemReset();
                           }
//                           if(rec_remotepara_state==1)
//                           {
//                                      memcpy(rec_remotepara,&rx_buffer[REMOTEPARA_INDEX],REMOTEPARA_LEN);
//                              memcpy(&g_com_map[COM_INTERVAL],&rec_remotepara[0],8);
//                              memcpy(&g_com_map[POWER],&rec_remotepara[8],10);
//                                        if(g_com_map[COM_INTERVAL]>0&&g_com_map[COM_INTERVAL]<1000&&g_com_map[POWER]<67&&g_com_map[POWER]>0)
//                              {save_com_map_to_flash();
//                              delay_ms(100);
//                                        }
//                                        NVIC_SystemReset();
//                           }
                        }else{
                           rec_nearbasepos=FindNearBasePos(rec_nearbaseid);