Browse Source
Fix pmw3360 code to only output debug info if mouse debugging is enabled (#13993)
pull/14005/head
Drashna Jaelre
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
6 deletions
-
drivers/sensors/pmw3360.c
|
|
@ -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; |
|
|
|