-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Added right vs left specific pin assignments for dip switch #13074
Conversation
The following code seems a little hard to read to me. #ifdef DIP_SWITCH_PINS
# if defined(SPLIT_KEYBOARD) && defined(DIP_SWITCH_PINS_RIGHT)
if (isLeftHand) {
# endif
dip_switch_state[i] = !readPin(dip_switch_pad[i]);
# if defined(SPLIT_KEYBOARD) && defined(DIP_SWITCH_PINS_RIGHT)
} else {
dip_switch_state[i] = !readPin(dip_switch_pad_right[i]);
}
# endif
#endif I suggest code like 197ea02. |
I've marked this with the |
While i agree the code could be cleaner, the suggestion in 197ea02 is way worse. The context of the code is completely lost because the left/right logic bleeds out into code that still sometimes doesn't compile. However now you need to know context from the confusingly named variable names. I'm going to merge this as is due to the time to develop merge. The interface is fine and we can tidy up the implementation in another iteration. |
* Added right vs left specific pin assignments for dip switch * Update feature_dip_switch.md * Ran formatting tools
* Added right vs left specific pin assignments for dip switch * Update feature_dip_switch.md * Ran formatting tools
Description
Added right vs left support for dip switch pin configuration
Types of Changes
Issues Fixed or Closed by This PR
Checklist