Qmk_firmware: [Bug] Encoder support causing spamming on Iris Rev. 3 & 4

Created on 26 Nov 2019  路  16Comments  路  Source: qmk/qmk_firmware


@XScorpion2 patch 0f0c73f14a8ffb83a79b51582c0e7465c2411749 on the 15th is causing spamming on the right side of an Iris v3 with default keymap on Page UP and Page Down keycodes. This is an unpopulated PCB. The PCB has no encoder on the right side, only the left side. Seems like the code is making some assumptions about the presence of an encoder.


Describe the Bug

Before 0f0c73f14a8ffb83a79b51582c0e7465c2411749 everything is fine, after that patch the spamming occurs.

To reproduce:

  • flash commit before - no spam
  • flash commit 0f0c73f14a8ffb83a79b51582c0e7465c2411749 - spam

System Information

  • Keyboard: Iris

    • Revision (if applicable): rev 3

  • Operating system: MacOS Mojave
  • AVR GCC version: 8.3.0
  • ARM GCC version: N/A
  • QMK Firmware version: N/A
  • Any keyboard related software installed?

    • [ ] AutoHotKey

    • [ ] Karabiner

    • [ ] Other:

Additional Context

bug help wanted

All 16 comments

Confirmed independently by @nooges

@XScorpion2 since you wrote this patch, do you want to take a stab at diagnosing what's going on? Thanks

When you say spamming, is it spamming in one direction? or alternating? or what?

I'm getting just PGDN spammed on my board.

yep, if you put it in into https://config.qmk.fm/#test you will see the PGDN key being repeatedly sent. This is just right right half when plugged in. Also happens when you plug in both halves and have trrs between them.

Okay, getting the same PGDN spamming on Iris Rev. 4 right PCB as well, no spamming with left half.

Should we revert this patch?

Probably should revert it. Another users Sol r1 also is showing this issue. I cannot repro this locally so it's taking some time to fix.

interesting, while reverting this, I got into a conflict

**<<<<<<< HEAD
static uint8_t encoder_state[NUMBER_OF_ENCODERS]  = {0};
static int8_t  encoder_pulses[NUMBER_OF_ENCODERS] = {0};
=======
static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0};
>>>>>>> parent of 0f0c73f14... Updated slave encoder sync to reduce dropped pulses (#7325)**

changing the data type might explain what happened here

I switched it to uint but no change

Don't switch those types. Those are required for the delta calculation to work correctly.

Don't switch those types. Those are required for the delta calculation to work correctly.

Can you send a PR to revert this temporarily while you fix it? I tried to do it automatically but now it's too deeply embedded

Will do

https://github.com/qmk/qmk_firmware/issues/7055 is being re-opened because we had to revert that fix. Closing this for now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gesinger picture gesinger  路  3Comments

jmagee picture jmagee  路  3Comments

fredizzimo picture fredizzimo  路  4Comments

helluvamatt picture helluvamatt  路  4Comments

ghost picture ghost  路  3Comments