X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Fjitter%2Fpd.py;h=d6db8e599cb8c1905f75db07c39e7d07a2e38815;hp=f2fdb628b52f55aca2e03320048f3e651f9942dc;hb=70aa53ec10dabe4a5267e142974b35d1312f7119;hpb=05aaa48637fe56ac087569d784dbfdc91341f619 diff --git a/decoders/jitter/pd.py b/decoders/jitter/pd.py index f2fdb62..d6db8e5 100644 --- a/decoders/jitter/pd.py +++ b/decoders/jitter/pd.py @@ -109,10 +109,10 @@ class Decoder(srd.Decoder): def putb(self, delta): if delta is None: return - # Format the delta to an ASCII float output. - for x in str(delta): - self.put(self.clk_start, self.sig_start, self.out_bin, (0, bytes([ord(x)]))) - self.put(self.clk_start, self.sig_start, self.out_bin, (0, bytes([ord('\n')]))) + # Format the delta to an ASCII float value terminated by a newline. + x = str(delta) + '\n' + self.put(self.clk_start, self.sig_start, self.out_bin, + (0, x.encode('UTF-8'))) # Helper function for missed clock and signal annotations. def putm(self, data):