Skip to content

Commit

Permalink
further TT buttons sensitivity tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
globalnamespace committed May 30, 2017
1 parent f938388 commit 3017053
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions arcin/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,10 +589,10 @@ int main() {
int8_t rx = qe1_count - last_x;
int8_t ry = qe2_count - last_y;

if((last_dir_x == 1 && rx > 0) || (last_dir_x == -1 && rx > 1)) {
if((last_dir_x == 1 && rx > 0) || (rx > 1)) {
state_x = 100;
last_x = qe1_count;
} else if((last_dir_x == -1 && rx < 0) || (last_dir_x == 1 && rx < -1)) {
} else if((last_dir_x == -1 && rx < 0) || (rx < -1)) {
state_x = -100;
last_x = qe1_count;
} else if(state_x > 0) {
Expand All @@ -601,12 +601,15 @@ int main() {
} else if(state_x < 0) {
state_x++;
last_x = qe1_count;
} else {
last_dir_x = 0;
last_x = qe1_count;
}

if((last_dir_y == 1 && ry > 0) || (last_dir_y == -1 && ry > 1)) {
if((last_dir_y == 1 && ry > 0) || (ry > 1)) {
state_y = 100;
last_y = qe2_count;
} else if((last_dir_y == -1 && ry < 0) || (last_dir_y == 1 && ry < -1)) {
} else if((last_dir_y == -1 && ry < 0) || (ry < -1)) {
state_y = -100;
last_y = qe2_count;
} else if(state_y > 0) {
Expand All @@ -615,6 +618,9 @@ int main() {
} else if(state_y < 0) {
state_y++;
last_y = qe2_count;
} else {
last_dir_y = 0;
last_y = qe2_count;
}

if(rx > 0) {
Expand Down

0 comments on commit 3017053

Please sign in to comment.