Skip to content
This repository was archived by the owner on Oct 28, 2023. It is now read-only.

Commit d1f8460

Browse files
authored
Merge pull request SHA2017-badge#35 from SHA2017-badge/doubleFlushInLauncher
Only flush once per keypress
2 parents f2d239d + eabecb3 commit d1f8460

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

esp32/modules/launcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def run_it(pushed):
4444
ugfx.input_attach(ugfx.BTN_A, run_it)
4545
ugfx.input_attach(ugfx.BTN_B, run_it)
4646

47-
ugfx.input_attach(ugfx.JOY_UP, lambda x: ugfx.flush())
48-
ugfx.input_attach(ugfx.JOY_DOWN, lambda x: ugfx.flush())
47+
ugfx.input_attach(ugfx.JOY_UP, lambda pushed: ugfx.flush() if pushed else 0)
48+
ugfx.input_attach(ugfx.JOY_DOWN, lambda pushed: ugfx.flush() if pushed else 0)
4949

5050
ugfx.flush()
5151
time.sleep(0.2)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy