Tiny bit of decoupling

pull/18/head
Jesse Vincent 11 years ago
parent 3c216c197d
commit 774abd15a3

@ -40,6 +40,7 @@ byte charsReportedLastTime[KEYS_HELD_BUFFER]; // A bit vector for the 256 keys w
long reporting_counter = 0; long reporting_counter = 0;
byte current_layer = 0; byte current_layer = 0;
byte active_layer = 0;
@ -216,7 +217,7 @@ void setup_matrix()
void scan_matrix() void scan_matrix()
{ {
byte active_layer = current_layer; active_layer = current_layer;
//scan the Keyboard matrix looking for connections //scan the Keyboard matrix looking for connections
for (byte row = 0; row < ROWS; row++) { for (byte row = 0; row < ROWS; row++) {
@ -260,7 +261,6 @@ void scan_matrix()
} }
digitalWrite(rowPins[row], HIGH); digitalWrite(rowPins[row], HIGH);
} }
send_key_events(active_layer);
} }
@ -276,12 +276,13 @@ void setup()
setup_pins(); setup_pins();
Serial.println("loaded the matrix"); Serial.println("loaded the matrix");
current_layer = load_current_layer(); current_layer = load_current_layer();
active_layer = current_layer;
} }
void loop() void loop()
{ {
scan_matrix(); scan_matrix();
// report_matrix(); send_key_events(active_layer);
reset_matrix(); reset_matrix();
} }

Loading…
Cancel
Save