|
@@ -623,7 +623,7 @@ void ctr_turn(uint8_t v,uint8_t sta)
|
|
|
rt_pin_write(TURN_ZP_L, OFF);
|
|
rt_pin_write(TURN_ZP_L, OFF);
|
|
|
rt_thread_delay(10);
|
|
rt_thread_delay(10);
|
|
|
turn_cnt ++;
|
|
turn_cnt ++;
|
|
|
- if(turn_cnt==5000)
|
|
|
|
|
|
|
+ if(turn_cnt==3000)
|
|
|
{
|
|
{
|
|
|
turn_cnt = 0;
|
|
turn_cnt = 0;
|
|
|
rt_pin_write(TURN_ZP_R, OFF);
|
|
rt_pin_write(TURN_ZP_R, OFF);
|
|
@@ -641,7 +641,7 @@ void ctr_turn(uint8_t v,uint8_t sta)
|
|
|
rt_pin_write(TURN_ZP_L, OFF);
|
|
rt_pin_write(TURN_ZP_L, OFF);
|
|
|
rt_thread_delay(10);
|
|
rt_thread_delay(10);
|
|
|
turn_cnt ++;
|
|
turn_cnt ++;
|
|
|
- if(turn_cnt==5000)
|
|
|
|
|
|
|
+ if(turn_cnt==3000)
|
|
|
{
|
|
{
|
|
|
turn_cnt = 0;
|
|
turn_cnt = 0;
|
|
|
rt_pin_write(TURN_ZP_R, OFF);
|
|
rt_pin_write(TURN_ZP_R, OFF);
|
|
@@ -1285,6 +1285,9 @@ void ResetInit(void)
|
|
|
ctr_Cold(OFF);
|
|
ctr_Cold(OFF);
|
|
|
//关闭补光灯
|
|
//关闭补光灯
|
|
|
ctr_led(OFF);
|
|
ctr_led(OFF);
|
|
|
|
|
+ //转盘复位
|
|
|
|
|
+ if(device_status.run_sta==0)
|
|
|
|
|
+ ctr_turn(0, 0);
|
|
|
}
|
|
}
|
|
|
if(device_status.version_type!=6&&device_status.version_type!=7)
|
|
if(device_status.version_type!=6&&device_status.version_type!=7)
|
|
|
{
|
|
{
|
|
@@ -1632,14 +1635,14 @@ void WorkTask_BZY(void)
|
|
|
DTU_Write("collect.mp3");
|
|
DTU_Write("collect.mp3");
|
|
|
|
|
|
|
|
//转盘到涂凡士林位置
|
|
//转盘到涂凡士林位置
|
|
|
- if(device_status.run_sta!=4)
|
|
|
|
|
|
|
+ if(device_status.run_sta==0)
|
|
|
ctr_turn(90,4);
|
|
ctr_turn(90,4);
|
|
|
rt_thread_delay(2000);
|
|
rt_thread_delay(2000);
|
|
|
//涂凡士林
|
|
//涂凡士林
|
|
|
ctr_Petroleum_jelly(10);
|
|
ctr_Petroleum_jelly(10);
|
|
|
rt_thread_delay(5000);
|
|
rt_thread_delay(5000);
|
|
|
/*转盘到采集位置*/
|
|
/*转盘到采集位置*/
|
|
|
- if(device_status.run_sta!=1)
|
|
|
|
|
|
|
+ if(device_status.run_sta==4)
|
|
|
ctr_turn(90,1);
|
|
ctr_turn(90,1);
|
|
|
|
|
|
|
|
//只有开始和结束时刻不同的时间段,才有效
|
|
//只有开始和结束时刻不同的时间段,才有效
|
|
@@ -1688,13 +1691,13 @@ void WorkTask_BZY(void)
|
|
|
device_status.develop_flag=1;
|
|
device_status.develop_flag=1;
|
|
|
device_status.work_status=2; //现在是培养
|
|
device_status.work_status=2; //现在是培养
|
|
|
DTU_Write("develop.mp3");
|
|
DTU_Write("develop.mp3");
|
|
|
- if(device_status.run_sta!=2)
|
|
|
|
|
|
|
+ if(device_status.run_sta==1)
|
|
|
ctr_turn(90,2); /*转盘到培养位置*/
|
|
ctr_turn(90,2); /*转盘到培养位置*/
|
|
|
rt_thread_delay(1000);
|
|
rt_thread_delay(1000);
|
|
|
ctr_shake(ON,device_status.shake_sec);
|
|
ctr_shake(ON,device_status.shake_sec);
|
|
|
rt_thread_delay(1000);
|
|
rt_thread_delay(1000);
|
|
|
ctr_develop(); //培养
|
|
ctr_develop(); //培养
|
|
|
- if(device_status.run_sta!=3)
|
|
|
|
|
|
|
+ if(device_status.run_sta==2)
|
|
|
ctr_turn(90,3); /*转盘到拍照位置*/
|
|
ctr_turn(90,3); /*转盘到拍照位置*/
|
|
|
rt_thread_delay(1000);
|
|
rt_thread_delay(1000);
|
|
|
device_status.work_status=3; //现在是拍照
|
|
device_status.work_status=3; //现在是拍照
|