| | |
| | | lastsync_timer=sync_timer; |
| | | offsettimeus=ancsync_time-current_count*LPTIMER_LSB+offset; |
| | | SetNextPollTime(tyncpoll_time); |
| | | if(rec_remotepara_state&&rec_remotepara_state!=g_com_map[REMOTEPARA_STATE]) |
| | | if(rec_remotepara_state==1) |
| | | { |
| | | g_com_map[REMOTEPARA_STATE]=rec_remotepara_state; |
| | | memcpy(rec_remotepara,&rx_buffer[REMOTEPARA_INDEX],REMOTEPARA_LEN); |
| | | 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); |
| | | save_com_map_to_flash(); |
| | | delay_ms(100); |
| | | NVIC_SystemReset(); |
| | | |
| | | 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(); |
| | | } |
| | | |
| | | // count_offset=sync_count-current_count-143; |