|
|
@@ -307,8 +307,8 @@ static void HMI_Decode(char *cmd,uint8_t cmd_len)
|
|
|
//更新工作状态
|
|
|
HMI_WRITE("workSta.work_sta.val=%d",device_status.work_status);
|
|
|
//箱内温度-外壳
|
|
|
- HMI_WRITE("workSta.box_tmp.txt=\"%d.%d\"",Get_Temprate()/100,Get_Temprate()%100);
|
|
|
- HMI_WRITE("temHum.box_tmp.txt=\"%d.%d\"",Get_Temprate()/100,Get_Temprate()%100);
|
|
|
+ HMI_WRITE("workSta.box_tmp.txt=\"%d\"",device_status.box_temp);
|
|
|
+ HMI_WRITE("temHum.box_tmp.txt=\"%d\"",device_status.box_temp);
|
|
|
//制冷开关
|
|
|
HMI_WRITE("workSta.cold_sw.val=%d",device_status.cold_sw);
|
|
|
HMI_WRITE("sysSet.cold_sw.val=%d",device_status.cold_sw);
|
|
|
@@ -577,7 +577,7 @@ static void HMI_Decode(char *cmd,uint8_t cmd_len)
|
|
|
if(device_status.dtype==7)
|
|
|
{
|
|
|
ctr_lamp(ON, 1);
|
|
|
- ctr_Motor_Driver(1, 0,500000,300);
|
|
|
+ ctr_Motor_Driver(1, 0,1000000,300);
|
|
|
LOG_I("开始步进上行!");
|
|
|
}
|
|
|
else
|
|
|
@@ -608,7 +608,7 @@ static void HMI_Decode(char *cmd,uint8_t cmd_len)
|
|
|
if(device_status.dtype==7)
|
|
|
{
|
|
|
ctr_lamp(ON, 1);
|
|
|
- ctr_Motor_Driver(1, 1,500000,300);
|
|
|
+ ctr_Motor_Driver(1, 1,1000000,300);
|
|
|
rt_kprintf("开始步进下行!\n");
|
|
|
}
|
|
|
else
|
|
|
@@ -1062,7 +1062,8 @@ static void HMI_Decode(char *cmd,uint8_t cmd_len)
|
|
|
device_status.version_type = 41;
|
|
|
sprintf(device_status.driver, "%s",VERSION_HK);
|
|
|
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)); //版本类型
|
|
|
+ ef_set_env_blob("dtype",&device_status.dtype,sizeof(device_status.dtype)); //版本类型+
|
|
|
+ DTU_Write("SwversionV41");
|
|
|
MA_save();
|
|
|
}
|
|
|
else {
|
|
|
@@ -1078,6 +1079,7 @@ static void HMI_Decode(char *cmd,uint8_t cmd_len)
|
|
|
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)); //版本类型
|
|
|
+ DTU_Write("SwversionV4");
|
|
|
MA_save();
|
|
|
}
|
|
|
else {
|
|
|
@@ -1126,7 +1128,7 @@ static void HMI_Decode(char *cmd,uint8_t cmd_len)
|
|
|
ef_set_env_blob("dtype",&device_status.dtype,sizeof(device_status.dtype)); //设备类型
|
|
|
ef_set_env_blob("version_type",&device_status.version_type,sizeof(device_status.version_type)); //版本类型
|
|
|
//给DTU发送设备类型标记(自适应)
|
|
|
- DTU_Write("dtye=7");
|
|
|
+ DTU_Write("SwversionV7");
|
|
|
MA_save();
|
|
|
}
|
|
|
}
|
|
|
@@ -1344,12 +1346,13 @@ static void Ctr_Mortor_entry(void* parameter)
|
|
|
if(device_status.autotakepic==1)
|
|
|
{
|
|
|
DTU_Write("autotakephoto");
|
|
|
+ HMI_WRITE("sysTest.auto_flag.txt=\"Autotest\"");
|
|
|
//打开步进电机驱动器电源
|
|
|
ctr_lamp(ON, 1);
|
|
|
//打开补光灯
|
|
|
ctr_led(ON);
|
|
|
//电机向下运动
|
|
|
- ctr_Motor_Driver(1, 1, 500000,300);
|
|
|
+ ctr_Motor_Driver(1, 1, 1000000,300);
|
|
|
rt_thread_delay(1000);
|
|
|
LOG_I("电机到达下方!!!");
|
|
|
Hk_Take_io();
|
|
|
@@ -1357,30 +1360,36 @@ static void Ctr_Mortor_entry(void* parameter)
|
|
|
LOG_I("电机开始向上!!!");
|
|
|
rt_pin_write(Motor_EN, 1);
|
|
|
rt_pin_write(Motor_DIR, 0);
|
|
|
- beep_set(500000, 500000/5); //2kzh - 50%
|
|
|
+ beep_set(1000000, 200000); //2kzh - 50%
|
|
|
while(rt_pin_read(LIMIT_UP)==1)
|
|
|
{
|
|
|
HMI_WRITE("sysTest.result.txt=\"对焦拍照触发次数:%d\"",photo_setup);
|
|
|
- rt_pin_write(Motor_EN, 0); //驱动器失能
|
|
|
- Hk_Take_io();
|
|
|
- rt_pin_write(Motor_EN, 1); //驱动器使能
|
|
|
- if(photo_setup>300)
|
|
|
+ HMI_WRITE("sysTest.auto_flag.txt=\"AutoTeststart\"");
|
|
|
+ rt_pin_write(Motor_EN, 0);
|
|
|
+ beep_set(0, 0);//驱动器失能
|
|
|
+ Hk_Take_io(); //触发拍照
|
|
|
+ rt_thread_mdelay(200); //10ms
|
|
|
+ rt_pin_write(Motor_EN, 1);
|
|
|
+ beep_set(1000000, 200000); //驱动器使能
|
|
|
+ rt_thread_mdelay(100); //10ms
|
|
|
+ beep_set(0, 0); //驱动器失能
|
|
|
+ rt_pin_write(Motor_EN, 0);
|
|
|
+ if(photo_setup>300) //限制最大拍照数量
|
|
|
{
|
|
|
ctr_led(OFF);
|
|
|
device_status.autotakepic=0;
|
|
|
rt_pin_write(Motor_EN, 0); //驱动器失能
|
|
|
- beep_set(500000, 0); //2kzh - 50%
|
|
|
+ beep_set(1000000, 0); //2kzh - 50%
|
|
|
HMI_WRITE("sysTest.switchAutopic.val=%d",0);
|
|
|
break;
|
|
|
}
|
|
|
photo_setup++;
|
|
|
- rt_thread_mdelay(10);
|
|
|
LOG_I("对焦拍照:%d",photo_setup);
|
|
|
}
|
|
|
DTU_Write("takephotodone");
|
|
|
ctr_led(OFF);
|
|
|
rt_pin_write(Motor_EN, 0); //驱动器失能
|
|
|
- beep_set(500000, 0); //2kzh - 50%
|
|
|
+ beep_set(1000000, 0); //2kzh - 50%
|
|
|
HMI_WRITE("sysTest.switchAutopic.val=%d",0);
|
|
|
char w_temp[20];
|
|
|
rt_sprintf(w_temp,"%s%d","autoTakePhoto success!!!",photo_setup);
|
|
|
@@ -1389,6 +1398,7 @@ static void Ctr_Mortor_entry(void* parameter)
|
|
|
rt_free(autotake_warn);
|
|
|
device_status.autotakepic=0;
|
|
|
photo_setup = 0;
|
|
|
+ HMI_WRITE("sysTest.auto_flag.txt=\"\"");
|
|
|
HMI_WRITE("sysTest.switchAutopic.val=%d",0);
|
|
|
//关闭步进电机驱动器电源
|
|
|
ctr_lamp(OFF, 0);
|
|
|
@@ -1403,6 +1413,7 @@ static void Ctr_Mortor_entry(void* parameter)
|
|
|
//一键测试
|
|
|
if(device_status.auto_test_sw==1)
|
|
|
{
|
|
|
+ HMI_WRITE("sysTest.auto_flag.txt=\"Autotest\"");
|
|
|
//转盘复位
|
|
|
LOG_I("转盘复位!!!");
|
|
|
HMI_WRITE("sysTest.result.txt=\"一键测试:转盘复位!\"");
|
|
|
@@ -1486,6 +1497,7 @@ static void Ctr_Mortor_entry(void* parameter)
|
|
|
ctr_led(ON);
|
|
|
device_status.autotakepic=1;
|
|
|
device_status.auto_test_sw=0;
|
|
|
+ HMI_WRITE("sysTest.auto_flag.txt=\"\"");
|
|
|
}
|
|
|
rt_thread_delay(100);
|
|
|
}
|
|
|
@@ -1763,6 +1775,8 @@ void Check_ParamConfig(void)
|
|
|
rt_sprintf(device_status.sim,"1");
|
|
|
ctr_router(ON);
|
|
|
Hmi_Fresh();
|
|
|
+ //重启后解除屏幕测试界面的按钮锁定
|
|
|
+
|
|
|
if(device_status.dtype!=7)
|
|
|
{
|
|
|
Control_clear();
|
|
|
@@ -1778,6 +1792,8 @@ void Check_ParamConfig(void)
|
|
|
//等待联网,
|
|
|
while(atoi(device_status.net)==1)
|
|
|
{
|
|
|
+ if(device_status.dtype==7)
|
|
|
+ HMI_WRITE("sysTest.auto_flag.txt=\"0\"");
|
|
|
char *readinfo = makeJson_ReadInfo();
|
|
|
DTU_Write("%s",readinfo);
|
|
|
rt_free(readinfo);
|