Skip to content

Commit

Permalink
Fix pmw3360 code to only output debug info if mouse debugging is enab…
Browse files Browse the repository at this point in the history
…led (qmk#13993)
  • Loading branch information
drashna authored and nhongooi committed Dec 5, 2021
1 parent e7c8400 commit 13050ec
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions drivers/sensors/pmw3360.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,14 @@ report_pmw_t pmw_read_burst(void) {

spi_stop();

print_byte(data.motion);
print_byte(data.dx);
print_byte(data.mdx);
print_byte(data.dy);
print_byte(data.mdy);
dprintf("\n");
if (debug_mouse) {
print_byte(data.motion);
print_byte(data.dx);
print_byte(data.mdx);
print_byte(data.dy);
print_byte(data.mdy);
dprintf("\n");
}

data.isMotion = (data.motion & 0x80) != 0;
data.isOnSurface = (data.motion & 0x08) == 0;
Expand Down

0 comments on commit 13050ec

Please sign in to comment.