Error when adding mcp23017+encoders

After many complications I’ve finally received my custom zynthian board.
I’m testing each feature after the other.
So the first step was the display, wich works fine with zynthian UI up and running.
Then I’ve soldered encoders and switches and have configured them through webconf.

But I’ve got the error splash screen.

System is on stable branch, Jackd is running. Latest snapshot is loaded. The only relevant message I get while running the gui in debug mode is:

May 25 17:11:51 zynthian startx[2820]: wiringPiISR: pin must be 0-63 (113)
May 25 17:11:51 zynthian startx[2820]: Zyncoder: Zynswitches poll thread created successfully
May 25 17:11:59 zynthian startx[2820]: PNG file: /zynthian/config/img/fb_zynthian_error_ip.png - Application must supply a known background gamma

when I followed the Zynthian encoder pcb wiring in my custom build, I learned that the encoder pin numbering shown didn’t match the encoder device drawings, the numbers were pcb design related.

As is, everything looks correct, logs shows that encoders are registered, latest Snapshot is loaded as if zynthian was running normaly.
And if I switch back the wiring configuration to dummies (no encoders), the error splash screen disapear.

Made some tests this morning.
I’ve added an entry in /zynthian/zynthian-webconf/lib/wiring_config_handler.py :

            ["MCP23017_Damn_Small", {
                    'ZYNTHIAN_WIRING_ENCODER_A': "113,111,101,115",
                    'ZYNTHIAN_WIRING_ENCODER_B': "112,107,102,116",
                    'ZYNTHIAN_WIRING_SWITCHES': "114,110,100,117,106,105,104,103",
                    'ZYNTHIAN_WIRING_MCP23017_INTA_PIN': "22",
                    'ZYNTHIAN_WIRING_MCP23017_INTB_PIN': "21"
            }],
            ["MCP23017_ZynScreen", {
                    'ZYNTHIAN_WIRING_ENCODER_A': "102,105,110,113",
                    'ZYNTHIAN_WIRING_ENCODER_B': "101,104,109,112",
                    'ZYNTHIAN_WIRING_SWITCHES': "100,103,108,111,106,107,114,115",
                    'ZYNTHIAN_WIRING_MCP23017_INTA_PIN': "2",
                    'ZYNTHIAN_WIRING_MCP23017_INTB_PIN': "7"
            }],

Still the same error (splash screen with IP, and “wiringPiISR: pin must be 0-63 (113)” in logs) when using MCP23017_Damn_Small config, while zynthian UI is up and running when using MCP23017_Zynscreen config :thinking: Of course, encoders don’t work in this case !

this is so strange.
WiringPi perform a test (see source code here):

if ((pin < 0) || (pin > 63))
return wiringPiFailure (WPI_FATAL, “wiringPiISR: pin must be 0-63 (%d)\n”, pin) ;

this test is successfully passed with MCP23017_Zynscreen config but fails with my custom config :woozy_face: