update 完成控制基本逻辑
This commit is contained in:
@ -6,6 +6,7 @@ from Model.Position import Real_Position
|
||||
class MoveType(Enum):
|
||||
AXIS = 4
|
||||
WORLD = 10
|
||||
Cure = 17
|
||||
|
||||
class DATARequest:
|
||||
def __init__(self):
|
||||
@ -137,6 +138,12 @@ class Instruction:
|
||||
self.m3 = 0.0
|
||||
self.m4 = 0.0
|
||||
self.m5 = 0.0
|
||||
self.m0_p = 0.0
|
||||
self.m1_p = 0.0
|
||||
self.m2_p = 0.0
|
||||
self.m3_p = 0.0
|
||||
self.m4_p = 0.0
|
||||
self.m5_p = 0.0
|
||||
self.ckStatus = '0x3F'
|
||||
self.speed = 10
|
||||
self.delay = 1.0
|
||||
@ -153,6 +160,11 @@ class Instruction:
|
||||
model_str = f'"oneshot":"{self.oneshot}","action":"{self.action}","m0":"{self.m0}","m1":"{self.m1}","m2":"{self.m2}",' \
|
||||
f'"m3":"{self.m3}","m4":"{self.m4}","m5":"{self.m5}","ckStatus":"{self.ckStatus}","speed":"{self.speed}",' \
|
||||
f'"delay":"{self.delay}","smooth":"{self.smooth}","tool":"{self.tool}"'
|
||||
if self.action == 17:
|
||||
model_str = f'"oneshot":"{self.oneshot}","action":"{self.action}","m0":"{self.m0}","m1":"{self.m1}","m2":"{self.m2}",' \
|
||||
f'"m3":"{self.m3}","m4":"{self.m4}","m5":"{self.m5}","m0_p":"{self.m0_p}","m1_p":"{self.m1_p}","m2_p":"{self.m2_p}",' \
|
||||
f'"m3_p":"{self.m3_p}","m4_p":"{self.m4_p}","m5_p":"{self.m5_p}","ckStatus":"{self.ckStatus}","speed":"{self.speed}",' \
|
||||
f'"delay":"{self.delay}","smooth":"{self.smooth}","tool":"{self.tool}"'
|
||||
else:
|
||||
model_str = f'"oneshot":"{self.oneshot}","action":"{200}","type":"{self.type}","io_status":"{self.io_status}"' \
|
||||
f',"point":"{self.point}","delay":"{self.delay}"'
|
||||
|
||||
Reference in New Issue
Block a user