Followup to Menu Refactor (#12275)
This commit is contained in:
@ -14,16 +14,15 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(ULTRA_LCD) && DISABLED(DOGLCD)
|
||||
#if HAS_CHARACTER_LCD
|
||||
|
||||
#include "../ultralcd.h"
|
||||
#include "../../Marlin.h"
|
||||
|
||||
#include <string.h>
|
||||
#include "../fontutils.h"
|
||||
#include "../lcdprint.h"
|
||||
|
||||
#include "ultralcd_common_HD44780.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifndef LCD_CLASS
|
||||
#include <LiquidCrystal.h>
|
||||
#define LCD_CLASS LiquidCrystal
|
||||
@ -1039,4 +1038,4 @@ int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) {
|
||||
return lcd_put_u8str_max_cb(utf8_str_P, read_byte_rom, max_length);
|
||||
}
|
||||
|
||||
#endif // ULTRA_LCD && !DOGLCD
|
||||
#endif // HAS_CHARACTER_LCD
|
||||
|
@ -32,24 +32,6 @@
|
||||
#include "../../libs/duration_t.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#include "../../feature/bedlevel/ubl/ubl.h"
|
||||
|
||||
#if ENABLED(ULTIPANEL)
|
||||
#define ULTRA_X_PIXELS_PER_CHAR 5
|
||||
#define ULTRA_Y_PIXELS_PER_CHAR 8
|
||||
#define ULTRA_COLUMNS_FOR_MESH_MAP 7
|
||||
#define ULTRA_ROWS_FOR_MESH_MAP 4
|
||||
|
||||
#define N_USER_CHARS 8
|
||||
|
||||
#define TOP_LEFT _BV(0)
|
||||
#define TOP_RIGHT _BV(1)
|
||||
#define LOWER_LEFT _BV(2)
|
||||
#define LOWER_RIGHT _BV(3)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
////////////////////////////////////
|
||||
// Setup button and encode mappings for each panel (into 'buttons' variable
|
||||
//
|
||||
@ -57,7 +39,7 @@
|
||||
// macro name. The mapping is independent of whether the button is directly connected or
|
||||
// via a shift/i2c register.
|
||||
|
||||
#if ENABLED(ULTIPANEL)
|
||||
#if HAS_LCD_MENU
|
||||
|
||||
extern volatile uint8_t buttons;
|
||||
|
||||
@ -119,7 +101,21 @@
|
||||
#define LCD_CLICKED (buttons & (B_MI|B_ST))
|
||||
#endif
|
||||
|
||||
#endif // ULTIPANEL
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#define ULTRA_X_PIXELS_PER_CHAR 5
|
||||
#define ULTRA_Y_PIXELS_PER_CHAR 8
|
||||
#define ULTRA_COLUMNS_FOR_MESH_MAP 7
|
||||
#define ULTRA_ROWS_FOR_MESH_MAP 4
|
||||
|
||||
#define N_USER_CHARS 8
|
||||
|
||||
#define TOP_LEFT _BV(0)
|
||||
#define TOP_RIGHT _BV(1)
|
||||
#define LOWER_LEFT _BV(2)
|
||||
#define LOWER_RIGHT _BV(3)
|
||||
#endif
|
||||
|
||||
#endif // HAS_LCD_MENU
|
||||
|
||||
////////////////////////////////////
|
||||
// Create LCD class instance and chipset-specific information
|
||||
@ -141,12 +137,11 @@
|
||||
|
||||
#elif ENABLED(LCD_I2C_TYPE_MCP23017)
|
||||
// For the LED indicators (which may be mapped to different events in lcd_implementation_update_indicators())
|
||||
#define LCD_HAS_STATUS_INDICATORS
|
||||
#define LED_A 0x04 //100
|
||||
#define LED_B 0x02 //010
|
||||
#define LED_C 0x01 //001
|
||||
|
||||
#define LCD_HAS_STATUS_INDICATORS
|
||||
|
||||
#include <Wire.h>
|
||||
#include <LiquidTWI2.h>
|
||||
#define LCD_CLASS LiquidTWI2
|
||||
@ -160,9 +155,9 @@
|
||||
#include <LiquidCrystal_I2C.h>
|
||||
#define LCD_CLASS LiquidCrystal_I2C
|
||||
|
||||
// 2 wire Non-latching LCD SR from:
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
|
||||
#elif ENABLED(SR_LCD_2W_NL)
|
||||
// 2 wire Non-latching LCD SR from:
|
||||
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
|
||||
extern "C" void __cxa_pure_virtual() { while (1); }
|
||||
#include <LCD.h>
|
||||
#include <LiquidCrystal_SR.h>
|
||||
@ -178,12 +173,7 @@
|
||||
// Standard directly connected LCD implementations
|
||||
#include <LiquidCrystal.h>
|
||||
#define LCD_CLASS LiquidCrystal
|
||||
|
||||
#endif
|
||||
|
||||
#include "../fontutils.h"
|
||||
#include "../lcdprint.h"
|
||||
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
#define LCD_STR_PROGRESS "\x03\x04\x05"
|
||||
#endif
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(ULTRA_LCD) && DISABLED(DOGLCD)
|
||||
#if HAS_CHARACTER_LCD
|
||||
|
||||
/**
|
||||
* ultralcd_impl_HD44780.cpp
|
||||
@ -40,6 +40,10 @@
|
||||
#include "../../module/planner.h"
|
||||
#include "../../module/motion.h"
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
#include "../../feature/bedlevel/ubl/ubl.h"
|
||||
#endif
|
||||
|
||||
////////////////////////////////////
|
||||
// Create LCD class instance and chipset-specific information
|
||||
#if ENABLED(LCD_I2C_TYPE_PCF8575)
|
||||
@ -79,16 +83,6 @@
|
||||
LCD_CLASS lcd(LCD_PINS_RS, LCD_PINS_ENABLE, LCD_PINS_D4, LCD_PINS_D5, LCD_PINS_D6, LCD_PINS_D7); //RS,Enable,D4,D5,D6,D7
|
||||
#endif
|
||||
|
||||
#include "../fontutils.h"
|
||||
#include "../lcdprint.h"
|
||||
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
static millis_t progress_bar_ms = 0; // Start millis of the current progress bar cycle
|
||||
#if PROGRESS_MSG_EXPIRE > 0
|
||||
static millis_t expire_status_ms = 0; // millis at which to expire the status message
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(LCD_HAS_STATUS_INDICATORS)
|
||||
static void lcd_implementation_update_indicators();
|
||||
#endif
|
||||
@ -100,9 +94,13 @@ static void createChar_P(const char c, const byte * const ptr) {
|
||||
lcd.createChar(c, temp);
|
||||
}
|
||||
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
#define LCD_STR_PROGRESS "\x03\x04\x05"
|
||||
#endif
|
||||
|
||||
void lcd_set_custom_characters(
|
||||
#if ENABLED(LCD_PROGRESS_BAR) || ENABLED(SHOW_BOOTSCREEN)
|
||||
const uint8_t screen_charset=CHARSET_INFO
|
||||
const HD44780CharSet screen_charset/*=CHARSET_INFO*/
|
||||
#endif
|
||||
) {
|
||||
// CHARSET_BOOT
|
||||
@ -318,11 +316,7 @@ void lcd_set_custom_characters(
|
||||
|
||||
}
|
||||
|
||||
void lcd_implementation_init(
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
const uint8_t screen_charset=CHARSET_INFO
|
||||
#endif
|
||||
) {
|
||||
void lcd_implementation_init() {
|
||||
|
||||
#if ENABLED(LCD_I2C_TYPE_PCF8575)
|
||||
lcd.begin(LCD_WIDTH, LCD_HEIGHT);
|
||||
@ -348,11 +342,7 @@ void lcd_implementation_init(
|
||||
lcd.begin(LCD_WIDTH, LCD_HEIGHT);
|
||||
#endif
|
||||
|
||||
lcd_set_custom_characters(
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
screen_charset
|
||||
#endif
|
||||
);
|
||||
LCD_SET_CHARSET(currentScreen == lcd_status_screen ? CHARSET_INFO : CHARSET_MENU);
|
||||
|
||||
lcd.clear();
|
||||
}
|
||||
@ -416,7 +406,7 @@ void lcd_implementation_clear() { lcd.clear(); }
|
||||
}
|
||||
|
||||
void lcd_bootscreen() {
|
||||
lcd_set_custom_characters(CHARSET_BOOT);
|
||||
LCD_SET_CHARSET(CHARSET_BOOT);
|
||||
lcd.clear();
|
||||
|
||||
#define LCD_EXTRA_SPACE (LCD_WIDTH-8)
|
||||
@ -485,7 +475,7 @@ void lcd_implementation_clear() { lcd.clear(); }
|
||||
|
||||
lcd.clear();
|
||||
safe_delay(100);
|
||||
lcd_set_custom_characters();
|
||||
LCD_SET_CHARSET(CHARSET_INFO);
|
||||
lcd.clear();
|
||||
}
|
||||
|
||||
@ -975,7 +965,7 @@ FORCE_INLINE void _draw_status_message(const bool blink) {
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(ULTIPANEL)
|
||||
#if HAS_LCD_MENU
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
|
||||
@ -1581,6 +1571,6 @@ FORCE_INLINE void _draw_status_message(const bool blink) {
|
||||
|
||||
#endif // AUTO_BED_LEVELING_UBL
|
||||
|
||||
#endif // ULTIPANEL
|
||||
#endif // HAS_LCD_MENU
|
||||
|
||||
#endif // ULTRA_LCD && !DOGLCD
|
||||
#endif // HAS_CHARACTER_LCD
|
||||
|
Reference in New Issue
Block a user