X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoders%2Favr_isp%2Fpd.py;h=05a46ec541295bfaaa2c88a90f05c1582a61a87b;hp=5c2fd3afe63a7d7bb30e00e7f89579c02ead26b4;hb=86f685145345cabef1373a1242016b769ff199b4;hpb=0169f19c53e195df2f96c4df731ad3214c59e20a diff --git a/decoders/avr_isp/pd.py b/decoders/avr_isp/pd.py index 5c2fd3a..05a46ec 100644 --- a/decoders/avr_isp/pd.py +++ b/decoders/avr_isp/pd.py @@ -18,8 +18,6 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -# AVR ISP protocol decoder - import sigrokdecode as srd from .parts import * @@ -40,8 +38,8 @@ class Decoder(srd.Decoder): ] options = {} annotations = [ - ['Text', 'Human-readable text'], - ['Warnings', 'Human-readable warnings'], + ['text', 'Human-readable text'], + ['warnings', 'Human-readable warnings'], ] def __init__(self, **kwargs): @@ -51,7 +49,7 @@ class Decoder(srd.Decoder): self.xx, self.yy, self.zz, self.mm = 0, 0, 0, 0 def start(self): - # self.out_proto = self.register(srd.OUTPUT_PYTHON) + # self.out_python = self.register(srd.OUTPUT_PYTHON) self.out_ann = self.register(srd.OUTPUT_ANN) def putx(self, data): @@ -179,13 +177,13 @@ class Decoder(srd.Decoder): self.ss, self.es = ss, es + if len(self.mosi_bytes) == 0: + self.cmd_ss = ss + # Append new bytes. self.mosi_bytes.append(mosi) self.miso_bytes.append(miso) - if len(self.mosi_bytes) == 0: - self.cmd_ss = ss - # All commands consist of 4 bytes. if len(self.mosi_bytes) < 4: return