diff options
author | Gerhard Sittig <gerhard.sittig@gmx.net> | 2018-05-27 09:41:19 +0200 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2018-05-29 23:57:48 +0200 |
commit | 866a80dbed40dcd295efd4c7f28288b7835c973d (patch) | |
tree | 2dd8639ea5a9ef3530062afc5e1349bcb3b95922 /decoders/counter/pd.py | |
parent | 821a21418cb64f77f444c440752ac09a8bc97fb6 (diff) | |
download | libsigrokdecode-866a80dbed40dcd295efd4c7f28288b7835c973d.tar.gz libsigrokdecode-866a80dbed40dcd295efd4c7f28288b7835c973d.zip |
counter: explicit string formatting for annotation text
Replace str() conversion with explicit number text formatting, for
improved awareness and easier future adjustment during maintenance.
Diffstat (limited to 'decoders/counter/pd.py')
-rw-r--r-- | decoders/counter/pd.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/decoders/counter/pd.py b/decoders/counter/pd.py index 4b5085b..905de6e 100644 --- a/decoders/counter/pd.py +++ b/decoders/counter/pd.py @@ -98,8 +98,8 @@ class Decoder(srd.Decoder): continue edge_count += 1 - self.putc(ROW_EDGE, [str(edge_count)]) + self.putc(ROW_EDGE, ["{:d}".format(edge_count)]) if divider and (edge_count % divider) == 0: word_count += 1 - self.putc(ROW_WORD, [str(word_count)]) + self.putc(ROW_WORD, ["{:d}".format(word_count)]) |