summaryrefslogtreecommitdiff
path: root/decoders/stepper_motor
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2016-05-19 18:38:05 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2016-05-26 19:15:19 +0200
commit5b0b88ced37e8fbe3031867255412f449245ca26 (patch)
tree430b089db720b991e5431e54edc43e519b018837 /decoders/stepper_motor
parent135b790c851c52400279e7c932e1f900d91ae5cc (diff)
downloadlibsigrokdecode-5b0b88ced37e8fbe3031867255412f449245ca26.tar.gz
libsigrokdecode-5b0b88ced37e8fbe3031867255412f449245ca26.zip
Consistency renames of {ss,es}_ variables.
Diffstat (limited to 'decoders/stepper_motor')
-rw-r--r--decoders/stepper_motor/pd.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/decoders/stepper_motor/pd.py b/decoders/stepper_motor/pd.py
index 8a1c2e1..7664fc4 100644
--- a/decoders/stepper_motor/pd.py
+++ b/decoders/stepper_motor/pd.py
@@ -52,7 +52,7 @@ class Decoder(srd.Decoder):
def __init__(self):
self.oldstep = None
- self.prev_step_ss = None
+ self.ss_prev_step = None
self.pos = 0
self.prev_speed = None
self.prev_pos = None
@@ -70,18 +70,18 @@ class Decoder(srd.Decoder):
self.unit = 'mm'
def step(self, ss, direction):
- if self.prev_step_ss is not None:
- delta = ss - self.prev_step_ss
+ if self.ss_prev_step is not None:
+ delta = ss - self.ss_prev_step
speed = self.samplerate / delta / self.scale
speed_txt = self.format % speed
pos_txt = self.format % (self.pos / self.scale)
- self.put(self.prev_step_ss, ss, self.out_ann,
+ self.put(self.ss_prev_step, ss, self.out_ann,
[0, [speed_txt + ' ' + self.unit + '/s', speed_txt]])
- self.put(self.prev_step_ss, ss, self.out_ann,
+ self.put(self.ss_prev_step, ss, self.out_ann,
[1, [pos_txt + ' ' + self.unit, pos_txt]])
self.pos += (1 if direction else -1)
- self.prev_step_ss = ss
+ self.ss_prev_step = ss
def metadata(self, key, value):
if key == srd.SRD_CONF_SAMPLERATE: