From fe058fc14f65fc224ffd9624c561239eeb3540eb Mon Sep 17 00:00:00 2001
From: zhyinch <zhyinch@gmail.com>
Date: 星期三, 23 三月 2022 17:41:04 +0800
Subject: [PATCH] V1.27 收到基站远程修改的参数进行核对后才配置。

---
 Src/application/dw_app.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Src/application/dw_app.c b/Src/application/dw_app.c
index fac1d3a..878a5ca 100644
--- a/Src/application/dw_app.c
+++ b/Src/application/dw_app.c
@@ -446,16 +446,16 @@
 									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;

--
Gitblit v1.9.3