From 0d94bf4c06c39fc3bcf0fd9118b55e333f1eb151 Mon Sep 17 00:00:00 2001 From: Josh Klar Date: Tue, 16 Oct 2018 22:30:33 -0700 Subject: [PATCH] Maybe surface errors in the right order --- kmk/firmware.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/kmk/firmware.py b/kmk/firmware.py index 52d4298..c29f5c5 100644 --- a/kmk/firmware.py +++ b/kmk/firmware.py @@ -58,16 +58,6 @@ class Firmware: hid_helper = USB_HID def __init__(self): - self.matrix = MatrixScanner( - cols=self.col_pins, - rows=self.row_pins, - diode_orientation=self.diode_orientation, - rollover_cols_every_rows=getattr(self, 'rollover_cols_every_rows', None), - swap_indicies=getattr(self, 'swap_indicies', None), - ) - - self._hid_helper_inst = self.hid_helper() - self._state = InternalState(self) def _send_hid(self): @@ -80,6 +70,16 @@ class Firmware: assert self.col_pins, 'no GPIO pins defined for matrix columns' assert self.diode_orientation is not None, 'diode orientation must be defined' + self.matrix = MatrixScanner( + cols=self.col_pins, + rows=self.row_pins, + diode_orientation=self.diode_orientation, + rollover_cols_every_rows=getattr(self, 'rollover_cols_every_rows', None), + swap_indicies=getattr(self, 'swap_indicies', None), + ) + + self._hid_helper_inst = self.hid_helper() + if self.debug_enabled: print("Firin' lazers. Keyboard is booted.")