Skip to content

Commit a5ded25

Browse files
committed
fix 280 riscv aikit bug
1 parent 4eb50bc commit a5ded25

File tree

6 files changed

+19
-14
lines changed

6 files changed

+19
-14
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
['165', '0', '100']
1+
['170', '25', '100']
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
['175', '0', '64']
1+
['165', '45', '64']
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
['165', '5', '64']
1+
['165', '15', '64']
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
['165', '-5', '64']
1+
['165', '20', '64']
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
['165', '0', '64']
1+
['165', '25', '64']

main.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,11 +1435,11 @@ def show_camera(self):
14351435
self.is_picking = True
14361436

14371437
def pick_task():
1438-
if self.crawl_status:
1439-
self.decide_move(self.real_x, self.real_y, self.color)
1440-
# global is_picking, cooldown_counter
1441-
self.is_picking = False
1442-
self.cooldown_counter = 20 # 设置冷却帧数,防止连续触发
1438+
# if self.crawl_status:
1439+
self.decide_move(self.real_x, self.real_y, self.color)
1440+
# global is_picking, cooldown_counter
1441+
self.is_picking = False
1442+
self.cooldown_counter = 20 # 设置冷却帧数,防止连续触发
14431443

14441444
threading.Thread(target=pick_task).start()
14451445
else:
@@ -2086,6 +2086,8 @@ def decide_move(self, x, y, color):
20862086
def moved(self, x, y):
20872087
try:
20882088
# print('xy',x, y)
2089+
# 机械臂执行过程中,禁用某些控件编辑
2090+
self.controls_disable_place_offset(False)
20892091
self.is_crawl = True
20902092
while self.is_pick:
20912093
QApplication.processEvents()
@@ -2115,8 +2117,6 @@ def moved(self, x, y):
21152117
if self.is_crawl:
21162118
if self.crawl_status:
21172119
self.is_crawl = False
2118-
# 机械臂执行过程中,禁用某些控件编辑
2119-
self.controls_disable_place_offset(False)
21202120
if device == 'ultraArm P340':
21212121
self.myCobot.set_angles(self.move_angles[1], 20)
21222122
self.stop_wait(3)
@@ -2297,6 +2297,7 @@ def moved(self, x, y):
22972297

22982298
# close pump
22992299
self.pump_off()
2300+
self.stop_wait(2)
23002301

23012302
# self.stop_wait(4)
23022303
if device == 'ultraArm P340':
@@ -2417,6 +2418,10 @@ def add_img(self):
24172418
return
24182419
if not self.camera_status:
24192420
self.open_camera()
2421+
if self.language == 1:
2422+
self.prompts('Put the image you want to recognize into the camera area, and click the Cut button.')
2423+
else:
2424+
self.prompts('将要识别的图像放入相机区域,然后单击剪切按钮。')
24202425
while self.camera_status:
24212426
while self.camera_status:
24222427
QApplication.processEvents()
@@ -2551,10 +2556,10 @@ def prompts(self, msg=None):
25512556
if msg is not None:
25522557
if self.language == 1:
25532558
self.prompts_lab.setText('Prmpt:\n' + msg)
2554-
QApplication.processEvents()
2559+
# QApplication.processEvents()
25552560
else:
25562561
self.prompts_lab.setText('提示:\n' + msg)
2557-
QApplication.processEvents()
2562+
QApplication.processEvents()
25582563

25592564
def combox_func_checked(self):
25602565
try:

0 commit comments

Comments
 (0)