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
04a0d45c
Commit
04a0d45c
authored
Mar 5, 2016
by
Scott Lahteine
Browse files
Options
Downloads
Plain Diff
Merge pull request #2821 from MarlinFirmware/ReinitializeDisplay
Fix status LEDs update when reinitializing the display
parents
547d35a9
8d1eeff0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Marlin/ultralcd.h
+2
-1
2 additions, 1 deletion
Marlin/ultralcd.h
Marlin/ultralcd_implementation_hitachi_HD44780.h
+22
-16
22 additions, 16 deletions
Marlin/ultralcd_implementation_hitachi_HD44780.h
with
24 additions
and
17 deletions
Marlin/ultralcd.h
+
2
−
1
View file @
04a0d45c
...
@@ -67,7 +67,6 @@
...
@@ -67,7 +67,6 @@
#define EN_B BIT(BLEN_B)
#define EN_B BIT(BLEN_B)
#define EN_A BIT(BLEN_A)
#define EN_A BIT(BLEN_A)
#define LCD_CLICKED (buttons&EN_C)
#if ENABLED(REPRAPWORLD_KEYPAD)
#if ENABLED(REPRAPWORLD_KEYPAD)
#define EN_REPRAPWORLD_KEYPAD_F3 (BIT(BLEN_REPRAPWORLD_KEYPAD_F3))
#define EN_REPRAPWORLD_KEYPAD_F3 (BIT(BLEN_REPRAPWORLD_KEYPAD_F3))
#define EN_REPRAPWORLD_KEYPAD_F2 (BIT(BLEN_REPRAPWORLD_KEYPAD_F2))
#define EN_REPRAPWORLD_KEYPAD_F2 (BIT(BLEN_REPRAPWORLD_KEYPAD_F2))
...
@@ -86,6 +85,8 @@
...
@@ -86,6 +85,8 @@
#define REPRAPWORLD_KEYPAD_MOVE_Y_DOWN (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_DOWN)
#define REPRAPWORLD_KEYPAD_MOVE_Y_DOWN (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_DOWN)
#define REPRAPWORLD_KEYPAD_MOVE_Y_UP (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_UP)
#define REPRAPWORLD_KEYPAD_MOVE_Y_UP (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_UP)
#define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_MIDDLE)
#define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_MIDDLE)
#else
#define LCD_CLICKED (buttons&EN_C)
#endif //REPRAPWORLD_KEYPAD
#endif //REPRAPWORLD_KEYPAD
#else
#else
//atomic, do not change
//atomic, do not change
...
...
...
...
This diff is collapsed.
Click to expand it.
Marlin/ultralcd_implementation_hitachi_HD44780.h
+
22
−
16
View file @
04a0d45c
...
@@ -49,8 +49,10 @@
...
@@ -49,8 +49,10 @@
#if defined(BTN_ENC) && BTN_ENC > -1
#if defined(BTN_ENC) && BTN_ENC > -1
// the pause/stop/restart button is connected to BTN_ENC when used
// the pause/stop/restart button is connected to BTN_ENC when used
#define B_ST (EN_C) // Map the pause/stop/resume button into its normalized functional name
#define B_ST (EN_C) // Map the pause/stop/resume button into its normalized functional name
#undef LCD_CLICKED
#define LCD_CLICKED (buttons&(B_MI|B_RI|B_ST)) // pause/stop button also acts as click until we implement proper pause/stop.
#define LCD_CLICKED (buttons&(B_MI|B_RI|B_ST)) // pause/stop button also acts as click until we implement proper pause/stop.
#else
#else
#undef LCD_CLICKED
#define LCD_CLICKED (buttons&(B_MI|B_RI))
#define LCD_CLICKED (buttons&(B_MI|B_RI))
#endif
#endif
...
@@ -64,11 +66,13 @@
...
@@ -64,11 +66,13 @@
#define B_MI (PANELOLU2_ENCODER_C<<B_I2C_BTN_OFFSET) // requires LiquidTWI2 library v1.2.3 or later
#define B_MI (PANELOLU2_ENCODER_C<<B_I2C_BTN_OFFSET) // requires LiquidTWI2 library v1.2.3 or later
#undef LCD_CLICKED
#define LCD_CLICKED (buttons&B_MI)
#define LCD_CLICKED (buttons&B_MI)
// I2C buttons take too long to read inside an interrupt context and so we read them during lcd_update
// I2C buttons take too long to read inside an interrupt context and so we read them during lcd_update
#define LCD_HAS_SLOW_BUTTONS
#define LCD_HAS_SLOW_BUTTONS
#else
#else
#undef LCD_CLICKED
#define LCD_CLICKED (buttons&EN_C)
#define LCD_CLICKED (buttons&EN_C)
#endif
#endif
...
@@ -206,6 +210,10 @@
...
@@ -206,6 +210,10 @@
#define LCD_STR_PROGRESS "\x03\x04\x05"
#define LCD_STR_PROGRESS "\x03\x04\x05"
#endif
#endif
#if ENABLED(LCD_HAS_STATUS_INDICATORS)
static
void
lcd_implementation_update_indicators
();
#endif
static
void
lcd_set_custom_characters
(
static
void
lcd_set_custom_characters
(
#if ENABLED(LCD_PROGRESS_BAR)
#if ENABLED(LCD_PROGRESS_BAR)
bool
progress_bar_set
=
true
bool
progress_bar_set
=
true
...
@@ -362,13 +370,13 @@ static void lcd_implementation_init(
...
@@ -362,13 +370,13 @@ static void lcd_implementation_init(
lcd
.
begin
(
LCD_WIDTH
,
LCD_HEIGHT
);
lcd
.
begin
(
LCD_WIDTH
,
LCD_HEIGHT
);
#ifdef LCD_I2C_PIN_BL
#ifdef LCD_I2C_PIN_BL
lcd
.
setBacklightPin
(
LCD_I2C_PIN_BL
,
POSITIVE
);
lcd
.
setBacklightPin
(
LCD_I2C_PIN_BL
,
POSITIVE
);
lcd
.
setBacklight
(
HIGH
);
lcd
_implementation_update_indicators
(
);
#endif
#endif
#elif ENABLED(LCD_I2C_TYPE_MCP23017)
#elif ENABLED(LCD_I2C_TYPE_MCP23017)
lcd
.
setMCPType
(
LTI_TYPE_MCP23017
);
lcd
.
setMCPType
(
LTI_TYPE_MCP23017
);
lcd
.
begin
(
LCD_WIDTH
,
LCD_HEIGHT
);
lcd
.
begin
(
LCD_WIDTH
,
LCD_HEIGHT
);
lcd
.
setBacklight
(
0
);
//set all the LEDs off to begin with
lcd
_implementation_update_indicators
();
#elif ENABLED(LCD_I2C_TYPE_MCP23008)
#elif ENABLED(LCD_I2C_TYPE_MCP23008)
lcd
.
setMCPType
(
LTI_TYPE_MCP23008
);
lcd
.
setMCPType
(
LTI_TYPE_MCP23008
);
...
@@ -835,7 +843,6 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
...
@@ -835,7 +843,6 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
#if ENABLED(LCD_HAS_STATUS_INDICATORS)
#if ENABLED(LCD_HAS_STATUS_INDICATORS)
static
void
lcd_implementation_update_indicators
()
{
static
void
lcd_implementation_update_indicators
()
{
#if ENABLED(LCD_I2C_PANELOLU2) || ENABLED(LCD_I2C_VIKI)
// Set the LEDS - referred to as backlights by the LiquidTWI2 library
// Set the LEDS - referred to as backlights by the LiquidTWI2 library
static
uint8_t
ledsprev
=
0
;
static
uint8_t
ledsprev
=
0
;
uint8_t
leds
=
0
;
uint8_t
leds
=
0
;
...
@@ -849,7 +856,6 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
...
@@ -849,7 +856,6 @@ void lcd_implementation_drawedit(const char* pstr, char* value) {
lcd
.
setBacklight
(
leds
);
lcd
.
setBacklight
(
leds
);
ledsprev
=
leds
;
ledsprev
=
leds
;
}
}
#endif
}
}
#endif // LCD_HAS_STATUS_INDICATORS
#endif // LCD_HAS_STATUS_INDICATORS
...
...
...
...
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