aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-08-13 14:20:47 -0700
committerGitHub <noreply@github.com>2021-08-13 14:20:47 -0700
commit7ef4d0c8868dae2deb998f5aa29a5f3cb855dc91 (patch)
tree50a22dec8e7b72d1f9aee0daaa01707bbe34e690
parent7ed235d15d58661d75f1ebf0e1a5eca44dc4132b (diff)
downloadqmk_firmware-7ef4d0c8868dae2deb998f5aa29a5f3cb855dc91.tar.gz
qmk_firmware-7ef4d0c8868dae2deb998f5aa29a5f3cb855dc91.zip
Fix pmw3360 code to only output debug info if mouse debugging is enabled (#13993)
-rw-r--r--drivers/sensors/pmw3360.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/sensors/pmw3360.c b/drivers/sensors/pmw3360.c
index 91ee87b95..13c5bdea2 100644
--- a/drivers/sensors/pmw3360.c
+++ b/drivers/sensors/pmw3360.c
@@ -213,12 +213,14 @@ report_pmw_t pmw_read_burst(void) {
213 213
214 spi_stop(); 214 spi_stop();
215 215
216 print_byte(data.motion); 216 if (debug_mouse) {
217 print_byte(data.dx); 217 print_byte(data.motion);
218 print_byte(data.mdx); 218 print_byte(data.dx);
219 print_byte(data.dy); 219 print_byte(data.mdx);
220 print_byte(data.mdy); 220 print_byte(data.dy);
221 dprintf("\n"); 221 print_byte(data.mdy);
222 dprintf("\n");
223 }
222 224
223 data.isMotion = (data.motion & 0x80) != 0; 225 data.isMotion = (data.motion & 0x80) != 0;
224 data.isOnSurface = (data.motion & 0x08) == 0; 226 data.isOnSurface = (data.motion & 0x08) == 0;