This is something I need to update the library with- it’s effectively a debounce that’s required. Perhaps catch the first touch and ignore any subsequent ones for a certain period of time.
Thank you for this, it works really well.
However, now the Skywriter registers a ‘double tap’ as a ‘double tap’ and a ‘tap’ and a ‘touch’. When I use ‘tap’ it registers a ‘tap’ and a ‘touch’.
So for example if I double tap ‘north’ it prints, 'double_tap north, tap north and touch north’
Any ideas?
Thanks again
Dan
I might have to look over the code for this- I’ve gone and confused myself!
In theory, @skywriter.tap() should only catch tap events and not touches or double-taps.
The trouble is that an event can be a touch before it becomes a tap. Now it’s possible to wait and see if a tap comes in and ignore the touch, but that might make touches really unresponsive, so I didn’t initially do it in the library.
The same applies for a double tap, it’s detected as a touch, then a tap then finally confirmed as a double-tap, all three events come form the Skywriter and hanging around waiting for a double-tap before firing a tap event might slow taps down.
There must be a sensible solution, I’ll have to tinker!
Haven’t forgotten about you ;) Will have to put it off until all the Pi 2 chaos is dealt with, though… the world of software has been just a little bit hectic lately!