Skip to content

Commit

Permalink
Small fixes (#273)
Browse files Browse the repository at this point in the history
- Fix ncols for switch matrix
- Allocate USB pins first, since they're generally dedicated pins
  • Loading branch information
ducky64 authored Jul 27, 2023
1 parent c1034d0 commit f38f40d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion electronics_abstract_parts/IoControllerInterfaceMixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)

self.usb = self.Port(Vector(UsbDevicePort.empty()), optional=True)
self.implementation(lambda base: base._io_ports.append(self.usb))
self.implementation(lambda base: base._io_ports.insert(0, self.usb))


class IoControllerI2s(BlockInterfaceMixin[BaseIoController]):
Expand Down
2 changes: 1 addition & 1 deletion electronics_lib/SwitchMatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(self, nrows: IntLike, ncols: IntLike, voltage_drop: RangeLike = (0,
self.voltage_drop = self.ArgParameter(voltage_drop)

self.nrows = self.ArgParameter(nrows)
self.ncols = self.ArgParameter(nrows)
self.ncols = self.ArgParameter(ncols)
self.generator_param(self.nrows, self.ncols)

def generate(self):
Expand Down

0 comments on commit f38f40d

Please sign in to comment.