From 730e07bca67df0ca9f7a4e68dff87d91d0316be9 Mon Sep 17 00:00:00 2001 From: Gerhard Sittig Date: Fri, 17 Mar 2017 20:28:59 +0100 Subject: onewire_network: Fixup start samplenumber for annotations Annotations generated by the onewire_network decoder started where bit 1 began, while it should align with the start of bit 0. --- decoders/onewire_network/pd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'decoders/onewire_network') diff --git a/decoders/onewire_network/pd.py b/decoders/onewire_network/pd.py index a24cb16..323da0b 100644 --- a/decoders/onewire_network/pd.py +++ b/decoders/onewire_network/pd.py @@ -129,7 +129,7 @@ class Decoder(srd.Decoder): # Data collector. def onewire_collect(self, length, val, ss, es): # Storing the sample this sequence begins with. - if self.bit_cnt == 1: + if self.bit_cnt == 0: self.ss_block = ss self.data = self.data & ~(1 << self.bit_cnt) | (val << self.bit_cnt) self.bit_cnt += 1 -- cgit v1.2.3-70-g09d2