From cf8fbdbfb994576b6f3278602c25e84795deac11 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sat, 14 Apr 2012 20:18:16 +0200 Subject: digital: use 16bit speed --- digital/mimot/tools/mimot/mimot.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'digital/mimot/tools/mimot/mimot.py') diff --git a/digital/mimot/tools/mimot/mimot.py b/digital/mimot/tools/mimot/mimot.py index 836479fb..cb4caace 100644 --- a/digital/mimot/tools/mimot/mimot.py +++ b/digital/mimot/tools/mimot/mimot.py @@ -36,7 +36,7 @@ class Proto: stats_format = { 'C': 'HH', - 'S': 'bb', + 'S': 'hh', 'P': 'hhhh', 'W': 'hh', } @@ -140,7 +140,7 @@ class Proto: def speed (self, w, s): """Speed consign.""" - self.proto.send ('s', 'Bb', self._index[w], s) + self.proto.send ('s', 'Bh', self._index[w], s) def speed_pos (self, w, offset): """Speed controlled position consign.""" @@ -160,14 +160,14 @@ class Proto: """Clamp (speed control, then open loop PWM).""" i = self._index[w] self.aseq[i] += 1 - self.proto.send ('y', 'BBhB', i, s, pwm, self.aseq[i]) + self.proto.send ('y', 'BHhB', i, s, pwm, self.aseq[i]) self.wait (self.finished, auto = True) def find_zero (self, w, s, use_switch = True, reset_pos = 0): """Find zero position.""" i = self._index[w] self.aseq[i] += 1 - self.proto.send ('y', 'BBBhB', i, s, 1 if use_switch else 0, + self.proto.send ('y', 'BHBhB', i, s, 1 if use_switch else 0, reset_pos, self.aseq[i]) self.wait (self.finished, auto = True) @@ -182,7 +182,7 @@ class Proto: self.proto.send ('p', 'cBH', 'i', index, f88 (p[m + '_ki'])) self.proto.send ('p', 'cBH', 'd', index, f88 (p[m + '_kd'])) self.proto.send ('p', 'cBH', 'a', index, f88 (p[m + '_acc'])) - self.proto.send ('p', 'cBBB', 's', index, p[m + '_speed_max'], + self.proto.send ('p', 'cBHH', 's', index, p[m + '_speed_max'], p[m + '_speed_slow']) self.proto.send ('p', 'cBHHB', 'b', index, p[m + '_bd_error_limit'], p[m + '_bd_speed_limit'], -- cgit v1.2.3