|
|
@@ -335,18 +335,13 @@ static void HMI_Decode(void)
|
|
|
HMI_WRITE("workSta.csq_value.txt=\"%s\"",device_status.csq);
|
|
|
//更新收集时间
|
|
|
HMI_WRITE("sysSet.stime.val=%d",device_status.cul_time);
|
|
|
- //更新加热时间
|
|
|
- HMI_WRITE("workSta.heatTime.val=%d",device_status.heattime);
|
|
|
- HMI_WRITE("sysSet.jtime.val=%d",device_status.heattime);
|
|
|
+ //更新低温阈值
|
|
|
+ HMI_WRITE("sysSet.tpl.val=%d",device_status.tpl+20);
|
|
|
HMI_WRITE("sysSet.cb0.val=%d",device_status.sleep_mode);
|
|
|
//
|
|
|
HMI_WRITE("sysSet.vol.val=%d",device_status.vol);
|
|
|
- //更新加热时间和温度
|
|
|
- HMI_WRITE("workSta.heatTem.val=%d",device_status.heattem);
|
|
|
- HMI_WRITE("sysSet.jheat.val=%d",device_status.heatvalue);
|
|
|
- //更新加热状态
|
|
|
- HMI_WRITE("workSta.heatStatus.val=%d",device_status.heat_status);
|
|
|
-
|
|
|
+ //更新高温阈值
|
|
|
+ HMI_WRITE("sysSet.tph.val=%d",device_status.tph);
|
|
|
//更新密码
|
|
|
HMI_WRITE("inputPasswd.pwdData.txt=\"8888\"");
|
|
|
//更新时间设置中的参数
|
|
|
@@ -645,38 +640,39 @@ static void HMI_Decode(void)
|
|
|
rt_kprintf("工作时间参数已保存:模式-%d,光控时间-%d,时控开始时间-%d,时控结束时间-%d\n",device_status.timeSwitch,device_status.sunBar,device_status.startBar,device_status.stopBar);
|
|
|
}
|
|
|
else if (strstr(rx_buffer,"saveSystemSet")!=NULL) {
|
|
|
- static char clt_time_str[3],heattime_str[3],heatvale_str[4],vol_str[4],thsp_str[5];
|
|
|
- LOG_I("系统设置!");
|
|
|
+ static char clt_time_str[3],tpl_str[3],tph_str[4],vol_str[4],thsp_str[5];
|
|
|
+ LOG_I("系统设置:%s",rx_buffer);
|
|
|
var = strstr(rx_buffer,"=");
|
|
|
var ++;
|
|
|
strncpy(clt_time_str,var,2);
|
|
|
if(atoi(clt_time_str)>0 && atoi(clt_time_str) <= 240)
|
|
|
{
|
|
|
+ LOG_I("设置收集时间:%d",atoi(clt_time_str));
|
|
|
device_status.cul_time = atoi(clt_time_str); //收集时间
|
|
|
ef_set_env_blob("cul_time", &device_status.cul_time, sizeof(device_status.cul_time));
|
|
|
}
|
|
|
- strncpy(heattime_str,var+2,2);
|
|
|
- if(atoi(heattime_str)>0 && atoi(heattime_str) <= 30)
|
|
|
+ strncpy(tpl_str,var+2,3);
|
|
|
+ if(atoi(tpl_str)>=-20 && atoi(tpl_str) <= 20)
|
|
|
{
|
|
|
- device_status.heattime = atoi(heattime_str); //加热时间
|
|
|
- LOG_I("设置加热时间:%d",atoi(heattime_str));
|
|
|
- ef_set_env_blob("jtime", &device_status.heattime, sizeof(device_status.heattime));
|
|
|
+ device_status.tpl = atoi(tpl_str); //低温阈值
|
|
|
+ LOG_I("设置低温阈值:%d",atoi(tpl_str));
|
|
|
+ ef_set_env_blob("tpl", &device_status.tpl, sizeof(device_status.tpl));
|
|
|
}
|
|
|
- strncpy(heatvale_str,var+4,3);
|
|
|
- if(atoi(heatvale_str) > 0 && atoi(heatvale_str) <= 130)
|
|
|
+ strncpy(tph_str,var+5,3);
|
|
|
+ if(atoi(tph_str) > 0 && atoi(tph_str) <= 70)
|
|
|
{
|
|
|
- device_status.heatvalue=atoi(heatvale_str);
|
|
|
- LOG_I("设置加热温度:%d",device_status.heatvalue);
|
|
|
- ef_set_env_blob("jheat", &device_status.heatvalue, sizeof(device_status.heatvalue));
|
|
|
+ device_status.tph=atoi(tph_str);
|
|
|
+ LOG_I("设置高温阈值:%d",device_status.tph);
|
|
|
+ ef_set_env_blob("tph", &device_status.tph, sizeof(device_status.tph));
|
|
|
}
|
|
|
- strncpy(vol_str,var+7,3);
|
|
|
+ strncpy(vol_str,var+8,3);
|
|
|
if(atoi(vol_str)>0&&atoi(vol_str)<8)
|
|
|
{
|
|
|
device_status.vol = atoi(vol_str); //音量
|
|
|
LOG_I("设置音量:%d",device_status.vol);
|
|
|
//DTU_Write("volume=");
|
|
|
}
|
|
|
- strncpy(thsp_str,var+10,4);
|
|
|
+ strncpy(thsp_str,var+11,4);
|
|
|
if(atoi(thsp_str)>0&&atoi(thsp_str)<3600)
|
|
|
{
|
|
|
device_status.thsp = atoi(thsp_str); //熄屏时间
|