Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
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
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
8b967a9f
Commit
8b967a9f
authored
Oct 22, 2016
by
Scott Lahteine
Committed by
GitHub
Oct 22, 2016
Browse files
Options
Downloads
Plain Diff
Merge pull request #5058 from thinkyhead/rc_reverse_arrow_buttons
Apply encoder reverse options to keypad arrows
parents
ca48a49f
e151f952
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/ultralcd.cpp
+18
-4
18 additions, 4 deletions
Marlin/ultralcd.cpp
with
18 additions
and
4 deletions
Marlin/ultralcd.cpp
+
18
−
4
View file @
8b967a9f
...
@@ -2929,30 +2929,44 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
...
@@ -2929,30 +2929,44 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
#if LCD_HAS_DIRECTIONAL_BUTTONS
#if LCD_HAS_DIRECTIONAL_BUTTONS
// Manage directional buttons
#if ENABLED(REVERSE_MENU_DIRECTION)
#define _ENCODER_UD_STEPS (ENCODER_STEPS_PER_MENU_ITEM * encoderDirection)
#else
#define _ENCODER_UD_STEPS ENCODER_STEPS_PER_MENU_ITEM
#endif
#if ENABLED(REVERSE_ENCODER_DIRECTION)
#define ENCODER_UD_STEPS _ENCODER_UD_STEPS
#define ENCODER_LR_PULSES ENCODER_PULSES_PER_STEP
#else
#define ENCODER_UD_STEPS -(_ENCODER_UD_STEPS)
#define ENCODER_LR_PULSES -(ENCODER_PULSES_PER_STEP)
#endif
if
(
false
)
{
if
(
false
)
{
// for the else-ifs below
// for the else-ifs below
}
}
#if BUTTON_EXISTS(UP)
#if BUTTON_EXISTS(UP)
else
if
(
BUTTON_PRESSED
(
UP
))
{
else
if
(
BUTTON_PRESSED
(
UP
))
{
encoderDiff
=
-
(
ENCODER_STEPS
_PER_MENU_ITEM
);
encoderDiff
=
-
(
ENCODER_
UD_
STEPS
);
next_button_update_ms
=
now
+
300
;
next_button_update_ms
=
now
+
300
;
}
}
#endif
#endif
#if BUTTON_EXISTS(DWN)
#if BUTTON_EXISTS(DWN)
else
if
(
BUTTON_PRESSED
(
DWN
))
{
else
if
(
BUTTON_PRESSED
(
DWN
))
{
encoderDiff
=
ENCODER_STEPS
_PER_MENU_ITEM
;
encoderDiff
=
ENCODER_
UD_
STEPS
;
next_button_update_ms
=
now
+
300
;
next_button_update_ms
=
now
+
300
;
}
}
#endif
#endif
#if BUTTON_EXISTS(LFT)
#if BUTTON_EXISTS(LFT)
else
if
(
BUTTON_PRESSED
(
LFT
))
{
else
if
(
BUTTON_PRESSED
(
LFT
))
{
encoderDiff
=
-
(
ENCODER_PULSES
_PER_STEP
);
encoderDiff
=
-
(
ENCODER_
LR_
PULSES
);
next_button_update_ms
=
now
+
300
;
next_button_update_ms
=
now
+
300
;
}
}
#endif
#endif
#if BUTTON_EXISTS(RT)
#if BUTTON_EXISTS(RT)
else
if
(
BUTTON_PRESSED
(
RT
))
{
else
if
(
BUTTON_PRESSED
(
RT
))
{
encoderDiff
=
ENCODER_PULSES
_PER_STEP
;
encoderDiff
=
ENCODER_
LR_
PULSES
;
next_button_update_ms
=
now
+
300
;
next_button_update_ms
=
now
+
300
;
}
}
#endif
#endif
...
...
...
...
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