Encoder on Daisy Patch not responding to presses

I’m having some trouble with the encoder on my Daisy Patch. It doesn’t respond to presses reliably. I have code to check for a press-and-release like this:

    int risingEdge  = 0;
    int fallingEdge = 0;
    while(!(risingEdge && fallingEdge))
    {
        hw.ProcessDigitalControls();
        risingEdge  |= hw.encoder.RisingEdge();
        fallingEdge |= hw.encoder.FallingEdge();
    }

It registers a press maybe half the time. Sometimes it will not register a press at all until I rotate the encoder. Is there a fault with my module?

I should add, even checking for just a rising or falling edge does not work reliably.

After a bit of fiddling, I’ve discovered that the knob is interfering with the operation of the encoder. When the knob is fully seated on the shaft, it seems to reduce the range of motion for the press. It’s probably hitting the panel nut. Backing off the knob slightly allows the presses to be registered reliably.

An hour well spent.