Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xiretza
firmware
Commits
d4557428
Verified
Commit
d4557428
authored
5 years ago
by
xiretza
Browse files
Options
Downloads
Patches
Plain Diff
Remove debug functions
parent
496f5827
No related branches found
No related tags found
No related merge requests found
Pipeline
#3901
passed
5 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pycardium/modules/py/button_gestures.py
+1
-31
1 addition, 31 deletions
pycardium/modules/py/button_gestures.py
with
1 addition
and
31 deletions
pycardium/modules/py/button_gestures.py
+
1
−
31
View file @
d4557428
...
...
@@ -45,30 +45,6 @@ def _is_dummy_event(ev):
return
ev
.
event
in
[
NO_EVENT
]
def
button_name
(
idx
):
names
=
{
buttons
.
TOP_LEFT
:
"
TopLeft
"
,
buttons
.
TOP_RIGHT
:
"
TopRight
"
,
buttons
.
BOTTOM_LEFT
:
"
BottomLeft
"
,
buttons
.
BOTTOM_RIGHT
:
"
BottomRight
"
,
}
return
names
[
idx
]
def
event_name
(
idx
):
names
=
{
BUTTON_PRESSED
:
"
pressed
"
,
BUTTON_RELEASED
:
"
released
"
,
SHORT_PRESS
:
"
short press
"
,
MEDIUM_PRESS
:
"
medium press
"
,
LONG_PRESS
:
"
long press
"
,
DOUBLE_PRESS
:
"
double press
"
,
}
return
names
[
idx
]
class
Button
:
def
__init__
(
self
):
# Button has been pressed since this timestamp
...
...
@@ -107,12 +83,6 @@ class ButtonEvent:
self
.
event
=
event
self
.
time
=
time
def
__str__
(
self
):
return
"
{}: {}
"
.
format
(
button_name
(
self
.
button
),
event_name
(
self
.
event
))
def
__repr__
(
self
):
return
str
(
self
)
class
GestureFeed
:
"""
...
...
@@ -464,7 +434,7 @@ class GestureFeed:
"""
if
button
not
in
self
.
_buttons
:
raise
ValueError
(
"
Bad button index: {}
"
.
format
(
button
_name
(
button
)
))
raise
ValueError
(
"
Bad button index: {}
"
.
format
(
button
))
self
.
_buttons
[
button
].
enabled_events
=
set
(
events
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment