| | |
| | | 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); |
| | | |