-
Notifications
You must be signed in to change notification settings - Fork 488
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
base: master
Are you sure you want to change the base?
Conversation
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
data_pin = pins[1] | ||
rgb_pixel_pin = pins[0] |
There was a problem hiding this comment.
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.
This is a working kb.py for the rev2 board