From fc3858bd5a5cd26d1d90dbdc04f3789f1e9268e4 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Thu, 1 Sep 2016 16:53:12 -0700 Subject: [PATCH] Switch to the 'new way' of reading data from i2c --- source/implementation/Model01.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/implementation/Model01.cpp b/source/implementation/Model01.cpp index ffe57548..56a935d3 100644 --- a/source/implementation/Model01.cpp +++ b/source/implementation/Model01.cpp @@ -98,14 +98,14 @@ void Model01::scan_matrix() { for (byte row = 0; row < 4; row++) { for (byte col = 0; col < 8; col++) { - uint8_t keynum = (col*4+row); + uint8_t keynum = (row*8)+(col); - handle_key_event(row, col, + handle_key_event(row, 7-col, bitRead(leftHandState.all, keynum), bitRead(previousLeftHandState.all, keynum) ); - handle_key_event(row, (8+ col), + handle_key_event(row, (15- col), bitRead(rightHandState.all, keynum), bitRead(previousRightHandState.all, keynum) );