|
|
@@ -568,7 +568,10 @@ static void HMI_Decode(void)
|
|
|
//清扫
|
|
|
else if (strstr(rx_buffer,"clear")!=NULL) {
|
|
|
rt_kprintf("\n清扫!\n");
|
|
|
- if(device_status.version_type==4||device_status.version_type==41||device_status.version_type==42||device_status.version_type==12)
|
|
|
+ if(device_status.version_type==4|| //水稻
|
|
|
+ device_status.version_type==41|| //4.0
|
|
|
+ device_status.version_type==42|| //低端款
|
|
|
+ device_status.version_type==12) //高空带拍照
|
|
|
{
|
|
|
device_status.clear_status=1;
|
|
|
}
|
|
|
@@ -1260,6 +1263,19 @@ static void HMI_Decode(void)
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+ //中端款
|
|
|
+ else if (strstr(rx_buffer,"SwversionV43")!=NULL) {
|
|
|
+ device_status.dtype = 3;
|
|
|
+ if(device_status.version_type != 43)
|
|
|
+ {
|
|
|
+ device_status.dtype = 3;
|
|
|
+ device_status.version_type = 43;
|
|
|
+ sprintf(device_status.driver, "%s",VERSION_HK_2000W);
|
|
|
+ ef_set_env_blob("version_type",&device_status.version_type,sizeof(device_status.version_type)); //版本类型
|
|
|
+ ef_set_env_blob("dtype",&device_status.dtype,sizeof(device_status.dtype)); //版本类型+
|
|
|
+ MA_save();
|
|
|
+ }
|
|
|
+ }
|
|
|
//低端款
|
|
|
else if (strstr(rx_buffer,"SwversionV42")!=NULL) {
|
|
|
device_status.dtype = 3;
|
|
|
@@ -1492,6 +1508,7 @@ static void Ctr_Mortor_entry(void* parameter)
|
|
|
ctr_cangmen_up(OFF);
|
|
|
num_up_open = 200;
|
|
|
}
|
|
|
+ num_up_close = 200;
|
|
|
}
|
|
|
else if(device_status.ctr_up_motor==2)
|
|
|
{
|
|
|
@@ -1502,31 +1519,29 @@ static void Ctr_Mortor_entry(void* parameter)
|
|
|
ctr_cangmen_up(OFF);
|
|
|
num_up_close= 200;
|
|
|
}
|
|
|
+ num_up_open = 200;
|
|
|
}
|
|
|
if (device_status.ctr_down_motor == 1)
|
|
|
{
|
|
|
ctr_cangmen_down(OPEN);
|
|
|
num_down_open--;
|
|
|
- //如果关闭仓门1S后检测不到电流增大,则判定为异常
|
|
|
if (num_down_open == 0)
|
|
|
{
|
|
|
ctr_cangmen_down(OFF);
|
|
|
num_down_open = 200;
|
|
|
}
|
|
|
-// LOG_D("下仓门打开电流:%d",current_t[num_down_open]);
|
|
|
+ num_down_close = 200;
|
|
|
}
|
|
|
else if (device_status.ctr_down_motor == 2)
|
|
|
{
|
|
|
ctr_cangmen_down(CLOSE);
|
|
|
num_down_close--;
|
|
|
-// current_t[num_down_close] = atoi(device_status.power);
|
|
|
-
|
|
|
if (num_down_close == 0)
|
|
|
{
|
|
|
ctr_cangmen_down(OFF);
|
|
|
num_down_close = 200;
|
|
|
}
|
|
|
-// LOG_D("下仓门关闭电流:%d",current_t[num_down_close]);
|
|
|
+ num_down_open = 200;
|
|
|
}
|
|
|
if(device_status.sun_test==1)
|
|
|
{
|
|
|
@@ -2081,6 +2096,7 @@ void Check_ParamConfig(void)
|
|
|
LOG_I("PowerType:%d",device_status.Power_Type);
|
|
|
LOG_I("deviceId:%s",device_status.deviceId);
|
|
|
LOG_I("handle_bugger:%d",device_status.handle_bugger);
|
|
|
+ LOG_W("heat_sw加热开关:%d",device_status.heat_sw);
|
|
|
}
|
|
|
//RTC时间判断,如果当前年份小于2020,提示需要设置时间,切换为光控
|
|
|
if(device_status.update_flag==1)
|
|
|
@@ -2170,6 +2186,9 @@ void ResetParamDefault(void)
|
|
|
device_status.collecting_sh2 = 14;
|
|
|
device_status.collecting_eh2 = 16;
|
|
|
device_status.Power_Type = 0;
|
|
|
+ device_status.heat_sw = 1;
|
|
|
+
|
|
|
+ ef_set_env_blob("heat_sw", &device_status.heat_sw, sizeof(device_status.heat_sw));
|
|
|
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)); //上传时间
|
|
|
@@ -2252,6 +2271,8 @@ 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("heat_sw",&device_status.heat_sw,sizeof(device_status.heat_sw)); //上传时间
|
|
|
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));
|