Skip to content

Commit

Permalink
Merge pull request #8 from hexa29/kicad7
Browse files Browse the repository at this point in the history
Update for KiCad 7 compatibility
  • Loading branch information
yskoht authored Jan 19, 2024
2 parents e4cff2e + f11fd7b commit 74a5a01
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions keyboard_layouter.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,17 @@ def __move_parts(self, ref_id, props):
if self.params['switch']['move']:
sw = self.__find_module(self.__sw_ref(ref_id))
if sw is not None:
sw.SetPosition(pcbnew.wxPointMM(x_mm, y_mm))
sw.SetPosition(pcbnew.VECTOR2I(pcbnew.wxPointMM(x_mm, y_mm)))
sw.SetOrientationDegrees(r)

if self.params['diode']['move']:
diode = self.__find_module(self.__diode_ref(ref_id))
if diode is not None:
diode.SetPosition(pcbnew.wxPointMM(x_mm, y_mm))
diode.SetPosition(pcbnew.VECTOR2I(pcbnew.wxPointMM(x_mm, y_mm)))
dx_mm, dy_mm = self.__rotate(r,
self.params['diode']['offset_x_mm'],
self.params['diode']['offset_y_mm'])
diode.Move(pcbnew.wxPointMM(dx_mm, dy_mm))
diode.Move(pcbnew.VECTOR2I(pcbnew.wxPointMM(dx_mm, dy_mm)))

diode.SetOrientationDegrees(r)

Expand Down Expand Up @@ -379,4 +379,3 @@ def __init__(self, title, callback):


KeyboardLayouter().register()

0 comments on commit 74a5a01

Please sign in to comment.