LCD menu optimalization - initial lcd update fix

This commit is contained in:
Robert Pelnar 2018-07-16 23:54:46 +02:00
parent 19a72ef9eb
commit 2451455974
5 changed files with 4 additions and 19 deletions

View File

@ -907,8 +907,6 @@ void factory_reset(char level, bool quiet)
} }
//#include "LiquidCrystal_Prusa.h"
//extern LiquidCrystal_Prusa lcd;
FILE _uartout = {0}; FILE _uartout = {0};

View File

@ -15,9 +15,6 @@
#include "fastio.h" #include "fastio.h"
// commands // commands
#define LCD_CLEARDISPLAY 0x01 #define LCD_CLEARDISPLAY 0x01
#define LCD_RETURNHOME 0x02 #define LCD_RETURNHOME 0x02
@ -57,11 +54,6 @@
#define LCD_5x8DOTS 0x00 #define LCD_5x8DOTS 0x00
//LiquidCrystal_Prusa 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
//LiquidCrystal_Prusa lcd; //RS,Enable,D4,D5,D6,D7
FILE _lcdout = {0}; FILE _lcdout = {0};
@ -254,6 +246,7 @@ void lcd_init(void)
if (fourbitmode) lcd_displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS; if (fourbitmode) lcd_displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
else lcd_displayfunction = LCD_8BITMODE | LCD_1LINE | LCD_5x8DOTS; else lcd_displayfunction = LCD_8BITMODE | LCD_1LINE | LCD_5x8DOTS;
lcd_begin(LCD_WIDTH, LCD_HEIGHT, LCD_5x8DOTS, 1); lcd_begin(LCD_WIDTH, LCD_HEIGHT, LCD_5x8DOTS, 1);
//lcd_clear();
fdev_setup_stream(lcdout, lcd_putchar, NULL, _FDEV_SETUP_WRITE); //setup lcdout stream fdev_setup_stream(lcdout, lcd_putchar, NULL, _FDEV_SETUP_WRITE); //setup lcdout stream
} }

View File

@ -6,11 +6,6 @@
#include <stdio.h> #include <stdio.h>
////////////////////////////////////
// Create LCD class instance and chipset-specific information
//#include "LiquidCrystal_Prusa.h"
//extern LiquidCrystal_Prusa lcd;
extern FILE _lcdout; extern FILE _lcdout;

View File

@ -3,13 +3,11 @@
#ifdef TMC2130 #ifdef TMC2130
#include "tmc2130.h" #include "tmc2130.h"
//#include "LiquidCrystal_Prusa.h"
#include "ultralcd.h" #include "ultralcd.h"
#include "language.h" #include "language.h"
#include "spi.h" #include "spi.h"
//extern LiquidCrystal_Prusa lcd;
#define TMC2130_GCONF_NORMAL 0x00000000 // spreadCycle #define TMC2130_GCONF_NORMAL 0x00000000 // spreadCycle
#define TMC2130_GCONF_SGSENS 0x00003180 // spreadCycle with stallguard (stall activates DIAG0 and DIAG1 [pushpull]) #define TMC2130_GCONF_SGSENS 0x00003180 // spreadCycle with stallguard (stall activates DIAG0 and DIAG1 [pushpull])

View File

@ -7228,12 +7228,13 @@ void menu_action_sddirectory(const char* filename, char* longFilename)
void ultralcd_init() void ultralcd_init()
{ {
lcd_init(); lcd_init();
// lcd_refresh(); lcd_refresh();
lcd_longpress_func = menu_lcd_longpress_func; lcd_longpress_func = menu_lcd_longpress_func;
lcd_charsetup_func = menu_lcd_charsetup_func; lcd_charsetup_func = menu_lcd_charsetup_func;
lcd_lcdupdate_func = menu_lcd_lcdupdate_func; lcd_lcdupdate_func = menu_lcd_lcdupdate_func;
menu_menu = lcd_status_screen; menu_menu = lcd_status_screen;
menu_lcd_charsetup_func();
SET_INPUT(BTN_EN1); SET_INPUT(BTN_EN1);
SET_INPUT(BTN_EN2); SET_INPUT(BTN_EN2);
WRITE(BTN_EN1, HIGH); WRITE(BTN_EN1, HIGH);