From fa8e329cc04f51b3abafb0b25b00bea7e87bf420 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Fri, 13 Apr 2012 20:28:57 +0200 Subject: digital/mimot/tools: add find_zero --- digital/mimot/tools/mimot/mimot.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'digital/mimot') diff --git a/digital/mimot/tools/mimot/mimot.py b/digital/mimot/tools/mimot/mimot.py index 70462fdc..836479fb 100644 --- a/digital/mimot/tools/mimot/mimot.py +++ b/digital/mimot/tools/mimot/mimot.py @@ -163,6 +163,14 @@ class Proto: self.proto.send ('y', 'BBhB', 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, + reset_pos, self.aseq[i]) + self.wait (self.finished, auto = True) + def send_param (self): """Send all parameters.""" p = self.param -- cgit v1.2.3