Simplify LeaderHelper stuff, unbreak my own boards
This commit is contained in:
parent
8c9fc9db95
commit
c6d8e5b406
@ -2,7 +2,6 @@ import sys
|
|||||||
|
|
||||||
import gc
|
import gc
|
||||||
|
|
||||||
from kmk.common.leader_mode import LeaderHelper
|
|
||||||
from kmk.firmware import Firmware
|
from kmk.firmware import Firmware
|
||||||
from kmk.micropython.matrix import MatrixScanner
|
from kmk.micropython.matrix import MatrixScanner
|
||||||
from kmk.micropython.pyb_hid import HIDHelper
|
from kmk.micropython.pyb_hid import HIDHelper
|
||||||
@ -32,7 +31,6 @@ def main():
|
|||||||
col_pins=cols,
|
col_pins=cols,
|
||||||
diode_orientation=diode_orientation,
|
diode_orientation=diode_orientation,
|
||||||
hid=HIDHelper,
|
hid=HIDHelper,
|
||||||
leader_helper=LeaderHelper,
|
|
||||||
log_level=DEBUG,
|
log_level=DEBUG,
|
||||||
matrix_scanner=MatrixScanner,
|
matrix_scanner=MatrixScanner,
|
||||||
)
|
)
|
||||||
|
@ -2,13 +2,14 @@ import logging
|
|||||||
|
|
||||||
from kmk.common.event_defs import init_firmware
|
from kmk.common.event_defs import init_firmware
|
||||||
from kmk.common.internal_state import Store, kmk_reducer
|
from kmk.common.internal_state import Store, kmk_reducer
|
||||||
|
from kmk.common.leader_mode import LeaderHelper
|
||||||
|
|
||||||
|
|
||||||
class Firmware:
|
class Firmware:
|
||||||
def __init__(
|
def __init__(
|
||||||
self, keymap, row_pins, col_pins,
|
self, keymap, row_pins, col_pins,
|
||||||
diode_orientation, unicode_mode=None,
|
diode_orientation, unicode_mode=None,
|
||||||
hid=None, leader_helper=None,
|
hid=None,
|
||||||
log_level=logging.NOTSET,
|
log_level=logging.NOTSET,
|
||||||
matrix_scanner=None,
|
matrix_scanner=None,
|
||||||
):
|
):
|
||||||
@ -33,7 +34,7 @@ class Firmware:
|
|||||||
"Board will run in debug mode",
|
"Board will run in debug mode",
|
||||||
)
|
)
|
||||||
|
|
||||||
self.leader_helper = leader_helper(store=self.store, log_level=log_level)
|
self.leader_helper = LeaderHelper(store=self.store, log_level=log_level)
|
||||||
|
|
||||||
self.store.dispatch(init_firmware(
|
self.store.dispatch(init_firmware(
|
||||||
keymap=keymap,
|
keymap=keymap,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user