DIY: upgrading to V5 - or the question of new buttons

Ok. So, let’s make a summary of the ZYNTHIAN_WIRING_SWITCHES configuration:

  • I do not want to use V4 encoders with fixed functions anymore: hence “-1” on positions 0-3
  • I have the 20 buttons from V5 emulated by virtual onscreen touch buttons: hence “-1” on positions 4-23
  • I have four physical encoders wired to MCP23017 (pin assignment from V4, but the MCP is wired to RPi5 exactly as the first MCP in Zynthian V5): hence pin numbers 100,103,108,111 on positions 24-27

The current wiring configuration is thus as follows:

export ZYNTHIAN_WIRING_LAYOUT="MCP23017_ENCODERS"
export ZYNTHIAN_WIRING_ENCODER_A="102,105,110,113"
export ZYNTHIAN_WIRING_ENCODER_B="101,104,109,112"
export ZYNTHIAN_WIRING_SWITCHES="-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,100,103,108,111"
export ZYNTHIAN_WIRING_MCP23017_I2C_ADDRESS="0x20"
export ZYNTHIAN_WIRING_MCP23017_INTA_PIN="0"
export ZYNTHIAN_WIRING_MCP23017_INTB_PIN="2"

Result: rotating encoders works, pushing encoder switches does NOT work in this configuration.

If I set some of the physical pin numbers (e.g. 100) on some of the former positions 0-23 (in place of some of the -1s), it DOES trigger the corresponding action assigned to that switch (i.e. function of a V4 encoder switch on positions 0-3 or of some of the 20 V5 buttons on positions 4-23). However, nothing happens when the physical pin numbers are configured (as listed above) on positions 24-27 (whatever function is assigned to the corresponding “Switch 21-24” in webconf).

I have no idea about the differences between all the different ZYNTHIAN_WIRING_LAYOUT values, but:

  • I tried V5 which does not offer customization, so that everything was broken, including my touchscreen calibration
  • I tried CUSTOM (with the same PIN number configuration as above), but neither rotating the encoders, nor pushing their switches worked
  • I ended up with MCP23017_ENCODERS and so now turning the encoders works, but pushing their switches does NOT work (unless I set them to positions 0-23)

Is there some bug involved or just my misunderstanding of something?