curv
This commit is contained in:
parent
fa7bd00298
commit
4985757262
|
@ -24,37 +24,9 @@ def send_data(data):
|
|||
else:
|
||||
pprint(response)
|
||||
|
||||
# send_data({
|
||||
# "dsID": "www.hc-system.com.RemoteMonitor",
|
||||
# "reqType": "query",
|
||||
# "packID": "0",
|
||||
# "queryAddr": ["RemoteCmdLen"],
|
||||
# })
|
||||
|
||||
# send_data({
|
||||
# "dsID": "www.hc-system.com.HCRemoteCommand",
|
||||
# "reqType": "AddRCC",
|
||||
# "emptyList": "1",
|
||||
# "packID": "0",
|
||||
# "instructions": [{"oneshot": "1", "action": "4",
|
||||
# "m0":"79.287",
|
||||
# "m1":"1.639",
|
||||
# "m2":"-31.667",
|
||||
# "m3":"3.380",
|
||||
# "m4":"7.986",
|
||||
# "m5":"-25.592",
|
||||
# "m6":"0",
|
||||
# "m7":"0",
|
||||
# "ckStatus":"0xFF",
|
||||
# "speed":"11.0",
|
||||
# "delay":"1.0",
|
||||
# "coord":"0",
|
||||
# "tool":"0",
|
||||
# "smooth":"0",
|
||||
# }],
|
||||
# })
|
||||
def make_addrcc_data(q, e="1"):
|
||||
return {"dsID": "www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":e,"packID":"0","instructions":q}
|
||||
# print(q)
|
||||
return {"dsID": "www.hc-system.com.HCRemoteCommand","reqType":"AddRCC","emptyList":e,"packID":"0","instructions":q}
|
||||
def make_command_data(q):
|
||||
return {"dsID": "www.hc-system.com.RemoteMonitor","reqType":"command","packID":"0","cmdData":q}
|
||||
def make_query_data(q):
|
||||
|
@ -68,10 +40,12 @@ print('world', world_coord)
|
|||
print('remote command count', send_data(make_query_data(['RemoteCmdLen'])))
|
||||
|
||||
def make_world_step(type, p):
|
||||
speed= 10.0
|
||||
smooth= 9
|
||||
step = {
|
||||
"oneshot": "1",
|
||||
"delay":"0.0",
|
||||
"speed":"50.0","smooth":"5",
|
||||
"speed":str(speed),"smooth":str(smooth),
|
||||
"coord":"0","tool":"3",
|
||||
"ckStatus":"0x3F",
|
||||
}
|
||||
|
@ -99,6 +73,11 @@ data = [
|
|||
('line',(0, 0, 10*k)),
|
||||
('curve',(0, 10*k, 10*k, 20*k, 30*k, 10*k)),
|
||||
]
|
||||
send_data(make_addrcc_data([make_world_step(*p) for p in data]))
|
||||
send_data(make_addrcc_data(
|
||||
# [{"oneshot":"0", "action":"51","isUse":"1","speed":"1234"}]+
|
||||
[make_world_step(*p) for p in data]
|
||||
# [{"oneshot":"0", "action":"51","isUse":"0","speed":"1234"}]
|
||||
))
|
||||
print('remote command count', send_data(make_query_data(['RemoteCmdLen'])))
|
||||
send_data(make_command_data(['actionSingleCycle']))
|
||||
send_data(make_command_data(['actionSingleCycle']))
|
||||
# send_data(make_command_data(['actionStop']))
|
Loading…
Reference in New Issue