pimoroni / picade-hat

Picade HAT input daemon and setup script
https://shop.pimoroni.com/products/picade-hat
65 stars 15 forks source link

dtoverlay parameter : Character limit #27

Open Magaki99 opened 5 years ago

Magaki99 commented 5 years ago

I tried to rebind almost every key in the Picade and tried to define the following parameter in /boot/config.txt :

dtoverlay=picade,button1=110,button2=102,button3=104,button4=111,button5=107,button6=109,enter=54,escape=42,coin=57,start=45

Buttons are correctly rebinded from button1 to button5, after this the rebind didn't working. It seems there's a character limit for dtoverlay parameter.

Could you confirm this ? If yes, what are the solution for increase this limit, to rebind every key ?

Gadgetoid commented 5 years ago

I wasn't aware of any character limit, but looking at the length of your string up to button5 suggests ~80 chars. I searched the firmware GitHub for this, and....

https://github.com/raspberrypi/firmware/issues/692

So it looks like your syntax should be:

dtoverlay=picade
dtparam=button1=110
dtparam=button2=102
dtparam=button3=104

To fix the line-length problem.

I'll flag this issue up so we remember to better document this!

Magaki99 commented 5 years ago

It works ! Thanks for your quick answer ! =)