summaryrefslogtreecommitdiff
path: root/decoders/pwm
diff options
context:
space:
mode:
Diffstat (limited to 'decoders/pwm')
-rw-r--r--decoders/pwm/pd.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/decoders/pwm/pd.py b/decoders/pwm/pd.py
index 45e96e2..e0203a3 100644
--- a/decoders/pwm/pd.py
+++ b/decoders/pwm/pd.py
@@ -77,17 +77,17 @@ class Decoder(srd.Decoder):
def putp(self, period_t):
# Adjust granularity.
if period_t == 0 or period_t >= 1:
- period_s = u'%u s' % (period_t)
+ period_s = '%.1f s' % (period_t)
elif period_t <= 1e-12:
- period_s = u'%.1f fs' % (period_t * 1e15)
+ period_s = '%.1f fs' % (period_t * 1e15)
elif period_t <= 1e-9:
- period_s = u'%.1f ps' % (period_t * 1e12)
+ period_s = '%.1f ps' % (period_t * 1e12)
elif period_t <= 1e-6:
- period_s = u'%.1f ns' % (period_t * 1e9)
+ period_s = '%.1f ns' % (period_t * 1e9)
elif period_t <= 1e-3:
- period_s = u'%.1f μs' % (period_t * 1e6)
+ period_s = '%.1f μs' % (period_t * 1e6)
else:
- period_s = u'%.1f ms' % (period_t * 1e3)
+ period_s = '%.1f ms' % (period_t * 1e3)
self.put(self.ss, self.es, self.out_ann, [1, [period_s]])