summaryrefslogtreecommitdiff
path: root/digital/asserv/tools
diff options
context:
space:
mode:
authorNicolas Schodet2008-04-17 00:21:22 +0200
committerNicolas Schodet2008-04-17 00:21:22 +0200
commita146e54732b0b62a93663d0dbf98b8c4ead9a89c (patch)
tree32636344d513c3f795e9ef9722834d1a6a61d86e /digital/asserv/tools
parent62f2609ef8d8ee7041687350bb831232e7043c33 (diff)
* digital/asserv/tools:
- added speed command.
Diffstat (limited to 'digital/asserv/tools')
-rw-r--r--digital/asserv/tools/asserv.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/digital/asserv/tools/asserv.py b/digital/asserv/tools/asserv.py
index 604918cd..548eb79e 100644
--- a/digital/asserv/tools/asserv.py
+++ b/digital/asserv/tools/asserv.py
@@ -44,7 +44,7 @@ class Asserv:
akp = 0, aki = 0, akd = 0,
a0kp = 0, a0ki = 0, a0kd = 0,
E = 1023, I = 1023, b = 15000,
- ta = 0, aa = 0, a0a = 0,
+ ta = 1, aa = 1, a0a = 1,
tsm = 0, asm = 0, tss = 0, ass = 0, a0sm = 0, a0ss = 0
)
self.param.update (param)
@@ -108,6 +108,16 @@ class Asserv:
assert w == 'a0'
self.proto.send ('c', 'h', c)
+ def speed (self, w, s):
+ """Speed consign."""
+ if w == 't':
+ self.proto.send ('s', 'bb', s, 0)
+ elif w == 'a':
+ self.proto.send ('s', 'bb', 0, s)
+ else:
+ assert w == 'a0'
+ self.proto.send ('s', 'b', s)
+
def send_param (self):
p = self.param
self.proto.send ('p', 'BHH', ord ('p'), p['tkp'] * 256,