Skip to content

Commit

Permalink
fix pimoroni trackball (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
daskygit authored and drashna committed Oct 12, 2021
1 parent c72bef3 commit f363d8c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions quantum/pointing_device_drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ report_mouse_t pimorono_trackball_get_report(report_mouse_t mouse_report) {
error_count = 0;

if (!(pimoroni_data.click & 128)) {
mouse_report.buttons |= MOUSE_BTN1;
mouse_report.buttons &= ~MOUSE_BTN1;
if (!debounce) {
x_offset += pimoroni_trackball_get_offsets(pimoroni_data.right, pimoroni_data.left, PIMORONI_TRACKBALL_MOUSE_SCALE);
y_offset += pimoroni_trackball_get_offsets(pimoroni_data.down, pimoroni_data.up, PIMORONI_TRACKBALL_MOUSE_SCALE);
Expand All @@ -86,15 +86,14 @@ report_mouse_t pimorono_trackball_get_report(report_mouse_t mouse_report) {
debounce--;
}
} else {
mouse_report.buttons &= ~MOUSE_BTN1;
mouse_report.buttons |= MOUSE_BTN1;
debounce = PIMORONI_TRACKBALL_DEBOUNCE_CYCLES;
}
} else {
error_count++;
}
} else {
error_count++;
throttle = timer_read_fast();
}

throttle = timer_read_fast();
return mouse_report;
}

Expand Down

0 comments on commit f363d8c

Please sign in to comment.