pschatzmann / arduino-audiokit

Arduino ADF/Audiokit HAL (support for ESP32-A1S, AI-Thinker, LyraT for ES7148, ES7210, ES7243, ES8311, ES8347, ES8388, TAS5805M, AC101 audio chips)
GNU General Public License v3.0
153 stars 40 forks source link

Incorrect button definitions? #97

Closed tookitogo closed 11 months ago

tookitogo commented 11 months ago

Using a LyraT V4.3 (board type set to 1 in platformio.ini), when I use the BUTTON_PLAY_ID macro, the buttons for Play and Set are swapped.

BUTTON_PLAY_ID resolves to PIN_KEY4, and that in turn resolves to 32. Going by the LyraT V4.3 schematic, GPIO32 is correct for touchpad button 4, but that is the Set button, not Play. It looks to me that the BUTTON_xxx definitions in audiokit_board.h are based on the LyraT board, but if that is the case, then the BUTTON_PLAY_ID and BUTTON_SET_ID macros are reversed. (The physical button locations and GPIO assignments are the same on LyraT 4, 4.2, and 4.3.)

Adding #defines for BUTTON_PLAY_ID and BUTTON_SET_ID to lyrat_v4_3.h doesn't work, since audiokit_board.h then redefines them back to the incorrect GPIOs. (Adding both the two #defines to lyrat_v4_3.h and adding #ifndef directives to audiokit_board.h does work.)

Am I missing something, or is this actually a bug?

Thanks and regards from Zurich, Antonio

pschatzmann commented 11 months ago

I haven't looked at the lyrat for a long time. I just committed a correction. Can you double check if this is working now ?