|
|
@@ -95,6 +95,7 @@ void ctr_Motor_Robot(uint8_t status_ws)
|
|
|
close_timeout = 500;
|
|
|
rt_pin_write(Motor_Power,OFF);
|
|
|
}
|
|
|
+ ctr_led(ON);
|
|
|
}
|
|
|
if(rt_pin_read(LIMIT_CLOSE)==0)
|
|
|
{
|
|
|
@@ -104,7 +105,7 @@ void ctr_Motor_Robot(uint8_t status_ws)
|
|
|
open_timeout = 0;
|
|
|
}
|
|
|
rt_pin_write(Motor_Power,OFF);
|
|
|
- rt_thread_delay(100);
|
|
|
+ rt_thread_delay(1000*2);
|
|
|
while(rt_pin_read(Motor_Direction_Button)==0)
|
|
|
{
|
|
|
while(rt_pin_read(LIMIT_OPEN)==1)
|
|
|
@@ -124,6 +125,7 @@ void ctr_Motor_Robot(uint8_t status_ws)
|
|
|
rt_pin_write(Motor_Power,OFF);
|
|
|
rt_thread_delay(50);
|
|
|
close_timeout = 0;
|
|
|
+ ctr_led(ON);
|
|
|
}
|
|
|
open_timeout = 0;
|
|
|
close_timeout = 0;
|
|
|
@@ -1523,9 +1525,19 @@ static void Work_Loop_thread_entry(void *parameter)
|
|
|
/*入口函数清扫*/
|
|
|
static void Control_Clear_thread_entry(void *parameter)
|
|
|
{
|
|
|
+ #if ROBOT_EN == 1
|
|
|
+ //磁悬浮供电
|
|
|
+ //监测磁悬浮限位位置
|
|
|
+ //根据位置确定是否 按下按钮
|
|
|
+ rt_pin_mode(EMS_Dir, PIN_MODE_OUTPUT);
|
|
|
+ rt_pin_write(EMS_Dir, 0);
|
|
|
+ rt_thread_delay(50);
|
|
|
+ rt_pin_write(EMS_Dir, 1);
|
|
|
+ #endif
|
|
|
while(1)
|
|
|
{
|
|
|
#if ROBOT_EN ==1
|
|
|
+ ctr_led(ON);
|
|
|
ctr_Motor_Robot(ON);
|
|
|
#else
|
|
|
if(device_status.clear_status==1)
|
|
|
@@ -1556,14 +1568,14 @@ static void Control_Heat_thread_entry(void *parameter)
|
|
|
int Control_clear(void)
|
|
|
{
|
|
|
/* 创建线程*/
|
|
|
- tid_heat = rt_thread_create("Control_Clear_thread_entry",
|
|
|
- Control_Heat_thread_entry, RT_NULL,
|
|
|
+ tid_ctr = rt_thread_create("Control_Clear_thread_entry",
|
|
|
+ Control_Clear_thread_entry, RT_NULL,
|
|
|
512, //2048
|
|
|
24, //23
|
|
|
WORK_CHECK_THREAD_TIMESLICE); //5
|
|
|
- if(tid_heat!=RT_NULL)
|
|
|
+ if(tid_ctr!=RT_NULL)
|
|
|
{
|
|
|
- rt_thread_startup(tid_heat);
|
|
|
+ rt_thread_startup(tid_ctr);
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
@@ -1572,13 +1584,13 @@ int Control_heat(void)
|
|
|
{
|
|
|
/* 创建线程*/
|
|
|
tid_heat = rt_thread_create("Control_Heat_thread_entry",
|
|
|
- Control_Clear_thread_entry, RT_NULL,
|
|
|
+ Control_Heat_thread_entry, RT_NULL,
|
|
|
512, //2048
|
|
|
25, //23
|
|
|
WORK_CHECK_THREAD_TIMESLICE); //5
|
|
|
- if(tid_ctr!=RT_NULL)
|
|
|
+ if(tid_heat!=RT_NULL)
|
|
|
{
|
|
|
- rt_thread_startup(tid_ctr);
|
|
|
+ rt_thread_startup(tid_heat);
|
|
|
}
|
|
|
return 0;
|
|
|
}
|