From 45bc9e05f6ddecc7f62215bb254b86a74ad0361a Mon Sep 17 00:00:00 2001 From: foosinn Date: Tue, 2 Jul 2024 23:02:41 +0200 Subject: [PATCH] Add USB-C support to MakitaPowerSupply --- boxes/generators/makitapowersupply.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/boxes/generators/makitapowersupply.py b/boxes/generators/makitapowersupply.py index 949ce0663..2aa066b0d 100644 --- a/boxes/generators/makitapowersupply.py +++ b/boxes/generators/makitapowersupply.py @@ -38,7 +38,11 @@ def __init__(self) -> None: self.argparser.add_argument("--flipswitch_diameter", action="store", type=float, default=6.3, - help="diameter of the flipswitch mounting hole") + help="diameter of the flipswitch mounting hole (disabled of no secondary power)") + + self.argparser.add_argument("--secondary_power", action="store", + choices=["ibm-barrel", "usb-c", "none"], + help="style of secondary power input") def side(self, l, h=14, move=None): @@ -86,12 +90,17 @@ def bottom(self): def front(self): d_b = self.banana_socket_diameter d_f = self.flipswitch_diameter + secondary_power_style = self.secondary_power self.hole(10, self.h/2, d=d_b) self.hole(30, self.h/2, d=d_b) - self.hole(50, self.h/2, d=d_f) - self.rectangularHole(76, 6.4, 12.4, 12.4) + if secondary_power_style == "ibm-barrel": + self.hole(50, self.h/2, d=d_f) + self.rectangularHole(76, 6.4, 12.4, 12.4) + if secondary_power_style == "usb-c": + self.hole(50, self.h/2, d=d_f) + self.rectangularHole(75, 2.6, 9.2, 3.2, r=1) def back(self): n = int((self.h-2*self.thickness) // 8)