From: Uwe Hermann Date: Tue, 10 Jan 2012 01:06:31 +0000 (+0100) Subject: srd: s/output_new/add/ for all decoders. X-Git-Tag: libsigrokdecode-0.1.0~186 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2fd89a85c4a1131ca259d794a43b26b8bd84b6a0;p=libsigrokdecode.git srd: s/output_new/add/ for all decoders. --- diff --git a/decoders/mx25lxx05d.py b/decoders/mx25lxx05d.py index 0f2f73b..1f45dc4 100644 --- a/decoders/mx25lxx05d.py +++ b/decoders/mx25lxx05d.py @@ -179,8 +179,8 @@ class Decoder(sigrokdecode.Decoder): self.out = [] def start(self, metadata): - # self.output_protocol = self.output_new(2) - self.output_annotation = self.output_new(1) + # self.output_protocol = self.add(2) + self.output_annotation = self.add(1) def report(self): pass diff --git a/decoders/nunchuk.py b/decoders/nunchuk.py index 6cd3089..d3ae871 100644 --- a/decoders/nunchuk.py +++ b/decoders/nunchuk.py @@ -87,8 +87,8 @@ class Decoder(sigrokdecode.Decoder): self.databytecount = 0 def start(self, metadata): - # self.output_protocol = self.output_new(2) - self.output_annotation = self.output_new(1) + # self.output_protocol = self.add(2) + self.output_annotation = self.add(1) def report(self): pass diff --git a/decoders/spi.py b/decoders/spi.py index 2c7445f..8c62cde 100644 --- a/decoders/spi.py +++ b/decoders/spi.py @@ -46,8 +46,8 @@ class Decoder(sigrokdecode.Decoder): self.output_annotation = None def start(self, metadata): - # self.output_protocol = self.output_new(2) - self.output_annotation = self.output_new(1) + # self.output_protocol = self.add(2) + self.output_annotation = self.add(1) def report(self): return 'SPI: %d bytes received' % self.bytesreceived diff --git a/decoders/srd_usb.py b/decoders/srd_usb.py index 3969532..ce1bd68 100644 --- a/decoders/srd_usb.py +++ b/decoders/srd_usb.py @@ -123,8 +123,8 @@ class Decoder(sigrokdecode.Decoder): def start(self, metadata): self.rate = metadata['samplerate'] - # self.output_protocol = self.output_new(2) - self.output_annotation = self.output_new(1) + # self.output_protocol = self.add(2) + self.output_annotation = self.add(1) if self.rate < 48000000: raise Exception("Sample rate not sufficient for USB decoding") # Initialise decoder state. diff --git a/decoders/transitioncounter.py b/decoders/transitioncounter.py index 5a6d140..2847abc 100644 --- a/decoders/transitioncounter.py +++ b/decoders/transitioncounter.py @@ -42,8 +42,8 @@ class Decoder(sigrokdecode.Decoder): self.lastsample = None def start(self, metadata): - # self.output_protocol = self.output_new(2) - self.output_annotation = self.output_new(1) + # self.output_protocol = self.add(2) + self.output_annotation = self.add(1) def report(self): pass diff --git a/decoders/uart.py b/decoders/uart.py index e2f33d7..896cd0a 100644 --- a/decoders/uart.py +++ b/decoders/uart.py @@ -258,8 +258,8 @@ class Decoder(sigrokdecode.Decoder): def start(self, metadata): self.samplerate = metadata['samplerate'] - self.out_proto = self.output_new(sigrokdecode.SRD_OUTPUT_PROTOCOL, 'uart') - self.out_ann = self.output_new(sigrokdecode.SRD_OUTPUT_ANNOTATION, 'uart') + self.out_proto = self.add(sigrokdecode.SRD_OUTPUT_PROTOCOL, 'uart') + self.out_ann = self.add(sigrokdecode.SRD_OUTPUT_ANNOTATION, 'uart') # TODO ### self.baudrate = metadata['baudrate']