|
|
@@ -580,7 +580,7 @@ static void HMI_Decode(void)
|
|
|
gmtime_r(&now, &tm);
|
|
|
static char *json_temp;
|
|
|
static char *var;
|
|
|
- if(device_status.refresh_num==0) device_status.refresh_num = 10;
|
|
|
+ if(device_status.refresh_num==0) device_status.refresh_num = 5;
|
|
|
if(strstr(rx_buffer,"getFullData") != NULL){
|
|
|
/* ★ 换页/唤醒后的强制全量刷新。
|
|
|
* 本工程屏幕没有"换页"通知指令(只有周期性的 getFullData),而内容去重会让
|
|
|
@@ -605,17 +605,25 @@ static void HMI_Decode(void)
|
|
|
期间其它线程的 HMI_WRITE 仍走立即发送(见 hmi_batch_owned)。 */
|
|
|
HMI_BATCH_BEGIN();
|
|
|
freq_refresh_cb0++;
|
|
|
- char *readinfo = makeJson_ReadInfo();
|
|
|
if(device_status.refresh_num==5)
|
|
|
{
|
|
|
- device_status.refresh_num = 15;
|
|
|
- DTU_Write("%s",readinfo);
|
|
|
- //list_mem();
|
|
|
- device_status.hmi_fresh = 1;
|
|
|
- rt_thread_delay(100);
|
|
|
+ device_status.refresh_num = 0;
|
|
|
+ char *readinfo = makeJson_ReadInfo();
|
|
|
+ DTU_Write("%s",readinfo);
|
|
|
+ rt_free(readinfo);
|
|
|
+ /* 2026-10-15 修复:不得覆盖云端 read 触发的待补发上报标志(hmi_fresh==2)。
|
|
|
+ * 原实现无条件置 1,会把 read→getinfo→sync→补发上报 链路上的待办请求吃掉:
|
|
|
+ * 本屏幕刷新周期(refresh_num==5)恰好落在 RTU 应答 synchronization 的
|
|
|
+ * 1.5~2.2s 窗口内时,==2 判定失效 → 补发被吞 → read 无应答、RTU 等待超时
|
|
|
+ * (设备实测 2026-10-15:read 后数百 ms 内即被覆盖)。 */
|
|
|
+ if(device_status.hmi_fresh!=2)
|
|
|
+ {
|
|
|
+ device_status.hmi_fresh = 1;
|
|
|
+ }
|
|
|
+ rt_thread_delay(100);
|
|
|
}
|
|
|
- //在解析getinfo中清除超时
|
|
|
- if(device_status.refresh_timeout==30)
|
|
|
+ //在解析getinfo中清除超时0
|
|
|
+ if(device_status.refresh_timeout==15)
|
|
|
{
|
|
|
rt_sprintf(device_status.sim,"1");
|
|
|
rt_sprintf(device_status.net,"1");
|
|
|
@@ -623,9 +631,10 @@ static void HMI_Decode(void)
|
|
|
device_status.camsta = 1;
|
|
|
device_status.link_sta=0;
|
|
|
device_status.refresh_timeout=0;
|
|
|
+ HMI_WRITE("menu.warn.txt=\"%s\"","[RTU/4G模块]通信失败,检查连接/固件!");
|
|
|
}
|
|
|
- rt_free(readinfo);
|
|
|
- device_status.refresh_num--;
|
|
|
+
|
|
|
+ device_status.refresh_num++;
|
|
|
device_status.refresh_timeout++;
|
|
|
if(1)
|
|
|
{
|