Align SPLIT_HAND_MATRIX_GRID left/right logic with SPLIT_HAND_PIN (#22775)

This commit is contained in:
Joel Challis 2024-01-09 11:24:53 +00:00 committed by GitHub
parent 58806984a6
commit ccec4867c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 19 additions and 17 deletions

View file

@ -97,11 +97,11 @@ static enum { UNKNOWN, LEFT, RIGHT } hand_side = UNKNOWN;
hand_side = readPin(SPLIT_HAND_PIN) ? LEFT : RIGHT;
return (hand_side == LEFT);
#elif defined(SPLIT_HAND_MATRIX_GRID)
# ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT
hand_side = peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID) ? LEFT : RIGHT;
# ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_LEFT
hand_side = peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID) ? RIGHT : LEFT;
return (hand_side == LEFT);
# else
hand_side = peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID) ? RIGHT : LEFT;
hand_side = peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID) ? LEFT : RIGHT;
return (hand_side == LEFT);
# endif
#elif defined(EE_HANDS)

View file

@ -19,6 +19,7 @@
#ifndef MASTER_RIGHT
// SPLIT_HAND_MATRIX_GRID was initially designed to use with left hand side diode D35 mounted and not pressing K7 on the right hand side during boot. However when a USB cable is reconnected immediately, it fails. Decided to use "MASTER_RIGHT" to make it more reliable.
# define SPLIT_HAND_MATRIX_GRID B5, D0
# define SPLIT_HAND_MATRIX_GRID_LOW_IS_LEFT
#endif
#define SPLIT_USB_DETECT