chill wrote: > > In those last three examples, the time intervals between the double > interrupts are 11.7ms, 10.1ms and 12.4ms respectively. So at first > sight, if you were to limit the VOLU interrupt rate to one every 20ms > (instead of the 500ms used with TRAC), then those double interrupts > would be prevented from causing two increments - they could be treated > as one event, which could be programmed to send whatever volume > increment the user had chosen. 20ms would correspond to 50 possible > events per second, which feels like it should still be fast enough - I > couldn't physically turn my 30-increment encoder through 1.67 > revolutions in 1 second. But maybe the 20ms could be a > user-configurable parameter too. >
this is where it's messy. The encoder interrupt runs in the background adding + or - increments, Every 100 ms, the encoder count is retrieved, and a volume command is sent if there was a change. So I would need to add dampening to the interrupt, which I did for buttons, but I need to check the behavior with encoders. > Can I just check a previous detail? I'm pretty sure you're aware of > this, but just in case we've got crossed wires and you thought I was > referring to the original sbpd. The pigpio version currently sends the > command associated with the first button in the list whenever I press > any programmed button. You explained the difference in the way the pin > is identified, but your explanation implied it would be simpler to know > which button has been pressed under pigpio, so it seems odd that the > wrong commands are being sent. Apologies if you're aware of this - I > know that version was only a proof of concept etc. I've only been talking about the pigpio version. I've not tested with 2 buttons, can you show be a trace with 2 buttons, and long an short presses of each button. piCorePlayer a small player for the Raspberry Pi in RAM. Homepage: https://www.picoreplayer.org Please 'donate' (https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=U7JHY5WYHCNRU&lc=GB¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted) if you like the piCorePlayer ------------------------------------------------------------------------ paul-'s Profile: http://forums.slimdevices.com/member.php?userid=58858 View this thread: http://forums.slimdevices.com/showthread.php?t=107001 _______________________________________________ diy mailing list diy@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/diy