]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/rfm12/pd.py
Add a CFP decoder.
[libsigrokdecode.git] / decoders / rfm12 / pd.py
index 9bcbd9d8c21439c75cdf295892fb4f38ec7857dc..e709696c9ef7fbbc28fc3c86cd2b17126875cd7d 100644 (file)
 ## GNU General Public License for more details.
 ##
 ## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+## along with this program; if not, see <http://www.gnu.org/licenses/>.
 ##
 
 import sigrokdecode as srd
 
 class Decoder(srd.Decoder):
-    api_version = 2
+    api_version = 3
     id = 'rfm12'
     name = 'RFM12'
     longname = 'RFM12 control protocol'
@@ -43,7 +42,10 @@ class Decoder(srd.Decoder):
         ('interpretation', 'Interpretation', (5,)),
     )
 
-    def __init__(self, **kwargs):
+    def __init__(self):
+        self.reset()
+
+    def reset(self):
         self.mosi_bytes, self.miso_bytes = [], []
         self.mosi_bits, self.miso_bits = [], []
         self.row_pos = [0, 0, 0]