summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--digital/asserv/tools/init.py9
-rw-r--r--digital/asserv/tools/test_goto.py4
2 files changed, 12 insertions, 1 deletions
diff --git a/digital/asserv/tools/init.py b/digital/asserv/tools/init.py
index 7d0fb79a..05aa8e6b 100644
--- a/digital/asserv/tools/init.py
+++ b/digital/asserv/tools/init.py
@@ -7,3 +7,12 @@ host = dict (
ta = 0.5, aa = 0.5, tsm = 0x60, tss = 0x40, asm = 0x60, ass = 0x40,
a0a = 0.5, a0sm = 0x10, a0ss = 0x10,
)
+target = dict (
+ scale = 0.0413359788359788, f = 0xcf9,
+ c = float (0x100adec) / (1 << 24),
+ tkp = 1, tkd = 16, akp = 2, akd = 16,
+ a0p = 1, a0d = 16,
+ E = 0x3ff, D = 0x1ff,
+ ta = 0.5, aa = 0.5, tsm = 0x60, tss = 0x40, asm = 0x60, ass = 0x40,
+ a0a = 0.5, a0sm = 0x10, a0ss = 0x10,
+ )
diff --git a/digital/asserv/tools/test_goto.py b/digital/asserv/tools/test_goto.py
index 63a8cdf3..c2d27e9e 100644
--- a/digital/asserv/tools/test_goto.py
+++ b/digital/asserv/tools/test_goto.py
@@ -9,9 +9,11 @@ import random
if sys.argv[1] == '!':
io = popen_io.PopenIO (sys.argv[2:])
+ init = init.host
else:
io = serial.Serial (sys.argv[1])
-a = Asserv (io, **init.host)
+ init = init.target
+a = Asserv (io, **init)
for i in xrange (10):
x = random.randrange (2000)
y = random.randrange (1100)