LCD menu optimalization - print functions
+removed unused code
This commit is contained in:
parent
68e59399af
commit
e22d204e8e
|
|
@ -238,14 +238,14 @@ void LiquidCrystal_Prusa::begin_noclear(uint8_t cols, uint8_t lines, uint8_t dot
|
|||
// set the entry mode
|
||||
command(LCD_ENTRYMODESET | _displaymode);
|
||||
delayMicroseconds(60);
|
||||
|
||||
/*
|
||||
setCursor(8,0);
|
||||
print(" ");
|
||||
setCursor(8,1);
|
||||
print(" ");
|
||||
setCursor(6,2);
|
||||
print(" ");
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -351,11 +351,11 @@ void LiquidCrystal_Prusa::createChar_P(uint8_t location, const uint8_t* charmap)
|
|||
|
||||
/*********** mid level commands, for sending data/cmds */
|
||||
|
||||
inline void LiquidCrystal_Prusa::command(uint8_t value) {
|
||||
void LiquidCrystal_Prusa::command(uint8_t value) {
|
||||
send(value, LOW);
|
||||
}
|
||||
|
||||
inline size_t LiquidCrystal_Prusa::write(uint8_t value) {
|
||||
size_t LiquidCrystal_Prusa::write(uint8_t value) {
|
||||
if (value == '\n')
|
||||
{
|
||||
if (_currline > 3) _currline = -1;
|
||||
|
|
@ -374,7 +374,7 @@ inline size_t LiquidCrystal_Prusa::write(uint8_t value) {
|
|||
//CursorShow "\x1b[?25h"
|
||||
//CursorHide "\x1b[?25l"
|
||||
|
||||
inline size_t LiquidCrystal_Prusa::escape_write(uint8_t chr)
|
||||
size_t LiquidCrystal_Prusa::escape_write(uint8_t chr)
|
||||
{
|
||||
#define escape_cnt (_escape[0]) //escape character counter
|
||||
#define is_num_msk (_escape[1]) //numeric character bit mask
|
||||
|
|
@ -550,170 +550,3 @@ void LiquidCrystal_Prusa::write8bits(uint8_t value) {
|
|||
|
||||
pulseEnable();
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::print(const char* s)
|
||||
{
|
||||
while (*s) write(*(s++));
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::print(char c, int base)
|
||||
{
|
||||
print((long) c, base);
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::print(unsigned char b, int base)
|
||||
{
|
||||
print((unsigned long) b, base);
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::print(int n, int base)
|
||||
{
|
||||
print((long) n, base);
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::print(unsigned int n, int base)
|
||||
{
|
||||
print((unsigned long) n, base);
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::print(long n, int base)
|
||||
{
|
||||
if (base == 0) {
|
||||
write(n);
|
||||
} else if (base == 10) {
|
||||
if (n < 0) {
|
||||
print('-');
|
||||
n = -n;
|
||||
}
|
||||
printNumber(n, 10);
|
||||
} else {
|
||||
printNumber(n, base);
|
||||
}
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::print(unsigned long n, int base)
|
||||
{
|
||||
if (base == 0) write(n);
|
||||
else printNumber(n, base);
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::print(double n, int digits)
|
||||
{
|
||||
printFloat(n, digits);
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::println(void)
|
||||
{
|
||||
print('\r');
|
||||
print('\n');
|
||||
}
|
||||
|
||||
/*void LiquidCrystal_Prusa::println(const String &s)
|
||||
{
|
||||
print(s);
|
||||
println();
|
||||
}*/
|
||||
|
||||
void LiquidCrystal_Prusa::println(const char c[])
|
||||
{
|
||||
print(c);
|
||||
println();
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::println(char c, int base)
|
||||
{
|
||||
print(c, base);
|
||||
println();
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::println(unsigned char b, int base)
|
||||
{
|
||||
print(b, base);
|
||||
println();
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::println(int n, int base)
|
||||
{
|
||||
print(n, base);
|
||||
println();
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::println(unsigned int n, int base)
|
||||
{
|
||||
print(n, base);
|
||||
println();
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::println(long n, int base)
|
||||
{
|
||||
print(n, base);
|
||||
println();
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::println(unsigned long n, int base)
|
||||
{
|
||||
print(n, base);
|
||||
println();
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::println(double n, int digits)
|
||||
{
|
||||
print(n, digits);
|
||||
println();
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::printNumber(unsigned long n, uint8_t base)
|
||||
{
|
||||
unsigned char buf[8 * sizeof(long)]; // Assumes 8-bit chars.
|
||||
unsigned long i = 0;
|
||||
|
||||
if (n == 0) {
|
||||
print('0');
|
||||
return;
|
||||
}
|
||||
|
||||
while (n > 0) {
|
||||
buf[i++] = n % base;
|
||||
n /= base;
|
||||
}
|
||||
|
||||
for (; i > 0; i--)
|
||||
print((char) (buf[i - 1] < 10 ?
|
||||
'0' + buf[i - 1] :
|
||||
'A' + buf[i - 1] - 10));
|
||||
}
|
||||
|
||||
void LiquidCrystal_Prusa::printFloat(double number, uint8_t digits)
|
||||
{
|
||||
// Handle negative numbers
|
||||
if (number < 0.0)
|
||||
{
|
||||
print('-');
|
||||
number = -number;
|
||||
}
|
||||
|
||||
// Round correctly so that print(1.999, 2) prints as "2.00"
|
||||
double rounding = 0.5;
|
||||
for (uint8_t i=0; i<digits; ++i)
|
||||
rounding /= 10.0;
|
||||
|
||||
number += rounding;
|
||||
|
||||
// Extract the integer part of the number and print it
|
||||
unsigned long int_part = (unsigned long)number;
|
||||
double remainder = number - (double)int_part;
|
||||
print(int_part);
|
||||
|
||||
// Print the decimal point, but only if there are digits beyond
|
||||
if (digits > 0)
|
||||
print(".");
|
||||
|
||||
// Extract digits from the remainder one at a time
|
||||
while (digits-- > 0)
|
||||
{
|
||||
remainder *= 10.0;
|
||||
int toPrint = int(remainder);
|
||||
print(toPrint);
|
||||
remainder -= toPrint;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <inttypes.h>
|
||||
#include <stddef.h>
|
||||
//#include "Print.h"
|
||||
|
||||
// commands
|
||||
#define LCD_CLEARDISPLAY 0x01
|
||||
|
|
@ -82,34 +81,8 @@ public:
|
|||
|
||||
void createChar_P(uint8_t, const uint8_t*);
|
||||
void setCursor(uint8_t, uint8_t);
|
||||
// virtual size_t write(uint8_t);
|
||||
size_t write(uint8_t);
|
||||
void command(uint8_t);
|
||||
|
||||
void print(const char*);
|
||||
void print(char, int = 0);
|
||||
void print(unsigned char, int = 0);
|
||||
void print(int, int = 10);
|
||||
void print(unsigned int, int = 10);
|
||||
void print(long, int = 10);
|
||||
void print(unsigned long, int = 10);
|
||||
void print(double, int = 2);
|
||||
|
||||
// void println(const String &s);
|
||||
void println(const char[]);
|
||||
void println(char, int = 0);
|
||||
void println(unsigned char, int = 0);
|
||||
void println(int, int = 10);
|
||||
void println(unsigned int, int = 10);
|
||||
void println(long, int = 10);
|
||||
void println(unsigned long, int = 10);
|
||||
void println(double, int = 2);
|
||||
void println(void);
|
||||
|
||||
void printNumber(unsigned long n, uint8_t base);
|
||||
void printFloat(double number, uint8_t digits);
|
||||
|
||||
// using Print::write;
|
||||
private:
|
||||
void send(uint8_t, uint8_t);
|
||||
void write4bits(uint8_t);
|
||||
|
|
|
|||
|
|
@ -62,8 +62,6 @@
|
|||
#define MYSERIAL MSerial
|
||||
#endif
|
||||
|
||||
extern FILE _lcdout;
|
||||
#define lcdout (&_lcdout)
|
||||
#include "lcd.h"
|
||||
|
||||
extern FILE _uartout;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@
|
|||
|
||||
#include "printers.h"
|
||||
|
||||
#include "lcd.h"
|
||||
#include "menu.h"
|
||||
#include "ultralcd.h"
|
||||
|
||||
|
|
@ -879,7 +878,8 @@ void factory_reset(char level, bool quiet)
|
|||
|
||||
er_progress = 0;
|
||||
lcd_puts_at_P(3, 3, PSTR(" "));
|
||||
lcd_print_at(3, 3, er_progress);
|
||||
lcd_set_cursor(3, 3);
|
||||
lcd_print(er_progress);
|
||||
|
||||
// Erase EEPROM
|
||||
for (int i = 0; i < 4096; i++) {
|
||||
|
|
@ -888,7 +888,8 @@ void factory_reset(char level, bool quiet)
|
|||
if (i % 41 == 0) {
|
||||
er_progress++;
|
||||
lcd_puts_at_P(3, 3, PSTR(" "));
|
||||
lcd_print_at(3, 3, er_progress);
|
||||
lcd_set_cursor(3, 3);
|
||||
lcd_print(er_progress);
|
||||
lcd_puts_P(PSTR("%"));
|
||||
}
|
||||
|
||||
|
|
@ -909,13 +910,6 @@ void factory_reset(char level, bool quiet)
|
|||
#include "LiquidCrystal_Prusa.h"
|
||||
extern LiquidCrystal_Prusa lcd;
|
||||
|
||||
FILE _lcdout = {0};
|
||||
|
||||
int lcd_putchar(char c, FILE *stream)
|
||||
{
|
||||
lcd.write(c);
|
||||
return 0;
|
||||
}
|
||||
|
||||
FILE _uartout = {0};
|
||||
|
||||
|
|
@ -930,7 +924,7 @@ void lcd_splash()
|
|||
{
|
||||
// lcd_puts_at_P(0, 1, PSTR(" Original Prusa "));
|
||||
// lcd_puts_at_P(0, 2, PSTR(" 3D Printers "));
|
||||
// lcd.print_P(PSTR("\x1b[1;3HOriginal Prusa\x1b[2;4H3D Printers"));
|
||||
// lcd_puts_P(PSTR("\x1b[1;3HOriginal Prusa\x1b[2;4H3D Printers"));
|
||||
// fputs_P(PSTR(ESC_2J ESC_H(1,1) "Original Prusa i3" ESC_H(3,2) "Prusa Research"), lcdout);
|
||||
lcd_puts_P(PSTR(ESC_2J ESC_H(1,1) "Original Prusa i3" ESC_H(3,2) "Prusa Research"));
|
||||
// lcd_printf_P(_N(ESC_2J "x:%.3f\ny:%.3f\nz:%.3f\ne:%.3f"), _x, _y, _z, _e);
|
||||
|
|
@ -2967,7 +2961,8 @@ bool gcode_M45(bool onlyZ, int8_t verbosity_level)
|
|||
lcd_show_fullscreen_message_and_wait_P(_T(MSG_PAPER));
|
||||
KEEPALIVE_STATE(IN_HANDLER);
|
||||
lcd_display_message_fullscreen_P(_T(MSG_FIND_BED_OFFSET_AND_SKEW_LINE1));
|
||||
lcd_print_at(0, 2, 1);
|
||||
lcd_set_cursor(0, 2);
|
||||
lcd_print(1);
|
||||
lcd_puts_P(_T(MSG_FIND_BED_OFFSET_AND_SKEW_LINE2));
|
||||
}
|
||||
// Move the print head close to the bed.
|
||||
|
|
@ -6365,8 +6360,8 @@ Sigma_Exit:
|
|||
}
|
||||
else {
|
||||
counterBeep = 20; //beeper will be inactive during waiting for nozzle preheat
|
||||
lcd.setCursor(1, 4);
|
||||
lcd.print(ftostr3(degHotend(active_extruder)));
|
||||
lcd_set_cursor(1, 4);
|
||||
lcd_print(ftostr3(degHotend(active_extruder)));
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include "stepper.h"
|
||||
#include "temperature.h"
|
||||
#include "language.h"
|
||||
#include "lcd.h"
|
||||
|
||||
#ifdef SDSUPPORT
|
||||
|
||||
|
|
@ -890,7 +889,11 @@ void CardReader::presort() {
|
|||
#if !SDSORT_USES_RAM //show progresss bar only if slow sorting method is used
|
||||
int8_t percent = (counter * 100) / total;//((counter * 100) / pow((fileCnt-1),2));
|
||||
for (int column = 0; column < 20; column++) {
|
||||
if (column < (percent / 5)) lcd_print_at(column, 2, "\x01"); //simple progress bar
|
||||
if (column < (percent / 5))
|
||||
{
|
||||
lcd_set_cursor(column, 2);
|
||||
lcd_print('\x01'); //simple progress bar
|
||||
}
|
||||
}
|
||||
counter++;
|
||||
#endif
|
||||
|
|
@ -965,7 +968,11 @@ void CardReader::presort() {
|
|||
sort_count = fileCnt;
|
||||
}
|
||||
#if !SDSORT_USES_RAM //show progresss bar only if slow sorting method is used
|
||||
for (int column = 0; column <= 19; column++) lcd_print_at(column, 2, "\x01"); //simple progress bar
|
||||
for (int column = 0; column <= 19; column++)
|
||||
{
|
||||
lcd_set_cursor(column, 2);
|
||||
lcd_print('\x01'); //simple progress bar
|
||||
}
|
||||
delay(300);
|
||||
lcd_set_degree();
|
||||
lcd_clear();
|
||||
|
|
|
|||
193
Firmware/lcd.cpp
193
Firmware/lcd.cpp
|
|
@ -6,8 +6,19 @@
|
|||
#include <avr/pgmspace.h>
|
||||
#include "Timer.h"
|
||||
|
||||
extern FILE _lcdout;
|
||||
#define lcdout (&_lcdout)
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
FILE _lcdout = {0};
|
||||
|
||||
int lcd_putchar(char c, FILE *stream)
|
||||
{
|
||||
lcd_write(c);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void lcd_command(uint8_t value)
|
||||
|
|
@ -62,6 +73,118 @@ int lcd_printf_P(const char* format, ...)
|
|||
|
||||
|
||||
|
||||
void lcd_print(const char* s)
|
||||
{
|
||||
while (*s) lcd_write(*(s++));
|
||||
}
|
||||
|
||||
void lcd_print(char c, int base)
|
||||
{
|
||||
lcd_print((long) c, base);
|
||||
}
|
||||
|
||||
void lcd_print(unsigned char b, int base)
|
||||
{
|
||||
lcd_print((unsigned long) b, base);
|
||||
}
|
||||
|
||||
void lcd_print(int n, int base)
|
||||
{
|
||||
lcd_print((long) n, base);
|
||||
}
|
||||
|
||||
void lcd_print(unsigned int n, int base)
|
||||
{
|
||||
lcd_print((unsigned long) n, base);
|
||||
}
|
||||
|
||||
void lcd_print(long n, int base)
|
||||
{
|
||||
if (base == 0)
|
||||
lcd_write(n);
|
||||
else if (base == 10)
|
||||
{
|
||||
if (n < 0)
|
||||
{
|
||||
lcd_print('-');
|
||||
n = -n;
|
||||
}
|
||||
lcd_printNumber(n, 10);
|
||||
}
|
||||
else
|
||||
lcd_printNumber(n, base);
|
||||
}
|
||||
|
||||
void lcd_print(unsigned long n, int base)
|
||||
{
|
||||
if (base == 0)
|
||||
lcd_write(n);
|
||||
else
|
||||
lcd_printNumber(n, base);
|
||||
}
|
||||
|
||||
void lcd_print(double n, int digits)
|
||||
{
|
||||
lcd_printFloat(n, digits);
|
||||
}
|
||||
|
||||
|
||||
void lcd_printNumber(unsigned long n, uint8_t base)
|
||||
{
|
||||
unsigned char buf[8 * sizeof(long)]; // Assumes 8-bit chars.
|
||||
unsigned long i = 0;
|
||||
if (n == 0)
|
||||
{
|
||||
lcd_print('0');
|
||||
return;
|
||||
}
|
||||
while (n > 0)
|
||||
{
|
||||
buf[i++] = n % base;
|
||||
n /= base;
|
||||
}
|
||||
for (; i > 0; i--)
|
||||
lcd_print((char) (buf[i - 1] < 10 ? '0' + buf[i - 1] : 'A' + buf[i - 1] - 10));
|
||||
}
|
||||
|
||||
void lcd_printFloat(double number, uint8_t digits)
|
||||
{
|
||||
// Handle negative numbers
|
||||
if (number < 0.0)
|
||||
{
|
||||
lcd_print('-');
|
||||
number = -number;
|
||||
}
|
||||
// Round correctly so that print(1.999, 2) prints as "2.00"
|
||||
double rounding = 0.5;
|
||||
for (uint8_t i=0; i<digits; ++i)
|
||||
rounding /= 10.0;
|
||||
number += rounding;
|
||||
// Extract the integer part of the number and print it
|
||||
unsigned long int_part = (unsigned long)number;
|
||||
double remainder = number - (double)int_part;
|
||||
lcd_print(int_part);
|
||||
// Print the decimal point, but only if there are digits beyond
|
||||
if (digits > 0)
|
||||
lcd_print('.');
|
||||
// Extract digits from the remainder one at a time
|
||||
while (digits-- > 0)
|
||||
{
|
||||
remainder *= 10.0;
|
||||
int toPrint = int(remainder);
|
||||
lcd_print(toPrint);
|
||||
remainder -= toPrint;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -259,7 +382,6 @@ void lcd_buttons_update(void)
|
|||
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
void lcd_implementation_init(void)
|
||||
|
|
@ -278,76 +400,31 @@ void lcd_implementation_init_noclear(void)
|
|||
|
||||
|
||||
|
||||
void lcd_print(int8_t i)
|
||||
{
|
||||
lcd.print(i);
|
||||
}
|
||||
|
||||
void lcd_print_at(uint8_t x, uint8_t y, int8_t i)
|
||||
{
|
||||
lcd.setCursor(x, y);
|
||||
lcd.print(i);
|
||||
}
|
||||
|
||||
void lcd_print(int i)
|
||||
{
|
||||
lcd.print(i);
|
||||
}
|
||||
|
||||
void lcd_print_at(uint8_t x, uint8_t y, int i)
|
||||
{
|
||||
lcd.setCursor(x, y);
|
||||
lcd.print(i);
|
||||
}
|
||||
|
||||
void lcd_print(float f)
|
||||
{
|
||||
lcd.print(f);
|
||||
}
|
||||
|
||||
void lcd_print(const char *str)
|
||||
{
|
||||
lcd.print(str);
|
||||
}
|
||||
|
||||
void lcd_print_at(uint8_t x, uint8_t y, const char *str)
|
||||
{
|
||||
lcd.setCursor(x, y);
|
||||
lcd.print(str);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void lcd_drawedit(const char* pstr, char* value)
|
||||
{
|
||||
lcd.setCursor(1, 1);
|
||||
lcd_set_cursor(1, 1);
|
||||
lcd_puts_P(pstr);
|
||||
lcd.print(':');
|
||||
lcd_print(':');
|
||||
#if LCD_WIDTH < 20
|
||||
lcd.setCursor(LCD_WIDTH - strlen(value), 1);
|
||||
lcd_set_cursor(LCD_WIDTH - strlen(value), 1);
|
||||
#else
|
||||
lcd.setCursor(LCD_WIDTH -1 - strlen(value), 1);
|
||||
lcd_set_cursor(LCD_WIDTH -1 - strlen(value), 1);
|
||||
#endif
|
||||
lcd.print(value);
|
||||
lcd_print(value);
|
||||
}
|
||||
|
||||
void lcd_drawedit_2(const char* pstr, char* value)
|
||||
{
|
||||
lcd.setCursor(0, 1);
|
||||
lcd_set_cursor(0, 1);
|
||||
lcd_puts_P(pstr);
|
||||
lcd.print(':');
|
||||
lcd_print(':');
|
||||
|
||||
lcd.setCursor((LCD_WIDTH - strlen(value))/2, 3);
|
||||
lcd_set_cursor((LCD_WIDTH - strlen(value))/2, 3);
|
||||
|
||||
lcd.print(value);
|
||||
lcd.print(" mm");
|
||||
lcd_print(value);
|
||||
lcd_print(" mm");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,28 @@
|
|||
#define _LCD_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
////////////////////////////////////
|
||||
// Create LCD class instance and chipset-specific information
|
||||
#include "LiquidCrystal_Prusa.h"
|
||||
extern LiquidCrystal_Prusa lcd;
|
||||
|
||||
|
||||
extern FILE _lcdout;
|
||||
|
||||
#define lcdout (&_lcdout)
|
||||
|
||||
|
||||
extern int lcd_putchar(char c, FILE *stream);
|
||||
|
||||
extern void lcd_command(uint8_t value);
|
||||
|
||||
extern uint8_t lcd_write(uint8_t value);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define LCD_UPDATE_INTERVAL 100
|
||||
|
|
@ -56,6 +78,17 @@ extern int lcd_puts_P(const char* str);
|
|||
extern int lcd_puts_at_P(uint8_t c, uint8_t r, const char* str);
|
||||
extern int lcd_printf_P(const char* format, ...);
|
||||
|
||||
extern void lcd_printNumber(unsigned long n, uint8_t base);
|
||||
extern void lcd_printFloat(double number, uint8_t digits);
|
||||
|
||||
extern void lcd_print(const char*);
|
||||
extern void lcd_print(char, int = 0);
|
||||
extern void lcd_print(unsigned char, int = 0);
|
||||
extern void lcd_print(int, int = 10);
|
||||
extern void lcd_print(unsigned int, int = 10);
|
||||
extern void lcd_print(long, int = 10);
|
||||
extern void lcd_print(unsigned long, int = 10);
|
||||
extern void lcd_print(double, int = 2);
|
||||
|
||||
|
||||
|
||||
|
|
@ -145,11 +178,6 @@ extern void lcd_buttons_update(void);
|
|||
#define encrot3 1
|
||||
|
||||
|
||||
////////////////////////////////////
|
||||
// Create LCD class instance and chipset-specific information
|
||||
#include "LiquidCrystal_Prusa.h"
|
||||
#define LCD_CLASS LiquidCrystal_Prusa
|
||||
extern LCD_CLASS lcd;
|
||||
|
||||
|
||||
//Custom characters defined in the first 8 characters of the LCD
|
||||
|
|
@ -174,14 +202,6 @@ extern void lcd_set_custom_characters_degree(void);
|
|||
extern void lcd_implementation_init(void);
|
||||
extern void lcd_implementation_init_noclear(void);
|
||||
|
||||
extern void lcd_print(int8_t i);
|
||||
extern void lcd_print_at(uint8_t x, uint8_t y, int8_t i);
|
||||
extern void lcd_print(int i);
|
||||
extern void lcd_print_at(uint8_t x, uint8_t y, int i);
|
||||
extern void lcd_print(float f);
|
||||
extern void lcd_print(const char *str);
|
||||
extern void lcd_print_at(uint8_t x, uint8_t y, const char *str);
|
||||
|
||||
extern void lcd_drawedit(const char* pstr, char* value);
|
||||
extern void lcd_drawedit_2(const char* pstr, char* value);
|
||||
|
||||
|
|
|
|||
|
|
@ -117,13 +117,13 @@ int menu_item_printf_P(char type_char, const char* format, ...)
|
|||
int ret = 0;
|
||||
lcd_set_cursor(0, menu_row);
|
||||
if (lcd_encoder == menu_item)
|
||||
lcd.print('>');
|
||||
lcd_print('>');
|
||||
else
|
||||
lcd.print(' ');
|
||||
lcd_print(' ');
|
||||
int cnt = vfprintf_P(lcdout, format, args);
|
||||
for (int i = cnt; i < 18; i++)
|
||||
lcd.print(' ');
|
||||
lcd.print(type_char);
|
||||
lcd_print(' ');
|
||||
lcd_print(type_char);
|
||||
va_end(args);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2204,7 +2204,8 @@ BedSkewOffsetDetectionResultType find_bed_offset_and_skew(int8_t verbosity_level
|
|||
// Don't let the manage_inactivity() function remove power from the motors.
|
||||
refresh_cmd_timeout();
|
||||
#ifdef MESH_BED_CALIBRATION_SHOW_LCD
|
||||
lcd_print_at(0, next_line, k + 1);
|
||||
lcd_set_cursor(0, next_line);
|
||||
lcd_print(k + 1);
|
||||
lcd_puts_P(_T(MSG_FIND_BED_OFFSET_AND_SKEW_LINE2));
|
||||
|
||||
if (iteration > 0) {
|
||||
|
|
@ -2782,7 +2783,8 @@ bool sample_mesh_and_store_reference()
|
|||
if (next_line > 3)
|
||||
next_line = 3;
|
||||
// display "point xx of yy"
|
||||
lcd_print_at(0, next_line, 1);
|
||||
lcd_set_cursor(0, next_line);
|
||||
lcd_print(1);
|
||||
lcd_puts_P(_T(MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE2));
|
||||
#endif /* MESH_BED_CALIBRATION_SHOW_LCD */
|
||||
|
||||
|
|
@ -2828,7 +2830,8 @@ bool sample_mesh_and_store_reference()
|
|||
go_to_current(homing_feedrate[X_AXIS]/60);
|
||||
#ifdef MESH_BED_CALIBRATION_SHOW_LCD
|
||||
// display "point xx of yy"
|
||||
lcd_print_at(0, next_line, mesh_point+1);
|
||||
lcd_set_cursor(0, next_line);
|
||||
lcd_print(mesh_point+1);
|
||||
lcd_puts_P(_T(MSG_MEASURE_BED_REFERENCE_HEIGHT_LINE2));
|
||||
#endif /* MESH_BED_CALIBRATION_SHOW_LCD */
|
||||
if (!find_bed_induction_sensor_point_z()) //Z crash or deviation > 50um
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
|
||||
#include "Marlin.h"
|
||||
#include "lcd.h"
|
||||
#include "ultralcd.h"
|
||||
#include "temperature.h"
|
||||
#include "cardreader.h"
|
||||
|
|
|
|||
|
|
@ -414,9 +414,9 @@ void tmc2130_check_overtemp()
|
|||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
tmc2130_sg_change = false;
|
||||
lcd.setCursor(0 + i*4, 3);
|
||||
lcd.print(itostr3(tmc2130_sg_cnt[i]));
|
||||
lcd.print(' ');
|
||||
lcd_set_cursor(0 + i*4, 3);
|
||||
lcd_print(itostr3(tmc2130_sg_cnt[i]));
|
||||
lcd_print(' ');
|
||||
}
|
||||
}
|
||||
#endif //DEBUG_CRASHDET_COUNTERS
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -2,7 +2,7 @@
|
|||
#define ULTRALCD_H
|
||||
|
||||
#include "Marlin.h"
|
||||
//#include "mesh_bed_calibration.h"
|
||||
#include "lcd.h"
|
||||
#include "conv2str.h"
|
||||
|
||||
extern int lcd_puts_P(const char* str);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#include "Configuration.h"
|
||||
|
||||
#include "lcd.h"
|
||||
#include "ultralcd.h"
|
||||
#include "language.h"
|
||||
#include "util.h"
|
||||
|
|
|
|||
Loading…
Reference in New Issue