slightly refactor matrix scanning loop

pull/18/head
Jesse Vincent 9 years ago
parent 52b8d216cc
commit abb9f924db

@ -18,11 +18,10 @@ void scan_matrix() {
for (byte col = 0; col < LEFT_COLS; col++) { for (byte col = 0; col < LEFT_COLS; col++) {
implementation_scan_left_col(row,col,&matrixState[row][col]); implementation_scan_left_col(row,col,&matrixState[row][col]);
implementation_scan_right_col(row,col,&matrixState[row][(COLS - 1) - col]);
handle_key_event(row, col); handle_key_event(row, col);
if (implementation_right_hand_connected()) { if (implementation_right_hand_connected()) {
implementation_scan_right_col(row,col,&matrixState[row][(COLS - 1) - col]);
handle_key_event(row, (COLS - 1) - col); handle_key_event(row, (COLS - 1) - col);
} }
} }

Loading…
Cancel
Save