From 4646998ec16d8753bd3ba3171420ee697027cca2 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 26 Mar 2012 12:35:05 -0400 Subject: [PATCH] Use a dummy write function for Stepper until we've initialized from the config. --- pyafm/stepper.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyafm/stepper.py b/pyafm/stepper.py index 3c04556..6683484 100644 --- a/pyafm/stepper.py +++ b/pyafm/stepper.py @@ -38,17 +38,17 @@ class Stepper(_stepper.Stepper): self.config = config self.port = None c = self.config # reduce verbosity + dummy_write = lambda value: None super(Stepper, self).__init__( - write=self.port.write_bitfield, full_step=c['full-step'], - logic=c['logic'], delay=c['delay'], step_size=c['step-size'], - backlash=c['backlash']) + write=dummy_write, full_step=c['full-step'], logic=c['logic'], + delay=c['delay'], step_size=c['step-size'], backlash=c['backlash']) def load_from_config(self, devices): c = self.config # reduce verbosity if self.port is None: self.port = _DigitalPort(config=c['port']) self.port.load_from_config(devices=devices) - self._write = self.port.write_bitfield + self._write = self.port.write_bitfield self.full_step = c['full-step'] self.logic = c['logic'] self.delay = c['delay'] -- 2.26.2