~ruther/qmk_firmware

7ef4d0c8868dae2deb998f5aa29a5f3cb855dc91 — Drashna Jaelre 4 years ago 7ed235d
Fix pmw3360 code to only output debug info if mouse debugging is enabled (#13993)

1 files changed, 8 insertions(+), 6 deletions(-)

M drivers/sensors/pmw3360.c
M drivers/sensors/pmw3360.c => drivers/sensors/pmw3360.c +8 -6
@@ 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;