|
|
@@ -188,97 +188,98 @@ static void HMI_Decode(void)
|
|
|
device_status.refresh_timeout++;
|
|
|
if(device_status.version_type!=6)
|
|
|
{
|
|
|
- HMI_WRITE("uploadSet.iccid.txt=\"%s\"",device_status.iccid);
|
|
|
- if(strstr(device_status.mqttcfg1,"8.136.98.49")!=NULL)
|
|
|
- {
|
|
|
- HMI_WRITE("uploadSet.plt.val=%d",RESET);
|
|
|
- }
|
|
|
- else if (strstr(device_status.mqttcfg1,"120.27.222.26")!=NULL) {
|
|
|
- HMI_WRITE("uploadSet.plt.val=%d",SET);
|
|
|
- }
|
|
|
- //HMI_WRITE("mqttcfg.mqtt1Message.txt=\"%s\"",device_status.mqttcfg1);
|
|
|
- HMI_WRITE("uploadSet.t0.txt=\"%s\"",device_status.mqttcfg1);
|
|
|
+ HMI_WRITE("uploadSet.iccid.txt=\"%s\"",device_status.iccid);
|
|
|
+ if(strstr(device_status.mqttcfg1,"8.136.98.49")!=NULL)
|
|
|
+ {
|
|
|
+ HMI_WRITE("uploadSet.plt.val=%d",RESET);
|
|
|
+ }
|
|
|
+ else if (strstr(device_status.mqttcfg1,"120.27.222.26")!=NULL) {
|
|
|
+ HMI_WRITE("uploadSet.plt.val=%d",SET);
|
|
|
+ }
|
|
|
+ //HMI_WRITE("mqttcfg.mqtt1Message.txt=\"%s\"",device_status.mqttcfg1);
|
|
|
+ HMI_WRITE("uploadSet.t0.txt=\"%s\"",device_status.mqttcfg1);
|
|
|
|
|
|
- //更新固件版本号
|
|
|
- HMI_WRITE("debug.t3.txt=\"%s\"",device_status.driver);
|
|
|
- //更新固件编译日期
|
|
|
- HMI_WRITE("debug.t4.txt=\"%s\"",device_status.driver_compile);
|
|
|
- //
|
|
|
- HMI_WRITE("debug.t5.txt=\"%s\"",device_status.driver_bl);
|
|
|
- HMI_WRITE("debug.t7.txt=\"%s\"",device_status.driver_compile);
|
|
|
- //更新dtu/rtu版本
|
|
|
- HMI_WRITE("debug.t9.txt=\"%s\"",device_status.driver_4g);
|
|
|
- //更新时间
|
|
|
- HMI_WRITE("menu.rtc.txt=\"%04d-%02d-%02d %02d:%02d:%02d\"",tm.tm_year+1900,tm.tm_mon+1,tm.tm_mday,tm.tm_hour,tm.tm_min,tm.tm_sec);
|
|
|
- HMI_WRITE("workSta.rtc.txt=\"%04d-%02d-%02d %02d:%02d:%02d\"",tm.tm_year+1900,tm.tm_mon+1,tm.tm_mday,tm.tm_hour,tm.tm_min,tm.tm_sec);
|
|
|
- HMI_WRITE("set.t0.txt=\"%d\"",tm.tm_hour);
|
|
|
- HMI_WRITE("set.t1.txt=\"%d\"",tm.tm_min);
|
|
|
- HMI_WRITE("set.t2.txt=\"%d\"",tm.tm_sec);
|
|
|
- //更新电压
|
|
|
- HMI_WRITE("workSta.vbat.txt=\"%s\"",device_status.voltage);
|
|
|
- //更新电流
|
|
|
- HMI_WRITE("workSta.power.txt=\"%s\"",device_status.power);
|
|
|
- //更新温湿度数据
|
|
|
- HMI_WRITE("workSta.envHum.val=%d",atoi(device_status.humidity));
|
|
|
- HMI_WRITE("workSta.envTem.val=%d",atoi(device_status.tempture));
|
|
|
- //更新电池状态
|
|
|
- HMI_WRITE("workSta.batStatus.val=%d",device_status.bat_status);
|
|
|
- //更新上仓门状态
|
|
|
- HMI_WRITE("workSta.upStatus.val=%d",device_status.up_status);
|
|
|
- //更新下仓门状态
|
|
|
- HMI_WRITE("workSta.downStatus.val=%d",device_status.down_status);
|
|
|
- //更新工作状态
|
|
|
- HMI_WRITE("workSta.workStatus.val=%d",device_status.work_status);
|
|
|
- //更新温控状态
|
|
|
- HMI_WRITE("workSta.tempStatus.val=%d",device_status.temp_status);
|
|
|
- //更新雨控状态
|
|
|
- HMI_WRITE("workSta.rainStatus.val=%d",device_status.rain_status);
|
|
|
- //更新光控状态
|
|
|
- HMI_WRITE("workSta.sunStatus.val=%d",device_status.sun_status);
|
|
|
- //更新有线连接状态
|
|
|
- HMI_WRITE("menu.va_net.val=%d",device_status.link_sta);
|
|
|
- //更新CSQ
|
|
|
- HMI_WRITE("menu.csq_value.txt=\"%s\"",device_status.csq);
|
|
|
- HMI_WRITE("menu.va_csq.val=%d",atoi(device_status.csq));
|
|
|
- HMI_WRITE("workSta.csq_value.txt=\"%s\"",device_status.csq);
|
|
|
- //更新收集时间
|
|
|
- HMI_WRITE("sysSet.stime.val=%d",device_status.clt_time);
|
|
|
- //更新加热时间
|
|
|
- HMI_WRITE("workSta.heatTime.val=%d",device_status.heattime);
|
|
|
- HMI_WRITE("sysSet.jtime.val=%d",device_status.heattime);
|
|
|
- //
|
|
|
- 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("debug.t3.txt=\"%s\"",device_status.driver);
|
|
|
+ //更新固件编译日期
|
|
|
+ HMI_WRITE("debug.t4.txt=\"%s\"",device_status.driver_compile);
|
|
|
+ //
|
|
|
+ HMI_WRITE("debug.t5.txt=\"%s\"",device_status.driver_bl);
|
|
|
+ HMI_WRITE("debug.t7.txt=\"%s\"",device_status.driver_compile);
|
|
|
+ //更新dtu/rtu版本
|
|
|
+ HMI_WRITE("debug.t9.txt=\"%s\"",device_status.driver_4g);
|
|
|
+ //更新时间
|
|
|
+ HMI_WRITE("menu.rtc.txt=\"%04d-%02d-%02d %02d:%02d:%02d\"",tm.tm_year+1900,tm.tm_mon+1,tm.tm_mday,tm.tm_hour,tm.tm_min,tm.tm_sec);
|
|
|
+ HMI_WRITE("workSta.rtc.txt=\"%04d-%02d-%02d %02d:%02d:%02d\"",tm.tm_year+1900,tm.tm_mon+1,tm.tm_mday,tm.tm_hour,tm.tm_min,tm.tm_sec);
|
|
|
+ HMI_WRITE("set.t0.txt=\"%d\"",tm.tm_hour);
|
|
|
+ HMI_WRITE("set.t1.txt=\"%d\"",tm.tm_min);
|
|
|
+ HMI_WRITE("set.t2.txt=\"%d\"",tm.tm_sec);
|
|
|
+ //更新电压
|
|
|
+ HMI_WRITE("workSta.vbat.txt=\"%s\"",device_status.voltage);
|
|
|
+ //更新电流
|
|
|
+ HMI_WRITE("workSta.power.txt=\"%s\"",device_status.power);
|
|
|
+ //更新温湿度数据
|
|
|
+ HMI_WRITE("workSta.envHum.val=%d",atoi(device_status.humidity));
|
|
|
+ HMI_WRITE("workSta.envTem.val=%d",atoi(device_status.tempture));
|
|
|
+ //更新电池状态
|
|
|
+ HMI_WRITE("workSta.batStatus.val=%d",device_status.bat_status);
|
|
|
+ //更新上仓门状态
|
|
|
+ HMI_WRITE("workSta.upStatus.val=%d",device_status.up_status);
|
|
|
+ //更新下仓门状态
|
|
|
+ HMI_WRITE("workSta.downStatus.val=%d",device_status.down_status);
|
|
|
+ //更新工作状态
|
|
|
+ HMI_WRITE("workSta.workStatus.val=%d",device_status.work_status);
|
|
|
+ //更新温控状态
|
|
|
+ HMI_WRITE("workSta.tempStatus.val=%d",device_status.temp_status);
|
|
|
+ //更新雨控状态
|
|
|
+ HMI_WRITE("workSta.rainStatus.val=%d",device_status.rain_status);
|
|
|
+ //更新光控状态
|
|
|
+ HMI_WRITE("workSta.sunStatus.val=%d",device_status.sun_status);
|
|
|
+ //更新有线连接状态
|
|
|
+ HMI_WRITE("menu.va_net.val=%d",device_status.link_sta);
|
|
|
+ //更新CSQ
|
|
|
+ HMI_WRITE("menu.csq_value.txt=\"%s\"",device_status.csq);
|
|
|
+ HMI_WRITE("menu.va_csq.val=%d",atoi(device_status.csq));
|
|
|
+ HMI_WRITE("workSta.csq_value.txt=\"%s\"",device_status.csq);
|
|
|
+ //更新收集时间
|
|
|
+ HMI_WRITE("sysSet.stime.val=%d",device_status.clt_time);
|
|
|
+ //更新加热时间
|
|
|
+ HMI_WRITE("workSta.heatTime.val=%d",device_status.heattime);
|
|
|
+ HMI_WRITE("sysSet.jtime.val=%d",device_status.heattime);
|
|
|
+ //
|
|
|
+ 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("inputPasswd.pwdData.txt=\"8888\"");
|
|
|
- //更新时间设置中的参数
|
|
|
- //更新定时模式
|
|
|
- HMI_WRITE("clockSet.timeSwitch.val=%d",device_status.timeSwitch);
|
|
|
- //更新光控定时时长
|
|
|
- HMI_WRITE("clockSet.sunBar.val=%d",device_status.sunBar);
|
|
|
- //更新时控开始
|
|
|
- HMI_WRITE("clockSet.startBar.val=%d",device_status.startBar);
|
|
|
- //更新时控结束
|
|
|
- HMI_WRITE("clockSet.stopBar.val=%d",device_status.stopBar);
|
|
|
- //SIM卡状态
|
|
|
- HMI_WRITE("workSta.bt0.val=%d",atoi(device_status.sim));
|
|
|
- //ID
|
|
|
- HMI_WRITE("menu.equipid.txt=\"%s\"",device_status.imei);
|
|
|
- HMI_WRITE("menu.deviceId.txt=\"%s\"",device_status.deviceId);
|
|
|
- //HMI_WRITE("workSta.equipid.txt=\"%s\"",device_status.imei);
|
|
|
- //数据上传间隔
|
|
|
- HMI_WRITE("uploadSet.datt.val=%d",device_status.dattim);
|
|
|
- //语音音量
|
|
|
- HMI_WRITE("sysSet.vol.val=%d",device_status.vol);
|
|
|
- //更新熄屏时间
|
|
|
- if(device_status.thsp<60) device_status.thsp = device_status.thsp * 60;
|
|
|
- HMI_WRITE("thsp=%d",device_status.thsp);
|
|
|
+ //更新密码
|
|
|
+ HMI_WRITE("inputPasswd.pwdData.txt=\"8888\"");
|
|
|
+ //更新时间设置中的参数
|
|
|
+ //更新定时模式
|
|
|
+ HMI_WRITE("clockSet.timeSwitch.val=%d",device_status.timeSwitch);
|
|
|
+ //更新光控定时时长
|
|
|
+ HMI_WRITE("clockSet.sunBar.val=%d",device_status.sunBar);
|
|
|
+ //更新时控开始
|
|
|
+ HMI_WRITE("clockSet.startBar.val=%d",device_status.startBar);
|
|
|
+ //更新时控结束
|
|
|
+ HMI_WRITE("clockSet.stopBar.val=%d",device_status.stopBar);
|
|
|
+ //SIM卡状态
|
|
|
+ HMI_WRITE("workSta.bt0.val=%d",atoi(device_status.sim));
|
|
|
+ //ID
|
|
|
+ HMI_WRITE("menu.equipid.txt=\"%s\"",device_status.imei);
|
|
|
+ HMI_WRITE("menu.deviceId.txt=\"%s\"",device_status.deviceId);
|
|
|
+ //HMI_WRITE("workSta.equipid.txt=\"%s\"",device_status.imei);
|
|
|
+ //数据上传间隔
|
|
|
+ HMI_WRITE("uploadSet.datt.val=%d",device_status.dattim);
|
|
|
+ //语音音量
|
|
|
+ HMI_WRITE("sysSet.vol.val=%d",device_status.vol);
|
|
|
+ //更新熄屏时间
|
|
|
+ if(device_status.thsp<60) device_status.thsp = device_status.thsp * 60;
|
|
|
+ HMI_WRITE("thsp=%d",device_status.thsp);
|
|
|
}
|
|
|
+ HMI_WRITE("menu.cam_sta.val=%d",device_status.camsta);
|
|
|
#if BOOT_ERR == 1
|
|
|
if(atoi(device_status.gps)==1){
|
|
|
HMI_WRITE("menu.gps_state.txt=\"定位成功:(%s)%d/%d\"",device_status.gps_state,device_status.gps_inuse,device_status.gps_view);
|
|
|
@@ -1838,7 +1839,7 @@ void Check_ParamConfig(void)
|
|
|
device_status.vol = 7; //音量
|
|
|
device_status.timeSwitch = 0; //工作模式:光控
|
|
|
device_status.passWord = 8888; //屏幕密码
|
|
|
- device_status.dattim = 20; //数据上传间隔
|
|
|
+ device_status.dattim = 10; //数据上传间隔
|
|
|
device_status.ds = 1; //设备状态
|
|
|
device_status.update_flag = 0;
|
|
|
/*孢子仪*/
|
|
|
@@ -1949,7 +1950,7 @@ void Check_ParamConfig(void)
|
|
|
//工作完成标志位
|
|
|
if(device_status.dattim==0)
|
|
|
{
|
|
|
- device_status.dattim = 20;
|
|
|
+ device_status.dattim = 10;
|
|
|
}
|
|
|
/*设备类型,7孢子仪,3测报灯,默认设置测报灯*/
|
|
|
if(device_status.dtype!=7)
|
|
|
@@ -2118,17 +2119,18 @@ void ResetParamDefault(void)
|
|
|
device_status.ds = 1; //设备状态开机
|
|
|
device_status.thsp = 300;
|
|
|
device_status.passWord = 8888;
|
|
|
- device_status.dattim = 30;
|
|
|
+ device_status.dattim = 10;
|
|
|
device_status.collecting_sh1 = 9;
|
|
|
device_status.collecting_eh1 = 10;
|
|
|
device_status.collecting_sh2 = 14;
|
|
|
device_status.collecting_eh2 = 16;
|
|
|
device_status.Power_Type = 0;
|
|
|
ef_set_env_blob("Power_Type", &device_status.Power_Type, sizeof(device_status.Power_Type));
|
|
|
+
|
|
|
+ ef_set_env_blob("dattim",&device_status.dattim,sizeof(device_status.dattim)); //上传时间
|
|
|
if(device_status.dtype==3)
|
|
|
{
|
|
|
device_status.clt_time = 10; //收集时间
|
|
|
- device_status.dattim = 20; //数据上传间隔
|
|
|
#if LAMP_EN == 0
|
|
|
device_status.startBar = 20; //定时开始时间
|
|
|
device_status.stopBar = 5; //定时结束时间
|
|
|
@@ -2182,7 +2184,7 @@ void ResetParamDefault_DC(void)
|
|
|
//将温度数据设置为-15摄氏度,以便上传的数据中包含温控数据
|
|
|
rt_sprintf(device_status.tempture,"%d",-15);
|
|
|
device_status.clt_time = 10; //收集时间
|
|
|
- device_status.dattim = 20; //数据上传间隔
|
|
|
+ device_status.dattim = 10; //数据上传间隔
|
|
|
#if LAMP_EN == 0
|
|
|
device_status.startBar = 20; //定时开始时间
|
|
|
device_status.stopBar = 0; //定时结束时间
|
|
|
@@ -2205,6 +2207,7 @@ void ResetParamDefault_DC(void)
|
|
|
device_status.timeSwitch = 0;
|
|
|
device_status.Power_Type = 1;
|
|
|
device_status.handle_bugger = 0;
|
|
|
+ ef_set_env_blob("dattim",&device_status.dattim,sizeof(device_status.dattim)); //上传时间
|
|
|
ef_set_env_blob("handle_bugger", &device_status.handle_bugger, sizeof(device_status.handle_bugger));
|
|
|
ef_set_env_blob("Power_Type", &device_status.Power_Type, sizeof(device_status.Power_Type));
|
|
|
ef_set_env_blob("ds", &device_status.ds, sizeof(device_status.ds));
|