|
|
@@ -1366,6 +1366,8 @@ static void Ctr_Mortor_entry(void* parameter)
|
|
|
rt_int16_t photo_led_sec = 900; //55S
|
|
|
rt_uint8_t num_tg_open = 200; //20S
|
|
|
rt_uint8_t num_tg_init = 200;
|
|
|
+ static rt_uint16_t route_off_t = 0;
|
|
|
+ device_status.route_off_t = 0;
|
|
|
//int current_t[200];
|
|
|
/*孢子仪拍照数量*/
|
|
|
rt_uint16_t photo_setup = 0;
|
|
|
@@ -1779,6 +1781,21 @@ static void Ctr_Mortor_entry(void* parameter)
|
|
|
selfcheck(0);
|
|
|
}
|
|
|
|
|
|
+ if(device_status.route_off_t!=0)
|
|
|
+ {
|
|
|
+ ctr_router(OFF);
|
|
|
+ route_off_t = device_status.route_off_t * 60 * 10;
|
|
|
+ device_status.route_off_t = 0;
|
|
|
+ }
|
|
|
+ if(route_off_t>0)
|
|
|
+ {
|
|
|
+ route_off_t--;
|
|
|
+ if(route_off_t==1)
|
|
|
+ {
|
|
|
+ ctr_router(ON);
|
|
|
+ route_off_t = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
rt_thread_delay(100);
|
|
|
}
|
|
|
}
|
|
|
@@ -1879,7 +1896,7 @@ void Check_ParamConfig(void)
|
|
|
device_status.collecting_sh2 = 14;
|
|
|
device_status.collecting_eh2 = 16;
|
|
|
device_status.cold_sw = 0;
|
|
|
- device_status.heat_sw =0;
|
|
|
+ device_status.heat_sw = 0;
|
|
|
device_status.cul_time = 1;
|
|
|
device_status.run_sta = 0;
|
|
|
device_status.handle_bugger = 0; //默认排虫
|
|
|
@@ -2040,6 +2057,7 @@ void Check_ParamConfig(void)
|
|
|
LOG_I("定时结束时间:%d",device_status.stopBar);
|
|
|
LOG_I("timeSwitch:%d",device_status.timeSwitch);
|
|
|
LOG_I("光控定时时长:%d",device_status.sunBar);
|
|
|
+ LOG_I("加热开关:%d",device_status.heat_sw);
|
|
|
LOG_I("加热时间:%d",device_status.heattime);
|
|
|
LOG_I("加热温度:%d",device_status.heatvalue);
|
|
|
LOG_I("震动开关:%d",device_status.shake_ws);
|
|
|
@@ -2096,9 +2114,9 @@ void Check_ParamConfig(void)
|
|
|
while(atoi(device_status.net)==1)
|
|
|
{
|
|
|
if(Read_Real_Voltage()/100>5&&device_status.power_status==0)
|
|
|
- ctr_RTU_DTU(ON);
|
|
|
+ ctr_RTU_DTU(ON);
|
|
|
if(device_status.dtype==7)
|
|
|
- HMI_WRITE("sysTest.auto_flag.txt=\"0\"");
|
|
|
+ HMI_WRITE("sysTest.auto_flag.txt=\"0\"");
|
|
|
char *readinfo = makeJson_ReadInfo();
|
|
|
DTU_Write("%s",readinfo);
|
|
|
rt_free(readinfo);
|
|
|
@@ -2106,8 +2124,8 @@ void Check_ParamConfig(void)
|
|
|
connect_num++;
|
|
|
LOG_I("联网中......%d",connect_num);
|
|
|
//超时时间为3分钟
|
|
|
- #ifdef MATCH_DEVICE == 1
|
|
|
- if(connect_num==30) //180
|
|
|
+ #if MATCH_DEVICE == 1
|
|
|
+ if(connect_num==60) //180
|
|
|
{
|
|
|
device_status.timeSwitch = 1;
|
|
|
LOG_W("Time not set:%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);
|
|
|
@@ -2140,10 +2158,12 @@ void Check_ParamConfig(void)
|
|
|
connect_num++;
|
|
|
if(connect_num>5) break;
|
|
|
}
|
|
|
- if(device_status.version_type==6) device_status.timeSwitch = 1;
|
|
|
+
|
|
|
+ if(device_status.version_type==6) device_status.timeSwitch = 1; //吸虫塔,只有时控
|
|
|
|
|
|
DTU_Write("%s",makeJson_Warn("turnon", "device_stm32"));
|
|
|
rt_thread_delay(1000);
|
|
|
+ dtu_send_data_start();
|
|
|
if(device_status.dtype!=7&&device_status.version_type!=30)
|
|
|
{
|
|
|
Workstatus_check();
|
|
|
@@ -2177,6 +2197,7 @@ void ResetParamDefault(void)
|
|
|
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)); //上传时间
|
|
|
@@ -2199,6 +2220,8 @@ void ResetParamDefault(void)
|
|
|
device_status.tpl = -5; //低温保护阈值
|
|
|
device_status.timeSwitch = 0; //定时模式:光控
|
|
|
device_status.heatvalue=100; //加热温度
|
|
|
+ device_status.heat_sw = 1;
|
|
|
+ ef_set_env_blob("heat_sw", &device_status.heat_sw, sizeof(device_status.heat_sw));
|
|
|
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));
|
|
|
@@ -2259,6 +2282,7 @@ void ResetParamDefault_DC(void)
|
|
|
device_status.timeSwitch = 0;
|
|
|
device_status.Power_Type = 1;
|
|
|
device_status.handle_bugger = 0;
|
|
|
+ device_status.heat_sw = 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));
|
|
|
@@ -2276,6 +2300,7 @@ void ResetParamDefault_DC(void)
|
|
|
ef_set_env_blob("shake_sec", &device_status.shake_sec, sizeof(device_status.shake_sec)); //震动时间
|
|
|
ef_set_env_blob("thsp", &device_status.thsp, sizeof(device_status.thsp));
|
|
|
ef_set_env_blob("passWord", &device_status.passWord,sizeof(device_status.passWord));
|
|
|
+ ef_set_env_blob("heat_sw", &device_status.heat_sw,sizeof(device_status.heat_sw));
|
|
|
DTU_Write("reset.mp3");
|
|
|
rt_thread_delay(1000);
|
|
|
}
|