Skip to content
Snippets Groups Projects
Commit be9e0de9 authored by ft-Demo's avatar ft-Demo
Browse files

commit by robo pro coding

parent 52cd1981
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
......@@ -33,7 +33,7 @@ def thread_VGR():
global _tr0, _tr, _dg, b, num, offset_y, poslist, i_pos
logging.log(logging.TRACE_VGR, '-')
offset_y = 200
poslist = [[15, 700, 50], [310, 700, 500], [600, 700, 300]]
poslist = [[20, 700, 50], [310, 700, 500], [600, 700, 300]]
init_VGR()
moveRef_VGR_P123()
while True:
......@@ -41,21 +41,26 @@ def thread_VGR():
enable_buttons(False)
for i_pos in poslist:
moveAbs_VGR_P123_list(i_pos)
pickUpSetDown()
moveRel_VGR_S123(0, offset_y, 0)
grip()
time.sleep(0.8)
moveRel_VGR_S123(0, -offset_y, 0)
time.sleep(1)
moveAbs_VGR_P123_list(get_pos(1))
moveRel_VGR_S123(0, offset_y, 0)
release()
moveRel_VGR_S123(0, -offset_y, 0)
time.sleep(1)
moveRef_VGR_P123()
enable_buttons(True)
time.sleep(0.01)
def thread_GUI():
global _tr0, _tr, _dg, b, num, offset_y, poslist, i_pos
while True:
display.set_attr("txt_label_message.text", str(get_abspos()))
time.sleep(1)
display.set_attr("txt_label_message.text", str('<h3>pos [x,y,z]: {}</h3>'.format(get_abspos())))
time.sleep(0.4)
def enable_buttons(b):
......@@ -78,15 +83,6 @@ def get_pos(num):
return poslist[int(num - 1)]
def pickUpSetDown():
global _tr0, _tr, _dg, b, num, offset_y, poslist, i_pos
logging.log(logging.TRACE_GUI, '-')
moveRel_VGR_S123(0, offset_y, 0)
grip()
time.sleep(0.8)
moveRel_VGR_S123(0, -offset_y, 0)
def grip():
global _tr0, _tr, _dg, b, num, offset_y, poslist, i_pos
logging.log(logging.TRACE_VGR, '-')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment