|
|
@@ -2460,8 +2460,9 @@ void WorkTask_XYV3(void)
|
|
|
time(&time_take);
|
|
|
static struct tm alarm_takephpoto;
|
|
|
alarm_takephpoto =*localtime(&time_take);
|
|
|
- if((alarm_takephpoto.tm_hour)==17&&(alarm_takephpoto.tm_min==00)&&(alarm_takephpoto.tm_sec==00))
|
|
|
+ if((alarm_takephpoto.tm_hour)==17&&(alarm_takephpoto.tm_min==0)&&(alarm_takephpoto.tm_sec==0))
|
|
|
{
|
|
|
+ device_status.photo_ws = 1;
|
|
|
break;
|
|
|
}
|
|
|
LOG_I("当前时间:%d:%d:%d",alarm_takephpoto.tm_hour,alarm_takephpoto.tm_min,alarm_takephpoto.tm_sec);
|
|
|
@@ -2529,6 +2530,7 @@ static void Work_Loop_thread_entry(void *parameter)
|
|
|
rt_thread_delay(1000);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
/*入口函数清扫*/
|
|
|
static void Control_Clear_thread_entry(void *parameter)
|
|
|
{
|
|
|
@@ -2563,111 +2565,14 @@ static void Control_Clear_thread_entry(void *parameter)
|
|
|
/*入口函数加热*/
|
|
|
static void Control_Heat_thread_entry(void *parameter)
|
|
|
{
|
|
|
-
|
|
|
- uint16_t var_clear = 0;
|
|
|
- #if ROBOT_EN == 1
|
|
|
- static uint8_t key_on = 0;
|
|
|
- #else
|
|
|
- #if Color_EN == 0
|
|
|
- while(device_status.work_status==0)
|
|
|
- {
|
|
|
- rt_thread_delay(1000);
|
|
|
- }
|
|
|
- #endif
|
|
|
- #endif
|
|
|
+ rt_pin_mode(SIGNAL_CJS, PIN_MODE_INPUT);
|
|
|
while(1)
|
|
|
{
|
|
|
- #if ROBOT_EN == 1
|
|
|
- //磁悬浮供电
|
|
|
- //监测磁悬浮限位位置`
|
|
|
- LOG_D("Read 磁悬浮:%d",device_status.heattem);
|
|
|
- //等待10S
|
|
|
- if(device_status.heattem<30&&Read_Real_Voltage()/100>12) //磁悬浮处于关闭状态
|
|
|
- {
|
|
|
- key_on = 0;
|
|
|
- //发送触摸按钮信号
|
|
|
- rt_pin_mode(EMS_Dir, PIN_MODE_OUTPUT);
|
|
|
- rt_pin_write(EMS_Dir, 0);
|
|
|
- rt_thread_delay(50);
|
|
|
- rt_pin_write(EMS_Dir, 1);
|
|
|
- }
|
|
|
- else if (device_status.heattem<30&&Read_Real_Voltage()/100<12) {
|
|
|
- ctr_router(OFF);
|
|
|
- }
|
|
|
- if(device_status.heattem>40)
|
|
|
- {
|
|
|
- key_on = 1;
|
|
|
+ if(rt_pin_read(SIGNAL_GS)==0){
|
|
|
rt_thread_delay(1000);
|
|
|
- LOG_D("Read 磁悬浮已打开:%d",device_status.heattem);
|
|
|
- }
|
|
|
-
|
|
|
- //磁悬浮供电
|
|
|
- //监测磁悬浮限位位置
|
|
|
- //根据位置确定是否 按下按钮+
|
|
|
- if(Read_Real_Voltage()/100<12&&key_on==1)
|
|
|
- {
|
|
|
- key_on = 0;
|
|
|
- rt_pin_mode(EMS_Dir, PIN_MODE_OUTPUT);
|
|
|
- rt_pin_write(EMS_Dir, 0);
|
|
|
- rt_thread_delay(50);
|
|
|
- rt_pin_write(EMS_Dir, 1);
|
|
|
- }
|
|
|
- #else
|
|
|
- #if Color_EN == 1
|
|
|
- /*黄板归位*/
|
|
|
- if(Read_Color_Key(KEY_BACK)==1)
|
|
|
- {
|
|
|
- LOG_W("黄板归位!");
|
|
|
- ctr_Color_board(CLOSE, 300);
|
|
|
- rt_thread_delay(5000);
|
|
|
+ device_status.yc_ct +=1;
|
|
|
}
|
|
|
- #else
|
|
|
- if(device_status.work_status==1&&device_status.heat_sw==1)
|
|
|
- {
|
|
|
- ctr_lamp(ON, 1);
|
|
|
- rt_thread_delay(10000);
|
|
|
- calorstat(device_status.heattime*60);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- LOG_I("Not calorstat!");
|
|
|
- }
|
|
|
- if(device_status.work_status==1&&device_status.version_type==5)
|
|
|
- {
|
|
|
- var_clear++;
|
|
|
- if(var_clear==300)
|
|
|
- {
|
|
|
- var_clear = 0;
|
|
|
- ctr_cangmen_down(ON);
|
|
|
- rt_thread_mdelay(5000);
|
|
|
- ctr_cangmen_down(OFF);
|
|
|
- rt_thread_mdelay(500);
|
|
|
- ctr_cangmen_down(ON);
|
|
|
- rt_thread_mdelay(5000);
|
|
|
- ctr_cangmen_down(OFF);
|
|
|
- }
|
|
|
- }
|
|
|
-// //吸虫塔补光灯测试
|
|
|
-// while(device_status.vol!=200)
|
|
|
-// {
|
|
|
-// if(var_led==0) ctr_led(ON);
|
|
|
-// var_led++;
|
|
|
-// if(var_led>10)
|
|
|
-// {
|
|
|
-// ctr_led(OFF);
|
|
|
-// var_ledoff++;
|
|
|
-// if(var_ledoff>10)
|
|
|
-// {
|
|
|
-// var_led = 0;
|
|
|
-// var_ledoff = 0;
|
|
|
-// ctr_led(ON);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// rt_thread_delay(1000);
|
|
|
-// }
|
|
|
- rt_thread_delay(1000);
|
|
|
- #endif
|
|
|
- #endif
|
|
|
+ rt_thread_delay(20);
|
|
|
}
|
|
|
}
|
|
|
/*清扫线程*/
|