修正震动点不动的bug
This commit is contained in:
18
CU/Catch.py
18
CU/Catch.py
@ -65,19 +65,19 @@ class Catch:
|
|||||||
self.drop_continue.SetReset()
|
self.drop_continue.SetReset()
|
||||||
|
|
||||||
if self.catch_status == CatchStatus.CShake: # 1500
|
if self.catch_status == CatchStatus.CShake: # 1500
|
||||||
self.shake_Q = not self.shake_Q # 10
|
self.shake_Q = not self.shake_Q # 10
|
||||||
# self.robotClient.sendIOControl(self.robotClient.con_ios[2], 1 if self.shake_Q else 0)
|
if not self.shake_continue.Q(True, 600):
|
||||||
if self.shake_Q:
|
if self.shake_Q:
|
||||||
open(0, 0, 1)
|
open(0, 0, 1)
|
||||||
else:
|
else:
|
||||||
close(0, 0, 1)
|
close(0, 0, 1)
|
||||||
# else:
|
else:
|
||||||
# self.shake_continue.SetReset()
|
self.shake_continue.SetReset()
|
||||||
# self.catch_status = CatchStatus.COk
|
self.catch_status = CatchStatus.COk
|
||||||
# #if Constant.Debug or self.robotClient.check_outputQ(self.robotClient.con_ios[2]):
|
#if Constant.Debug or self.robotClient.check_outputQ(self.robotClient.con_ios[2]):
|
||||||
# # self.robotClient.sendIOControl(self.robotClient.con_ios[2], 0)
|
# self.robotClient.sendIOControl(self.robotClient.con_ios[2], 0)
|
||||||
# close(0, 0, 1)
|
close(0, 0, 1)
|
||||||
# print("震动结束")
|
print("震动结束")
|
||||||
|
|
||||||
if self.catch_status == CatchStatus.COk :
|
if self.catch_status == CatchStatus.COk :
|
||||||
# self.robotClient.sendIOControl(self.robotClient.con_ios[1], 0,emptyList='1')
|
# self.robotClient.sendIOControl(self.robotClient.con_ios[1], 0,emptyList='1')
|
||||||
|
|||||||
@ -485,19 +485,16 @@ class Feeding(QObject):
|
|||||||
if self.get_current_position().get_position().compare(real_position,is_action=True):
|
if self.get_current_position().get_position().compare(real_position,is_action=True):
|
||||||
# TODO 震动方案
|
# TODO 震动方案
|
||||||
self.log_signal.emit(logging.INFO, Constant.str_feed_shake)
|
self.log_signal.emit(logging.INFO, Constant.str_feed_shake)
|
||||||
|
if self.catch.catch_status == CatchStatus.COk:
|
||||||
|
self.catch.catch_status = CatchStatus.CNone
|
||||||
|
self.next_position()
|
||||||
if self.catch.catch_status == CatchStatus.CNone:
|
if self.catch.catch_status == CatchStatus.CNone:
|
||||||
self.catch.catch_status = CatchStatus.CShake
|
self.catch.catch_status = CatchStatus.CShake
|
||||||
return
|
return
|
||||||
if self.catch.catch_status == CatchStatus.CShake:
|
if self.catch.catch_status == CatchStatus.CShake:
|
||||||
return
|
return
|
||||||
|
|
||||||
if self.feedConfig.feedLine.start_to_take[self.feedConfig.feedLine.feeding2end_pos_index+1].status != FeedStatus.FShake:
|
|
||||||
self.catch.catch_status = CatchStatus.COk
|
|
||||||
|
|
||||||
if self.catch.catch_status == CatchStatus.COk:
|
|
||||||
self.catch.catch_status = CatchStatus.CNone
|
|
||||||
self.next_position()
|
|
||||||
|
|
||||||
elif self.feedStatus == FeedStatus.FDropBag:
|
elif self.feedStatus == FeedStatus.FDropBag:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user