|
|
@@ -268,13 +268,23 @@ static void HMI_Decode(void)
|
|
|
//更新下仓门状态
|
|
|
HMI_WRITE("workSta.downStatus.val=%d",device_status.down_status);
|
|
|
|
|
|
- HMI_WRITE("menu.eth1_sta.val=%d",!device_status.camera_sta);
|
|
|
+ HMI_WRITE("menu.eth1_sta.val=%d",device_status.camera_sta);
|
|
|
//更新工作状态
|
|
|
HMI_WRITE("menu.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);
|
|
|
+ if(device_status.rain_status){
|
|
|
+ HMI_WRITE("menu.t6.pco=63488");
|
|
|
+ }else{
|
|
|
+ HMI_WRITE("menu.t6.pco=65535");
|
|
|
+ }
|
|
|
+ //更新温控状态
|
|
|
+ if(device_status.temp_status){
|
|
|
+ HMI_WRITE("menu.t5.pco=63488");
|
|
|
+ }else{
|
|
|
+ HMI_WRITE("menu.t5.pco=65535");
|
|
|
+ }
|
|
|
+
|
|
|
//更新光控状态
|
|
|
HMI_WRITE("workSta.sunStatus.val=%d",device_status.sun_status);
|
|
|
//更新有线连接状态
|
|
|
@@ -382,7 +392,7 @@ static void HMI_Decode(void)
|
|
|
rt_free(takephotojson);
|
|
|
HMI_WRITE("sysTest.switchPhoto.val=0");
|
|
|
#else
|
|
|
- device_status.photo_ws = 1;
|
|
|
+ device_status.photo_ws = 2;
|
|
|
#endif
|
|
|
}
|
|
|
else if (strstr(rx_buffer,"putTest.switchPic=1")!=NULL) {
|
|
|
@@ -394,7 +404,7 @@ static void HMI_Decode(void)
|
|
|
rt_free(takephotojson);
|
|
|
HMI_WRITE("sysTest.switchPhoto.val=0");
|
|
|
#else
|
|
|
- device_status.photo_ws = 1;
|
|
|
+ device_status.photo_ws = 2;
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
@@ -966,6 +976,7 @@ void Check_ParamConfig(void)
|
|
|
device_status.run_sta = 0;
|
|
|
device_status.InsectSpecies = 0;
|
|
|
device_status.Power_Type = 0;
|
|
|
+ device_status.cul_time = 60;
|
|
|
sprintf(device_status.deviceId,"0");
|
|
|
sprintf(device_status.driver, "%s",VERSION);
|
|
|
rt_sprintf(device_status.tempture, "-15");
|
|
|
@@ -973,6 +984,7 @@ void Check_ParamConfig(void)
|
|
|
rt_sprintf(device_status.mqttcfg1, "8.136.98.49");
|
|
|
ef_set_env_blob("iSave", &device_status.iSave, sizeof(device_status.iSave)); //
|
|
|
ef_set_env_blob("ds", &device_status.ds, sizeof(device_status.ds));
|
|
|
+ ef_set_env_blob("cul_time", &device_status.cul_time, sizeof(device_status.cul_time)); //
|
|
|
ef_set_env_blob("stime", &device_status.clt_time, sizeof(device_status.clt_time));
|
|
|
ef_set_env_blob("startBar", &device_status.startBar, sizeof(device_status.startBar));
|
|
|
ef_set_env_blob("stopBar", &device_status.stopBar, sizeof(device_status.stopBar));
|
|
|
@@ -1033,7 +1045,9 @@ void Check_ParamConfig(void)
|
|
|
ef_get_env_blob("Power_Type",&device_status.Power_Type,sizeof(device_status.Power_Type),NULL); //昆虫种类
|
|
|
ef_get_env_blob("deviceId",&device_status.deviceId,sizeof(device_status.deviceId),NULL); //昆虫种类
|
|
|
ef_get_env_blob("sleep_mode",&device_status.sleep_mode,sizeof(device_status.sleep_mode),NULL); //休眠开关
|
|
|
+ ef_get_env_blob("cul_time",&device_status.cul_time,sizeof(device_status.cul_time),NULL); //诱虫时间
|
|
|
device_status.light_over_tim = device_status.sunBar * 3600; //光控计数
|
|
|
+
|
|
|
device_status.work_done = 0;
|
|
|
//工作完成标志位
|
|
|
if(device_status.dattim==0)
|
|
|
@@ -1044,7 +1058,7 @@ void Check_ParamConfig(void)
|
|
|
device_status.version_type = 8;
|
|
|
rt_sprintf(device_status.driver, "%s",VERSION);
|
|
|
if(device_status.Power_Type>1) device_status.Power_Type = 0;
|
|
|
-
|
|
|
+ if(device_status.clt_time==0) device_status.clt_time = 60;
|
|
|
LOG_I("SOFTWARE VERSION:%s-imei:%s--iccid:%s",device_status.driver,device_status.imei,device_status.iccid);
|
|
|
LOG_I("read flash paramconfis:%d-%s-%s",device_status.version_type,device_status.driver_bl,device_status.driver_compile);
|
|
|
LOG_I("开机次数:%d",device_status.rebootcnt);
|