TreeFallSound / pi-stomp

pi-stomp is a DIY high definition, multi-effects stompbox platform for guitar, bass and keyboards
https://treefallsound.com
GNU General Public License v3.0
104 stars 19 forks source link

add support for longpress_groups (multi-switch actions). Config file validation too. #74

Closed rreichenbach closed 1 year ago

rreichenbach commented 1 year ago

Multi-switch actions can be specified by adding "longpress_groups" field to a footswitch spec in the config file. The value will be a group name and callback handle. When two switches including the same group are longpressed, the action is taken. Currently, two actions are available (next_snapshot and previous_snapshot). We can easily add more. The longpress_groups field is a list so a switch can be part of multiple switch groups. Example: fs1 and fs2 call next_snapshot, fs2 and fs3 call previous_snapshot).

This change also adds config file validation which I've been wanting for a while. That should allow us to add config file based functionality without as much worry that users will brick their system as they'll at least be able to see config file errors when they're making changes.