Skip to main content
Homepage
Explore
Search or go to…
/
Register
Sign in
Explore
Primary navigation
Project
M
marlin-anet-a8
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Collapse sidebar
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
0745d489
Commit
0745d489
authored
Aug 10, 2019
by
Tanguy Pruvot
Committed by
Scott Lahteine
Aug 10, 2019
Browse files
Options
Downloads
Patches
Plain Diff
Fix build with and without TOUCH_BUTTONS (#14912)
parent
e7aba49c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Marlin/src/lcd/ultralcd.cpp
+27
-28
27 additions, 28 deletions
Marlin/src/lcd/ultralcd.cpp
with
27 additions
and
28 deletions
Marlin/src/lcd/ultralcd.cpp
+
27
−
28
View file @
0745d489
...
@@ -764,15 +764,14 @@ void MarlinUI::update() {
...
@@ -764,15 +764,14 @@ void MarlinUI::update() {
// If the action button is pressed...
// If the action button is pressed...
static
bool
wait_for_unclick
;
// = 0
static
bool
wait_for_unclick
;
// = 0
#if ENABLED(TOUCH_BUTTONS)
if
(
touch_buttons
)
{
if
(
touch_buttons
)
{
if
(
buttons
&
EN_C
)
{
if
(
!
wait_for_unclick
&&
(
buttons
&
EN_C
))
{
// If not waiting for a debounce release:
if
(
!
wait_for_unclick
)
{
// If not waiting for a debounce release:
wait_for_unclick
=
true
;
// - Set debounce flag to ignore continous clicks
wait_for_unclick
=
true
;
// - Set debounce flag to ignore continous clicks
lcd_clicked
=
!
wait_for_user
&&
!
no_reentry
;
// - Keep the click if not waiting for a user-click
lcd_clicked
=
!
wait_for_user
&&
!
no_reentry
;
// - Keep the click if not waiting for a user-click
wait_for_user
=
false
;
// - Any click clears wait for user
wait_for_user
=
false
;
// - Any click clears wait for user
quick_feedback
();
// - Always make a click sound
quick_feedback
();
// - Always make a click sound
}
}
}
else
if
(
buttons
&
(
EN_A
|
EN_B
))
{
// Ignore the encoder if clicked, to prevent "slippage"
else
if
(
buttons
&
(
EN_A
|
EN_B
))
{
// Ignore the encoder if clicked, to prevent "slippage"
const
millis_t
ms
=
millis
();
const
millis_t
ms
=
millis
();
if
(
ELAPSED
(
ms
,
next_button_update_ms
))
{
if
(
ELAPSED
(
ms
,
next_button_update_ms
))
{
...
@@ -789,7 +788,8 @@ void MarlinUI::update() {
...
@@ -789,7 +788,8 @@ void MarlinUI::update() {
}
}
}
}
}
}
else
{
else
#endif //TOUCH_BUTTONS
//
//
// Integrated LCD click handling via button_pressed()
// Integrated LCD click handling via button_pressed()
//
//
...
@@ -801,7 +801,6 @@ void MarlinUI::update() {
...
@@ -801,7 +801,6 @@ void MarlinUI::update() {
quick_feedback
();
// - Always make a click sound
quick_feedback
();
// - Always make a click sound
}
}
}
}
}
else
wait_for_unclick
=
false
;
else
wait_for_unclick
=
false
;
#if HAS_DIGITAL_BUTTONS && BUTTON_EXISTS(BACK)
#if HAS_DIGITAL_BUTTONS && BUTTON_EXISTS(BACK)
...
...
...
...
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