|
|
|
@ -272,13 +272,13 @@ class BalanceInput(AbstractInput, threading.Thread):
@@ -272,13 +272,13 @@ class BalanceInput(AbstractInput, threading.Thread):
|
|
|
|
|
oldevt = evt |
|
|
|
|
|
|
|
|
|
if time.time() - lastchange < MIN_TIMES.get(evt, 0): |
|
|
|
|
print('player_id=%d debounce %s' % (self.player_id, evt)) |
|
|
|
|
#print('player_id=%d debounce %s' % (self.player_id, evt)) |
|
|
|
|
continue |
|
|
|
|
|
|
|
|
|
if self.lastevt != evt: |
|
|
|
|
self.evt = evt |
|
|
|
|
self.lastevt = evt |
|
|
|
|
print('player_id=%d event=%s' % (self.player_id, self.evt)) |
|
|
|
|
#print('player_id=%d event=%s' % (self.player_id, self.evt)) |
|
|
|
|
time.sleep(0.005) |
|
|
|
|
else: |
|
|
|
|
if xbal != -128 and ybal != -128: |
|
|
|
|