Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splitkb kyria rev2 port #852

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

dasmikko
Copy link

@dasmikko dasmikko commented Aug 7, 2023

This is a working kb.py for the rev2 board

This is a working kb.py for the rev2 board
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
from kmk.quickpin.pro_micro.sparkfun_promicro_rp2040 import pinout as pins
from kmk.scanners import DiodeOrientation
from kmk.scanners import intify_coordinate as ic
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused; remove this line.

from kmk.scanners import intify_coordinate as ic
from storage import getmount

isLeftSide = False if str(getmount('/').label)[-1] == 'R' else True
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only works if the split sides were set up to use the mountpoint name to determine left and right.
The universal and future-proof way would be to request the "split-side" of a board from the split module. That's not technically your responsibility. The split module doesn't yet offer that functionality as, for example, a utility function. It should though, and I'm using this opportunity to point that out.
I'm proposing to factor out the split side/location heuristic into a public auxiliary function within the split module. Then you can call that sometime during the initialization to figure out what column and row pins to use.

Comment on lines +59 to +60
data_pin = pins[1]
rgb_pixel_pin = pins[0]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These members are legacy only and should not be used in new contributions. These pins are to be provided to the split and rgb modules directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants