← Back to team overview

kicad-developers team mailing list archive

[PATCH] Fix pad arrays for SDIP and micromatch plugins

 

Hi,

This fixes some broken PadArray __init__ functions in the SDIP and
MicroMatch plugins.

Cheers,

John
From e7ee6a943d5c7be36500bb66e994cecd46978030 Mon Sep 17 00:00:00 2001
From: John Beard <john.j.beard@xxxxxxxxx>
Date: Wed, 13 Jun 2018 19:16:01 +0100
Subject: [PATCH] Pcbnew python plugins: fix some pad arrays

Fixes some pad array init functions that were not calling the
calss hierarcy's init functions correctly.
---
 pcbnew/python/plugins/microMatch_connectors.py | 6 ++----
 pcbnew/python/plugins/sdip_wizard.py           | 3 +++
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/pcbnew/python/plugins/microMatch_connectors.py b/pcbnew/python/plugins/microMatch_connectors.py
index fbf07fee9..e8134bdca 100644
--- a/pcbnew/python/plugins/microMatch_connectors.py
+++ b/pcbnew/python/plugins/microMatch_connectors.py
@@ -42,10 +42,8 @@ class PadStaggeredZGridArray(PA.PadArray):
         @param aCentre      Center position
 
         """
-        PA.PadArray.__init__(self)
-        # this pad is more of a "context", we will use it as a source of
-        # pad data, but not actually add it
-        self.pad = aPad
+        super(PadStaggeredZGridArray, self).__init__(aPad)
+
         self.padCount = int(aPadCount)
         self.lineCount = int(aLineCount)
         self.linePitch = aLinePitch
diff --git a/pcbnew/python/plugins/sdip_wizard.py b/pcbnew/python/plugins/sdip_wizard.py
index ce7afb393..dfb9a0fcc 100644
--- a/pcbnew/python/plugins/sdip_wizard.py
+++ b/pcbnew/python/plugins/sdip_wizard.py
@@ -23,6 +23,9 @@ import PadArray as PA
 
 class RowedGridArray(PA.PadGridArray):
 
+    def __init__(self, *args, **kwargs):
+        super(RowedGridArray, self).__init__(*args, **kwargs)
+
     def NamingFunction(self, x, y):
         pad_cnt = self.nx*self.ny
 
-- 
2.17.1


Follow ups