Skip to content

Commit

Permalink
[Keyboard] Update grs_70ec to use newer custom matrix (#15609)
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna authored Dec 29, 2021
1 parent 42caee3 commit 0d02af8
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions keyboards/sekigon/grs_70ec/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,50 +70,3 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {

return updated;
}

bool matrix_post_scan(void) {
bool changed = false;
if (is_keyboard_master()) {
static uint8_t error_count;

matrix_row_t slave_matrix[ROWS_PER_HAND] = {0};
if (!transport_master(matrix + thatHand, slave_matrix)) {
error_count++;

if (error_count > ERROR_DISCONNECT_COUNT) {
// reset other half if disconnected
dprintf("Error: disconnect split half\n");
for (int i = 0; i < ROWS_PER_HAND; ++i) {
matrix[thatHand + i] = 0;
slave_matrix[i] = 0;
}

changed = true;
}
} else {
error_count = 0;

for (int i = 0; i < ROWS_PER_HAND; ++i) {
if (matrix[thatHand + i] != slave_matrix[i]) {
matrix[thatHand + i] = slave_matrix[i];
changed = true;
}
}
}

matrix_scan_quantum();
} else {
transport_slave(matrix + thatHand, matrix + thisHand);

matrix_slave_scan_user();
}
return changed;
}

uint8_t matrix_scan(void) {
bool changed = matrix_scan_custom(raw_matrix) || matrix_post_scan();

debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed);

return changed;
}

0 comments on commit 0d02af8

Please sign in to comment.