amowry / WARBL2

WARBL2 Code and design files
https://warbl.xyz/index.html
GNU General Public License v3.0
5 stars 2 forks source link

Accidentally pressing buttons #7

Closed MrMep closed 1 day ago

MrMep commented 6 days ago

I don't know if it's just me, but while playing that happens a lot, especially button 1. In my fork of the original WARBL firmware I implemented a double-click option. If it may interest other, I can preparare a PR (the webconfig page has to be updated as well). Let me know.

amowry commented 6 days ago

I agree that it's easy to press that button accidentally and the double-click is a good idea. If you don't mind doing that, it would be great.

There are a few things that would need to be addressed:

I'm out of room in the normal progression of CC commands for sending the button actions (CC 102, 90-99) so it looks like we'd have to use CC 102 value 105-107 (105-111 are unused).

There is space in EEPROM for extending the buttonPrefs array.

The Config Tool would need to hide the new options for older firmware and the original WARBL. If you'd like I can do the Config Tool part if you want to do the firmware part.

The Config Tool also disables some button actions if others are selected. We'd have to see which ones need to be disabled if double-click is used for each button (probably the same ones as when a single click is used).

Thanks!

amowry commented 6 days ago

I guess the other option for the CC messages would be to move the Custom Chart selector command (CC 102, values 100-103) so we wouldn't have to split up the button commands. That might make more sense-- if we free up the values 100-111 then we'll also have more room for button expansion later.

MrMep commented 5 days ago

Thanks Andrew. In this case I was thinking of something simpler: a general switch button that transforms all single click actions into double click actions. Beside being simpler to implement, I think it would be simpler for users too. On the other side, it would be cool to have three more button actions, although at the cost of a complication for everyone. I'll follow your indications, let me know how it is best to proceed.

amowry commented 5 days ago

Oh I see-- that does sound a lot easier just having a switch. Let's go with that. I guess the "momentary" switches in the Config Tool would have to be disabled when the double-click switch is turned on. Let me know if you'd like me to do that Config Tool part. Thanks!

MrMep commented 3 days ago

I guess the "momentary" switches in the Config Tool would have to be disabled

Actually, I would let them independent: if "momentary" is active on a button, it would take precedence over double-click, what do you think?

I'll submit a PR very soon, I could take care of the Config tool part myself, thank you!

amowry commented 3 days ago

Good idea! That sounds fine to me.