LULZBOT_TOUCH_UI: Localization, runtime language selection (#15249)

This commit is contained in:
Marcio Teixeira 2019-09-14 05:51:49 -06:00 committed by Scott Lahteine
parent 15bea5043c
commit 18821f29d5
163 changed files with 2034 additions and 538 deletions

View File

@ -691,9 +691,9 @@ LIBWARN = -w -Wno-packed-bitfield-compat
CSTANDARD = -std=gnu99
CXXSTANDARD = -std=gnu++11
CDEBUG = -g$(DEBUG)
CWARN = -Wall -Wstrict-prototypes -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
CXXWARN = -Wall -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
CTUNING = -fsigned-char -funsigned-bitfields -fpack-struct -fno-exceptions \
CWARN = -Wall -Wstrict-prototypes -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter -Wno-format
CXXWARN = -Wall -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter -Wno-format
CTUNING = -fsigned-char -funsigned-bitfields -fno-exceptions \
-fshort-enums -ffunction-sections -fdata-sections
ifneq ($(HARDWARE_MOTHERBOARD),)
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}

View File

@ -82,6 +82,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
//#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Parental lock".
// This is a recommended for smaller displays.
//#define TOUCH_UI_PASSCODE

View File

@ -66,7 +66,7 @@ uint16_t CLCD::FontMetrics::get_text_width(const char *str, size_t n) const {
return width;
}
uint16_t CLCD::FontMetrics::get_text_width_P(const char *str, size_t n) const {
uint16_t CLCD::FontMetrics::get_text_width(progmem_str str, size_t n) const {
uint16_t width = 0;
const uint8_t *p = (const uint8_t *) str;
for(;;) {

View File

@ -166,7 +166,7 @@ class CLCD::FontMetrics {
// Returns width of string, up to a maximum of n characters.
uint16_t get_text_width(const char *str, size_t n = SIZE_MAX) const;
uint16_t get_text_width_P(const char *str, size_t n = SIZE_MAX) const;
uint16_t get_text_width(progmem_str str, size_t n = SIZE_MAX) const;
};
/******************* FT800/810 Graphic Commands *********************************/

View File

@ -220,6 +220,14 @@ class CommandProcessor : public CLCD::CommandFifo {
return *this;
}
CommandProcessor& toggle2(int16_t x, int16_t y, int16_t w, int16_t h, progmem_str no, progmem_str yes, bool state, uint16_t options = FTDI::OPT_3D) {
char text[strlen_P((const char *)no) + strlen_P((const char *)yes) + 2];
strcpy_P(text, (const char *)no);
strcat(text, "\xFF");
strcat_P(text, (const char *)yes);
return toggle(x, y, w, h, text, state, options);
}
// Contrained drawing routines. These constrain the widget inside a box for easier layout.
// The FORCEDINLINE ensures that the code is inlined so that all the math is done at compile time.
@ -292,6 +300,26 @@ class CommandProcessor : public CLCD::CommandFifo {
y += ((options & OPT_CENTERY) ? h/2 : h);
}
// Reduce font size until text fits the enclosing box.
template<typename T>
int8_t apply_fit_text(int16_t w, int16_t h, T text) {
using namespace FTDI;
int8_t font = _font;
for (;;) {
#ifdef TOUCH_UI_USE_UTF8
const int16_t width = get_utf8_text_width(text, font_size_t::from_romfont(font));
const int16_t height = font_size_t::from_romfont(font).get_height();
#else
CLCD::FontMetrics fm(font);
const int16_t width = fm.get_text_width(text);
const int16_t height = fm.height;
#endif
if ((width < w && height < h) || font == 26) break;
font--;
}
return font;
}
CommandProcessor& number(int16_t x, int16_t y, int16_t w, int16_t h, int32_t n, uint16_t options = FTDI::OPT_CENTER) {
using namespace FTDI;
apply_text_alignment(x, y, w, h, options);
@ -299,14 +327,19 @@ class CommandProcessor : public CLCD::CommandFifo {
return *this;
}
template<typename T> FORCEDINLINE
template<typename T>
CommandProcessor& text(int16_t x, int16_t y, int16_t w, int16_t h, T text, uint16_t options = FTDI::OPT_CENTER) {
using namespace FTDI;
apply_text_alignment(x, y, w, h, options);
#ifdef TOUCH_UI_USE_UTF8
draw_utf8_text(*this, x, y, text, font_size_t::from_romfont(_font), options);
#ifdef TOUCH_UI_FIT_TEXT
const int8_t font = apply_fit_text(w, h, text);
#else
CLCD::CommandFifo::text(x, y, _font, options);
const int8_t font = _font;
#endif
#ifdef TOUCH_UI_USE_UTF8
draw_utf8_text(*this, x, y, text, font_size_t::from_romfont(font), options);
#else
CLCD::CommandFifo::text(x, y, font, options);
CLCD::CommandFifo::str(text);
#endif
return *this;
@ -333,11 +366,16 @@ class CommandProcessor : public CLCD::CommandFifo {
using namespace FTDI;
bool styleModified = false;
if (_btn_style_callback) styleModified = _btn_style_callback(*this, _tag, _style, options, false);
CLCD::CommandFifo::button(x, y, w, h, _font, options);
#ifdef TOUCH_UI_FIT_TEXT
const int8_t font = apply_fit_text(w, h, text);
#else
const int8_t font = _font;
#endif
CLCD::CommandFifo::button(x, y, w, h, font, options);
#ifdef TOUCH_UI_USE_UTF8
apply_text_alignment(x, y, w, h, OPT_CENTER);
CLCD::CommandFifo::str(F(""));
draw_utf8_text(*this, x, y, text, font_size_t::from_romfont(_font), OPT_CENTER);
draw_utf8_text(*this, x, y, text, font_size_t::from_romfont(font), OPT_CENTER);
#else
CLCD::CommandFifo::str(text);
#endif

View File

@ -0,0 +1,55 @@
/*****************
* language.cpp *
*****************/
/****************************************************************************
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* To view a copy of the GNU General Public License, go to the following *
* location: <http://www.gnu.org/licenses/>. *
****************************************************************************/
#include "../compat.h"
#if ENABLED(LULZBOT_TOUCH_UI) && defined(TOUCH_UI_LANGUAGE_MENU)
#include "language_de.h"
#include "language_en.h"
#include "language_fr.h"
PROGMEM Language_List languages = {
&Language_de::strings,
&Language_en::strings,
&Language_fr::strings
};
uint8_t get_language_count() {
return sizeof(languages)/sizeof(languages[0]);
}
static uint8_t lang = 0;
void set_language(uint8_t l) {
lang = l;
};
const char *get_text(uint8_t lang, String_Indices index) {
const Language_Strings* strings = (const Language_Strings*) pgm_read_ptr(&languages[lang]);
return (const char *)pgm_read_ptr(&(*strings)[int(index)]);
};
const char *get_text(String_Indices index) {
return get_text(lang, index);
};
#endif

View File

@ -0,0 +1,46 @@
/**************
* language.h *
**************/
/****************************************************************************
* Written By Marcio Teixeira 2019 - Aleph Objects, Inc. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* To view a copy of the GNU General Public License, go to the following *
* location: <http://www.gnu.org/licenses/>. *
****************************************************************************/
#pragma once
enum class String_Indices { LANGUAGE_STRINGS, COUNT };
typedef const char Language_Str[];
typedef const char* const Language_Strings[int(String_Indices::COUNT)];
typedef const Language_Strings* const Language_List[];
#ifndef TOUCH_UI_LANGUAGE_MENU
// Default mode, support only one language.
#define __GET_TEXTF(MSG,LANG) Language_##LANG::MSG
#define _GET_TEXTF(MSG,LANG) __GET_TEXTF(MSG,LANG)
#define GET_TEXTF(MSG) reinterpret_cast<const __FlashStringHelper *>(_GET_TEXTF(MSG,LCD_LANGUAGE))
#define GET_TEXT(MSG) _GET_TEXTF(MSG,LCD_LANGUAGE)
#define MAKE_LANGUAGE_STRINGS()
#else
// Support multiple languages at run-time.
uint8_t get_language_count();
void set_language(uint8_t index);
const char *get_text(String_Indices index);
const char *get_text(uint8_t lang, String_Indices index);
#define GET_TEXT(MSG) get_text(String_Indices::MSG)
#define GET_TEXTF(MSG) reinterpret_cast<const __FlashStringHelper *>(get_text(String_Indices::MSG))
#define MAKE_LANGUAGE_STRINGS() PROGMEM Language_Strings strings = { LANGUAGE_STRINGS }
#endif

View File

@ -0,0 +1,84 @@
/*****************
* language_de.h *
*****************/
/****************************************************************************
* Written By Marcio Teixeira 2019 - Aleph Objects, Inc. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* To view a copy of the GNU General Public License, go to the following *
* location: <http://www.gnu.org/licenses/>. *
****************************************************************************/
#pragma once
#include "language_en.h"
namespace Language_de {
using namespace Language_en;
PROGMEM Language_Str LANGUAGE = u8"Deutsche";
PROGMEM Language_Str YES = u8"JA";
PROGMEM Language_Str NO = u8"NEIN";
PROGMEM Language_Str BACK = u8"Zurück";
PROGMEM Language_Str MOVE_AXIS = u8"Achsen bewegen";
PROGMEM Language_Str MOTORS_OFF = u8"Motoren deaktivieren";
PROGMEM Language_Str TEMPERATURE = u8"Temperatur";
PROGMEM Language_Str CHANGE_FILAMENT = u8"Filament wechseln";
PROGMEM Language_Str ADVANCED_SETTINGS = u8"Erw. Einstellungen";
PROGMEM Language_Str ABOUT_PRINTER = u8"Über den Drucker";
PROGMEM Language_Str PRINTER_STATISTICS = u8"Drucker-Statistik";
PROGMEM Language_Str ZPROBE_ZOFFSET = u8"Sondenversatz Z";
PROGMEM Language_Str TOOL_OFFSETS = u8"Werkzeugversätze";
PROGMEM Language_Str VELOCITY = u8"Geschwindigkeit";
PROGMEM Language_Str ACCELERATION = u8"Beschleunigung";
PROGMEM Language_Str ACCEL_PRINTING = u8"Beschleunigung";
PROGMEM Language_Str ACCEL_TRAVEL = u8"A Einzug";
PROGMEM Language_Str ACCEL_RETRACT = u8"A Leerfahrt";
PROGMEM Language_Str BACKLASH = u8"Spiel";
PROGMEM Language_Str SMOOTHING = u8"Glätten";
PROGMEM Language_Str CORRECTION = u8"Korrektur";
PROGMEM Language_Str ENDSTOPS = u8"Endstopp";
PROGMEM Language_Str SOFT_ENDSTOPS = u8"Software-Endstopp";
PROGMEM Language_Str RESTORE_DEFAULTS = u8"Standardwerte laden";
PROGMEM Language_Str HOTEND = u8"Düse";
PROGMEM Language_Str HOTEND1 = u8"Düse 1";
PROGMEM Language_Str HOTEND2 = u8"Düse 2";
PROGMEM Language_Str HOTEND3 = u8"Düse 3";
PROGMEM Language_Str HOTEND4 = u8"Düse 4";
PROGMEM Language_Str BED = u8"Bett";
PROGMEM Language_Str AXIS_ALL = u8"Alle";
PROGMEM Language_Str FAN_SPEED = u8"Lüfter";
PROGMEM Language_Str PRINT_FILE = u8"Drucken";
PROGMEM Language_Str RESUME_PRINT = u8"SD-Druck fortsetzen";
PROGMEM Language_Str PAUSE_PRINT = u8"SD-Druck pausieren";
PROGMEM Language_Str STOP_PRINT = u8"SD-Druck abbrechen";
PROGMEM Language_Str INFO_PRINT_COUNT = u8"Gesamte Drucke";
PROGMEM Language_Str INFO_COMPLETED_PRINTS = u8"Komplette Drucke";
PROGMEM Language_Str INFO_PRINT_TIME = u8"Gesamte Druckzeit";
PROGMEM Language_Str INFO_PRINT_LONGEST = u8"Längste Druckzeit";
PROGMEM Language_Str INFO_PRINT_FILAMENT = u8"Gesamt Extrudiert";
PROGMEM Language_Str PRINTER_HALTED = u8"DRUCKER GESTOPPT";
PROGMEM Language_Str PLEASE_RESET = u8"Bitte neustarten";
MAKE_LANGUAGE_STRINGS();
}; // namespace Language_de

View File

@ -0,0 +1,410 @@
/*****************
* language_en.h *
*****************/
/****************************************************************************
* Written By Marcio Teixeira 2019 - Aleph Objects, Inc. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* To view a copy of the GNU General Public License, go to the following *
* location: <http://www.gnu.org/licenses/>. *
****************************************************************************/
#pragma once
// The list LANGUAGE_STRINGS should define all the strings used in the default
// language (Language_en). Translations do *not* need to re-define this.
#define LANGUAGE_STRINGS \
LANGUAGE, \
YES, \
NO, \
BACK, \
COLOR_TOUCH_PANEL, \
ABOUT_ALEPH_OBJECTS, OKAY, \
FIRMWARE_FOR_TOOLHEAD, \
AUTO_HOME, \
CLEAN_NOZZLE, \
CHANGE_FILAMENT, \
ADVANCED_SETTINGS, \
PRINTER_STATISTICS, \
ABOUT_PRINTER, \
MOTORS_OFF, \
ZPROBE_ZOFFSET, \
STEPS_PER_MM, \
HOME_SENSE, \
TOOL_OFFSETS, \
MOTOR_CURRENT, \
FILAMENT, \
ENDSTOPS, \
X_MAX, \
X_MIN, \
Y_MAX, \
Y_MIN, \
Z_MAX, \
Z_MIN, \
Z_PROBE, \
RUNOUT_1, \
RUNOUT_2, \
SOFT_ENDSTOPS, \
DISPLAY_MENU, \
INTERFACE_SETTINGS, \
RESTORE_DEFAULTS, \
VELOCITY, \
VMAX_X, \
VMAX_Y, \
VMAX_Z, \
VMAX_E1, \
VMAX_E2, \
VMAX_E3, \
VMAX_E4, \
ACCELERATION, \
ACCEL_PRINTING, \
ACCEL_TRAVEL, \
ACCEL_RETRACT, \
AMAX_X, \
AMAX_Y, \
AMAX_Z, \
AMAX_E1, \
AMAX_E2, \
AMAX_E3, \
AMAX_E4, \
JERK, \
JUNCTION_DEVIATION, \
BACKLASH, \
MEASURE_AUTOMATICALLY, \
H_OFFSET, \
V_OFFSET, \
TOUCH_SCREEN, \
CALIBRATE, \
HOME, \
UNITS_MILLIAMP, \
UNITS_MM, \
UNITS_MM_S, \
UNITS_MM_S2, \
UNITS_STEP_MM, \
UNITS_PERCENT, \
UNITS_C, \
TEMP_IDLE, \
MATERIAL_PLA, \
MATERIAL_ABS, \
MATERIAL_HIGH_TEMP, \
AXIS_X, \
AXIS_Y, \
AXIS_Z, \
AXIS_E, \
AXIS_E1, \
AXIS_E2, \
AXIS_E3, \
AXIS_E4, \
AXIS_ALL, \
HOTEND, \
HOTEND1, \
HOTEND2, \
HOTEND3, \
HOTEND4, \
BED, \
SMOOTHING, \
CORRECTION, \
PRINTING, \
SET_MAXIMUM, \
RUNOUT_SENSOR, \
DETECTION_THRESHOLD, \
DISTANCE, \
TEMPERATURE, \
COOLDOWN, \
FAN_SPEED, \
PRINT_SPEED, \
SPEED, \
MOVE_AXIS, \
LINEAR_ADVANCE, \
LINEAR_ADVANCE_K, \
LINEAR_ADVANCE_K1, \
LINEAR_ADVANCE_K2, \
LINEAR_ADVANCE_K3, \
LINEAR_ADVANCE_K4, \
NUDGE_NOZZLE, \
ADJUST_BOTH_NOZZLES, \
SHOW_OFFSETS, \
INCREMENT, \
ERASE_FLASH_WARNING, \
ERASING, \
ERASED, \
CALIBRATION_WARNING, \
ABORT_WARNING, \
EXTRUDER_SELECTION, \
CURRENT_TEMPERATURE, \
REMOVAL_TEMPERATURE, \
HEATING, \
CAUTION, \
HOT, \
UNLOAD_FILAMENT, \
LOAD_FILAMENT, \
MOMENTARY, \
CONTINUOUS, \
PLEASE_WAIT, \
PRINT_MENU, \
FINE_MOTION, \
MEDIA, \
ENABLE_MEDIA, \
INSERT_MEDIA, \
MENU, \
LCD_BRIGHTNESS, \
SOUND_VOLUME, \
SCREEN_LOCK, \
BOOT_SCREEN, \
INTERFACE_SOUNDS, \
EEPROM_RESTORED, \
EEPROM_RESET, \
EEPROM_SAVED, \
EEPROM_SAVE_PROMPT, \
EEPROM_RESET_WARNING, \
OPEN_DIR, \
PRINT_FILE, \
PRINT_STARTING, \
PRINT_FINISHED, \
PRINT_ERROR, \
PASSCODE_REJECTED, \
PASSCODE_ACCEPTED, \
PASSCODE_SELECT, \
PASSCODE_REQUEST, \
PRINTER_HALTED, \
PLEASE_RESET, \
CLICK_SOUNDS, \
INFO_PRINT_COUNT, \
INFO_COMPLETED_PRINTS, \
INFO_PRINT_TIME, \
INFO_PRINT_LONGEST, \
INFO_PRINT_FILAMENT, \
RESUME_PRINT, \
PAUSE_PRINT, \
STOP_PRINT, \
TOUCH_CALIBRATION_START, \
TOUCH_CALIBRATION_PROMPT \
LULZBOT_BIOPRINTER_STRINGS
#ifndef LULZBOT_USE_BIOPRINTER_UI
#define LULZBOT_BIOPRINTER_STRINGS
#else
#define LULZBOT_BIOPRINTER_STRINGS ,\
MAIN_MENU, \
UNLOCK_XY_AXIS, \
LOAD_SYRINGE, \
BED_TEMPERATURE, \
LOADING_WARNING, \
HOMING_WARNING
#endif
#include "language.h" // This must be included after LANGUAGE_STRINGS
// The string table for this language.
namespace Language_en {
PROGMEM Language_Str LANGUAGE = u8"English";
PROGMEM Language_Str YES = u8"Yes";
PROGMEM Language_Str NO = u8"No";
PROGMEM Language_Str BACK = u8"Back";
PROGMEM Language_Str OKAY = u8"Okay";
PROGMEM Language_Str MENU = u8"Menu";
PROGMEM Language_Str MEDIA = u8"Media";
PROGMEM Language_Str AUTO_HOME = u8"Auto Home";
PROGMEM Language_Str CLEAN_NOZZLE = u8"Clean Nozzle";
PROGMEM Language_Str MOVE_AXIS = u8"Move Axis";
PROGMEM Language_Str MOTORS_OFF = u8"Motors Off";
PROGMEM Language_Str TEMPERATURE = u8"Temperature";
PROGMEM Language_Str CHANGE_FILAMENT = u8"Change Filament";
PROGMEM Language_Str ADVANCED_SETTINGS = u8"Advanced Settings";
PROGMEM Language_Str ABOUT_PRINTER = u8"About Printer";
PROGMEM Language_Str PRINTER_STATISTICS = u8"Printer Statistics";
PROGMEM Language_Str ZPROBE_ZOFFSET = u8"Z Offset";
PROGMEM Language_Str STEPS_PER_MM = u8"Steps/mm";
PROGMEM Language_Str TOOL_OFFSETS = u8"Tool Offsets";
PROGMEM Language_Str VELOCITY = u8"Velocity";
PROGMEM Language_Str VMAX_X = u8"Vmax X";
PROGMEM Language_Str VMAX_Y = u8"Vmax Y";
PROGMEM Language_Str VMAX_Z = u8"Vmax Z";
PROGMEM Language_Str VMAX_E1 = u8"Vmax E1";
PROGMEM Language_Str VMAX_E2 = u8"Vmax E2";
PROGMEM Language_Str VMAX_E3 = u8"Vmax E3";
PROGMEM Language_Str VMAX_E4 = u8"Vmax E4";
PROGMEM Language_Str ACCELERATION = u8"Acceleration";
PROGMEM Language_Str ACCEL_PRINTING = u8"Printing";
PROGMEM Language_Str ACCEL_TRAVEL = u8"Travel";
PROGMEM Language_Str ACCEL_RETRACT = u8"Retraction";
PROGMEM Language_Str AMAX_X = u8"Amax X";
PROGMEM Language_Str AMAX_Y = u8"Amax Y";
PROGMEM Language_Str AMAX_Z = u8"Amax Z";
PROGMEM Language_Str AMAX_E1 = u8"Amax E1";
PROGMEM Language_Str AMAX_E2 = u8"Amax E2";
PROGMEM Language_Str AMAX_E3 = u8"Amax E3";
PROGMEM Language_Str AMAX_E4 = u8"Amax E4";
PROGMEM Language_Str JERK = u8"Jerk";
PROGMEM Language_Str JUNCTION_DEVIATION = u8"Junc Dev";
PROGMEM Language_Str BACKLASH = u8"Backlash";
PROGMEM Language_Str SMOOTHING = u8"Smoothing";
PROGMEM Language_Str CORRECTION = u8"Correction";
PROGMEM Language_Str MOTOR_CURRENT = u8"Currents";
PROGMEM Language_Str FILAMENT = u8"Filament";
PROGMEM Language_Str ENDSTOPS = u8"Endstops";
PROGMEM Language_Str SOFT_ENDSTOPS = u8"Soft Endstops";
PROGMEM Language_Str RESTORE_DEFAULTS = u8"Restore Defaults";
PROGMEM Language_Str HOTEND = u8"Hot End";
PROGMEM Language_Str HOTEND1 = u8"Hot End 1";
PROGMEM Language_Str HOTEND2 = u8"Hot End 2";
PROGMEM Language_Str HOTEND3 = u8"Hot End 3";
PROGMEM Language_Str HOTEND4 = u8"Hot End 4";
PROGMEM Language_Str BED = u8"Bed";
PROGMEM Language_Str AXIS_X = u8"X";
PROGMEM Language_Str AXIS_Y = u8"Y";
PROGMEM Language_Str AXIS_Z = u8"Z";
PROGMEM Language_Str AXIS_E = u8"E";
PROGMEM Language_Str AXIS_E1 = u8"E1";
PROGMEM Language_Str AXIS_E2 = u8"E2";
PROGMEM Language_Str AXIS_E3 = u8"E3";
PROGMEM Language_Str AXIS_E4 = u8"E4";
PROGMEM Language_Str AXIS_ALL = u8"All";
PROGMEM Language_Str HOME = u8"Home";
PROGMEM Language_Str FAN_SPEED = u8"Fan Speed";
PROGMEM Language_Str RUNOUT_SENSOR = u8"Runout Sensor";
PROGMEM Language_Str OPEN_DIR = u8"Open";
PROGMEM Language_Str PRINT_FILE = u8"Print";
PROGMEM Language_Str RESUME_PRINT = u8"Resume Print";
PROGMEM Language_Str PAUSE_PRINT = u8"Pause Print";
PROGMEM Language_Str STOP_PRINT = u8"Stop Print";
PROGMEM Language_Str PRINT_STARTING = u8"Print starting";
PROGMEM Language_Str PRINT_FINISHED = u8"Print finished";
PROGMEM Language_Str PRINT_ERROR = u8"Print error";
PROGMEM Language_Str INFO_PRINT_COUNT = u8"Print Count";
PROGMEM Language_Str INFO_COMPLETED_PRINTS = u8"Total Prints";
PROGMEM Language_Str INFO_PRINT_TIME = u8"Total Print Time";
PROGMEM Language_Str INFO_PRINT_LONGEST = u8"Longest Print";
PROGMEM Language_Str INFO_PRINT_FILAMENT = u8"Filament Used";
PROGMEM Language_Str PRINTER_HALTED = u8"PRINTER HALTED";
PROGMEM Language_Str PLEASE_RESET = u8"Please reset";
PROGMEM Language_Str COLOR_TOUCH_PANEL = u8"Color Touch Panel";
PROGMEM Language_Str ABOUT_ALEPH_OBJECTS = u8"(C) 2019 Aleph Objects, Inc.\n\nwww.lulzbot.com";
PROGMEM Language_Str FIRMWARE_FOR_TOOLHEAD = u8"Firmware for toolhead:\n%s\n\n";
PROGMEM Language_Str HOME_SENSE = u8"Home Sense";
PROGMEM Language_Str X_MAX = u8"X Max";
PROGMEM Language_Str X_MIN = u8"X Min";
PROGMEM Language_Str Y_MAX = u8"Y Max";
PROGMEM Language_Str Y_MIN = u8"Y Min";
PROGMEM Language_Str Z_MAX = u8"Z Max";
PROGMEM Language_Str Z_MIN = u8"Z Min";
PROGMEM Language_Str Z_PROBE = u8"Z Probe";
PROGMEM Language_Str RUNOUT_1 = u8"Runout 1";
PROGMEM Language_Str RUNOUT_2 = u8"Runout 2";
PROGMEM Language_Str DISPLAY_MENU = u8"Display";
PROGMEM Language_Str INTERFACE_SETTINGS = u8"Interface Settings";
PROGMEM Language_Str MEASURE_AUTOMATICALLY = u8"Measure automatically";
PROGMEM Language_Str H_OFFSET = u8"H Offset";
PROGMEM Language_Str V_OFFSET = u8"V Offset";
PROGMEM Language_Str TOUCH_SCREEN = u8"Touch Screen";
PROGMEM Language_Str CALIBRATE = u8"Calibrate";
PROGMEM Language_Str UNITS_MILLIAMP = u8"mA";
PROGMEM Language_Str UNITS_MM = u8"mm";
PROGMEM Language_Str UNITS_MM_S = u8"mm/s";
PROGMEM Language_Str UNITS_MM_S2 = u8"mm/s^2";
PROGMEM Language_Str UNITS_STEP_MM = u8"st/mm";
PROGMEM Language_Str UNITS_PERCENT = u8"%";
#if defined(TOUCH_UI_USE_UTF8) && defined(TOUCH_UI_UTF8_WESTERN_CHARSET)
PROGMEM Language_Str UNITS_C = u8"°C";
#else
PROGMEM Language_Str UNITS_C = u8" C";
#endif
PROGMEM Language_Str MATERIAL_PLA = u8"PLA";
PROGMEM Language_Str MATERIAL_ABS = u8"ABS";
PROGMEM Language_Str MATERIAL_HIGH_TEMP = u8"High";
PROGMEM Language_Str TEMP_IDLE = u8"idle";
PROGMEM Language_Str PRINTING = u8"Printing";
PROGMEM Language_Str SET_MAXIMUM = u8"Set Maximum";
PROGMEM Language_Str DETECTION_THRESHOLD = u8"Detection Threshold";
PROGMEM Language_Str DISTANCE = u8"Distance";
PROGMEM Language_Str COOLDOWN = u8"Cooldown (All Off)";
PROGMEM Language_Str PRINT_SPEED = u8"Print Speed";
PROGMEM Language_Str SPEED = u8"Speed";
PROGMEM Language_Str LINEAR_ADVANCE = u8"Linear Advance";
PROGMEM Language_Str LINEAR_ADVANCE_K = u8"K";
PROGMEM Language_Str LINEAR_ADVANCE_K1 = u8"K E1";
PROGMEM Language_Str LINEAR_ADVANCE_K2 = u8"K E2";
PROGMEM Language_Str LINEAR_ADVANCE_K3 = u8"K E3";
PROGMEM Language_Str LINEAR_ADVANCE_K4 = u8"K E4";
PROGMEM Language_Str NUDGE_NOZZLE = u8"Nudge Nozzle";
PROGMEM Language_Str ADJUST_BOTH_NOZZLES = u8"Adjust Both Nozzles";
PROGMEM Language_Str SHOW_OFFSETS = u8"Show Offsets";
PROGMEM Language_Str INCREMENT = u8"Increment";
PROGMEM Language_Str ERASE_FLASH_WARNING = u8"Are you sure? SPI flash will be erased.";
PROGMEM Language_Str ERASING = u8"Erasing...";
PROGMEM Language_Str ERASED = u8"SPI flash erased";
PROGMEM Language_Str CALIBRATION_WARNING = u8"For best results, unload the filament and clean the hotend prior to starting calibration. Continue?";
PROGMEM Language_Str ABORT_WARNING = u8"Are you sure you want to cancel the print?";
PROGMEM Language_Str EXTRUDER_SELECTION = u8"Extruder Selection";
PROGMEM Language_Str CURRENT_TEMPERATURE = u8"Current Temp";
PROGMEM Language_Str REMOVAL_TEMPERATURE = u8"Removal Temp";
PROGMEM Language_Str HEATING = u8"Heating";
PROGMEM Language_Str CAUTION = u8"Caution:";
PROGMEM Language_Str HOT = u8"Hot!";
PROGMEM Language_Str UNLOAD_FILAMENT = u8"Unload";
PROGMEM Language_Str LOAD_FILAMENT = u8"Load/Extruder";
PROGMEM Language_Str MOMENTARY = u8"Momentary";
PROGMEM Language_Str CONTINUOUS = u8"Continuous";
PROGMEM Language_Str PLEASE_WAIT = u8"Please wait...";
PROGMEM Language_Str PRINT_MENU = u8"Print Menu";
PROGMEM Language_Str FINE_MOTION = u8"Fine motion";
PROGMEM Language_Str ENABLE_MEDIA = u8"Enable Media";
PROGMEM Language_Str INSERT_MEDIA = u8"Insert Media...";
PROGMEM Language_Str LCD_BRIGHTNESS = u8"LCD brightness";
PROGMEM Language_Str SOUND_VOLUME = u8"Sound volume";
PROGMEM Language_Str SCREEN_LOCK = u8"Screen lock";
PROGMEM Language_Str BOOT_SCREEN = u8"Boot screen";
PROGMEM Language_Str INTERFACE_SOUNDS = u8"Interface Sounds";
PROGMEM Language_Str CLICK_SOUNDS = u8"Click sounds";
PROGMEM Language_Str EEPROM_RESTORED = u8"Settings restored from backup";
PROGMEM Language_Str EEPROM_RESET = u8"Settings restored to default";
PROGMEM Language_Str EEPROM_SAVED = u8"Settings saved!";
PROGMEM Language_Str EEPROM_SAVE_PROMPT = u8"Do you wish to save these settings as defaults?";
PROGMEM Language_Str EEPROM_RESET_WARNING = u8"Are you sure? Customizations will be lost.";
PROGMEM Language_Str PASSCODE_REJECTED = u8"Wrong passcode!";
PROGMEM Language_Str PASSCODE_ACCEPTED = u8"Passcode accepted!";
PROGMEM Language_Str PASSCODE_SELECT = u8"Select Passcode:";
PROGMEM Language_Str PASSCODE_REQUEST = u8"Enter Passcode:";
PROGMEM Language_Str TOUCH_CALIBRATION_START = u8"Release to begin screen calibration";
PROGMEM Language_Str TOUCH_CALIBRATION_PROMPT = u8"Touch the dots to calibrate";
#ifdef LULZBOT_USE_BIOPRINTER_UI
PROGMEM Language_Str MAIN_MENU = u8"Main Menu";
PROGMEM Language_Str UNLOCK_XY_AXIS = u8"Unlock XY Axis";
PROGMEM Language_Str LOAD_SYRINGE = u8"Load Syringe";
PROGMEM Language_Str BED_TEMPERATURE = u8"Bed Temperature";
PROGMEM Language_Str LOADING_WARNING = u8"About to home to loading position.\nEnsure the top and the bed of the printer are clear.\n\nContinue?";
PROGMEM Language_Str HOMING_WARNING = u8"About to re-home plunger and auto-level. Remove syringe prior to proceeding.\n\nContinue?";
#endif
MAKE_LANGUAGE_STRINGS();
}; // namespace Language_en

View File

@ -0,0 +1,90 @@
/*****************
* language_fr.h *
*****************/
/****************************************************************************
* Written By Marcio Teixeira 2019 - Aleph Objects, Inc. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* To view a copy of the GNU General Public License, go to the following *
* location: <http://www.gnu.org/licenses/>. *
****************************************************************************/
#pragma once
#include "language_en.h"
namespace Language_fr {
using namespace Language_en;
PROGMEM Language_Str LANGUAGE = u8"Français";
PROGMEM Language_Str YES = u8"oui";
PROGMEM Language_Str NO = u8"non";
PROGMEM Language_Str BACK = u8"Retour";
PROGMEM Language_Str AUTO_HOME = u8"Origine auto";
//PROGMEM Language_Str CLEAN_NOZZLE = u8"Clean Nozzle";
PROGMEM Language_Str MOVE_AXIS = u8"Déplacer un axe";
PROGMEM Language_Str MOTORS_OFF = u8"Arrêter moteurs";
PROGMEM Language_Str TEMPERATURE = u8"Température";
PROGMEM Language_Str CHANGE_FILAMENT = u8"Changer filament";
PROGMEM Language_Str ADVANCED_SETTINGS = u8"Config. avancée";
PROGMEM Language_Str ABOUT_PRINTER = u8"Infos imprimante";
PROGMEM Language_Str PRINTER_STATISTICS = u8"Stats. imprimante";
PROGMEM Language_Str ZPROBE_ZOFFSET = u8"Décalage Z";
PROGMEM Language_Str STEPS_PER_MM = u8"Pas/mm";
PROGMEM Language_Str TOOL_OFFSETS = u8"Offsets Outil";
PROGMEM Language_Str VELOCITY = u8"Vélocité";
PROGMEM Language_Str ACCELERATION = u8"Accélération";
PROGMEM Language_Str ACCEL_PRINTING = u8"A impr.";
PROGMEM Language_Str ACCEL_TRAVEL = u8"A dépl.";
PROGMEM Language_Str ACCEL_RETRACT = u8"A retrait";
PROGMEM Language_Str JUNCTION_DEVIATION = u8"Déviat. jonct.";
//PROGMEM Language_Str BACKLASH = u8"Backlash";
PROGMEM Language_Str SMOOTHING = u8"Lissage";
PROGMEM Language_Str MOTOR_CURRENT = u8"Courant";
PROGMEM Language_Str ENDSTOPS = u8"Butées";
PROGMEM Language_Str SOFT_ENDSTOPS = u8"Butées SW";
PROGMEM Language_Str RESTORE_DEFAULTS = u8"Restaurer défauts";
PROGMEM Language_Str HOTEND = u8"Buse";
PROGMEM Language_Str HOTEND1 = u8"Buse 1";
PROGMEM Language_Str HOTEND2 = u8"Buse 2";
PROGMEM Language_Str HOTEND3 = u8"Buse 3";
PROGMEM Language_Str HOTEND4 = u8"Buse 4";
PROGMEM Language_Str BED = u8"Lit";
PROGMEM Language_Str AXIS_ALL = u8"Tous";
PROGMEM Language_Str HOME = u8"Origine";
PROGMEM Language_Str FAN_SPEED = u8"Vitesse ventil.";
PROGMEM Language_Str RUNOUT_SENSOR = u8"Capteur fil.";
PROGMEM Language_Str PRINT_FILE = u8"Imprimer";
PROGMEM Language_Str RESUME_PRINT = u8"Reprendre impr.";
PROGMEM Language_Str PAUSE_PRINT = u8"Pause impression";
PROGMEM Language_Str STOP_PRINT = u8"Arrêter impr.";
PROGMEM Language_Str INFO_PRINT_COUNT = u8"Nbre impressions";
PROGMEM Language_Str INFO_COMPLETED_PRINTS = u8"Terminées";
PROGMEM Language_Str INFO_PRINT_TIME = u8"Tps impr. total";
PROGMEM Language_Str INFO_PRINT_LONGEST = u8"Impr. la + longue";
PROGMEM Language_Str INFO_PRINT_FILAMENT = u8"Total filament";
PROGMEM Language_Str PRINTER_HALTED = u8"IMPR. STOPPÉE";
PROGMEM Language_Str PLEASE_RESET = u8"Redémarrer SVP";
MAKE_LANGUAGE_STRINGS();
}; // namespace Language_fr

View File

@ -0,0 +1,26 @@
/***************
* languages.h *
***************/
/****************************************************************************
* Written By Marcio Teixeira 2019 - Aleph Objects, Inc. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* To view a copy of the GNU General Public License, go to the following *
* location: <http://www.gnu.org/licenses/>. *
****************************************************************************/
#pragma once
#include "language_en.h"
#include "language_de.h"
#include "language_fr.h"

View File

@ -49,22 +49,33 @@ void AboutScreen::onRedraw(draw_mode_t) {
#ifdef LULZBOT_LCD_MACHINE_NAME
LULZBOT_LCD_MACHINE_NAME
#else
"Color Touch Panel"
GET_TEXTF(COLOR_TOUCH_PANEL)
#endif
), OPT_CENTER, font_xlarge);
cmd.tag(2);
draw_text_box(cmd, BTN_POS(1,3), BTN_SIZE(4,3), F(
#ifdef LULZBOT_LCD_TOOLHEAD_NAME
"Firmware for toolhead:\n" LULZBOT_LCD_TOOLHEAD_NAME "\n\n"
char about_str[
strlen_P(GET_TEXT(FIRMWARE_FOR_TOOLHEAD)) +
strlen_P(LULZBOT_LCD_TOOLHEAD_NAME) +
strlen_P(GET_TEXT(ABOUT_ALEPH_OBJECTS)) + 1];
sprintf_P(about_str, GET_TEXT(FIRMWARE_FOR_TOOLHEAD), LULZBOT_LCD_TOOLHEAD_NAME);
strcat_P(about_str, GET_TEXT(ABOUT_ALEPH_OBJECTS));
#endif
"(C) 2019 Aleph Objects, Inc.\n\nwww.lulzbot.com"
), OPT_CENTER, font_medium);
cmd.tag(2);
draw_text_box(cmd, BTN_POS(1,3), BTN_SIZE(4,3),
#ifdef LULZBOT_LCD_TOOLHEAD_NAME
about_str
#else
GET_TEXTF(ABOUT_ALEPH_OBJECTS)
#endif
, OPT_CENTER, font_medium);
cmd.tag(0);
draw_text_box(cmd, BTN_POS(1,6), BTN_SIZE(4,2), progmem_str(getFirmwareName_str()), OPT_CENTER, font_medium);
cmd.font(font_medium).colors(action_btn).tag(1).button(BTN_POS(2,8), BTN_SIZE(2,1), F("Okay"));
cmd.font(font_medium).colors(action_btn).tag(1).button(BTN_POS(2,8), BTN_SIZE(2,1), GET_TEXTF(OKAY));
}
bool AboutScreen::onTouchEnd(uint8_t tag) {

View File

@ -49,52 +49,52 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
#else
.enabled(0)
#endif
.tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), F("Z Offset "))
.tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXTF(ZPROBE_ZOFFSET))
.enabled(1)
.tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), F("Steps/mm"))
.tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXTF(STEPS_PER_MM))
#if HAS_TRINAMIC
.enabled(1)
#else
.enabled(0)
#endif
.tag(13).button( BTN_POS(1,5), BTN_SIZE(1,1), F("Motor mA"))
.tag(13).button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXTF(MOTOR_CURRENT))
#if HAS_TRINAMIC
.enabled(1)
#else
.enabled(0)
#endif
.tag(14).button( BTN_POS(1,4), BTN_SIZE(1,1), F("Bump Sense"))
.tag(14).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXTF(HOME_SENSE))
#if HOTENDS > 1
.enabled(1)
#else
.enabled(0)
#endif
.tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), F("Nozzle Offset"))
.tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXTF(TOOL_OFFSETS))
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
.enabled(1)
#else
.enabled(0)
#endif
.tag(11).button( BTN_POS(1,3), BTN_SIZE(1,1), F("Filament"))
.tag(12).button( BTN_POS(1,6), BTN_SIZE(1,1), F("Endstops"))
.tag(15).button( BTN_POS(2,6), BTN_SIZE(1,1), F("Display"))
.tag(9) .button( BTN_POS(1,7), BTN_SIZE(2,1), F("Interface Settings"))
.tag(10).button( BTN_POS(1,8), BTN_SIZE(2,1), F("Restore Factory Defaults"))
.tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), F("Velocity "))
.tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), F("Acceleration"))
.tag(11).button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXTF(FILAMENT))
.tag(12).button( BTN_POS(1,6), BTN_SIZE(1,1), GET_TEXTF(ENDSTOPS))
.tag(15).button( BTN_POS(2,6), BTN_SIZE(1,1), GET_TEXTF(DISPLAY_MENU))
.tag(9) .button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXTF(INTERFACE_SETTINGS))
.tag(10).button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXTF(RESTORE_DEFAULTS))
.tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXTF(VELOCITY))
.tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXTF(ACCELERATION))
#if ENABLED(JUNCTION_DEVIATION)
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Junc Dev"))
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(JUNCTION_DEVIATION))
#else
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Jerk"))
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(JERK))
#endif
#if ENABLED(BACKLASH_GCODE)
.enabled(1)
#else
.enabled(0)
#endif
.tag(8).button( BTN_POS(2,5), BTN_SIZE(1,1), F("Backlash"))
.tag(8).button( BTN_POS(2,5), BTN_SIZE(1,1), GET_TEXTF(BACKLASH))
.colors(action_btn)
.tag(1) .button( BTN_POS(1,9), BTN_SIZE(2,1), F("Back"));
.tag(1) .button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXTF(BACK));
#undef GRID_COLS
#undef GRID_ROWS
#else
@ -105,47 +105,47 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
#else
.enabled(0)
#endif
.tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,2), F("Z Offset "))
.tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,2), GET_TEXTF(ZPROBE_ZOFFSET))
.enabled(1)
.tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), F("Steps/mm"))
.tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXTF(STEPS_PER_MM))
#if HAS_TRINAMIC
.enabled(1)
#else
.enabled(0)
#endif
.tag(13).button( BTN_POS(3,1), BTN_SIZE(1,1), F("Motor mA"))
.tag(13).button( BTN_POS(3,1), BTN_SIZE(1,1), GET_TEXTF(MOTOR_CURRENT))
#if HAS_TRINAMIC
.enabled(1)
#else
.enabled(0)
#endif
.tag(14).button( BTN_POS(3,2), BTN_SIZE(1,1), F("Bump Sense"))
.tag(14).button( BTN_POS(3,2), BTN_SIZE(1,1), GET_TEXTF(HOME_SENSE))
#if ENABLED(BACKLASH_GCODE)
.enabled(1)
#else
.enabled(0)
#endif
.tag(8).button( BTN_POS(3,3), BTN_SIZE(1,1), F("Backlash"))
.tag(8).button( BTN_POS(3,3), BTN_SIZE(1,1), GET_TEXTF(BACKLASH))
#if HOTENDS > 1
.enabled(1)
#else
.enabled(0)
#endif
.tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), F("Nozzle Offsets"))
.tag(12).button( BTN_POS(3,4), BTN_SIZE(1,1), F("Endstops"))
.tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), F("Velocity "))
.tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), F("Acceleration"))
.tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXTF(TOOL_OFFSETS))
.tag(12).button( BTN_POS(3,4), BTN_SIZE(1,1), GET_TEXTF(ENDSTOPS))
.tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXTF(VELOCITY))
.tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXTF(ACCELERATION))
#if ENABLED(JUNCTION_DEVIATION)
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Junc Dev"))
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(JUNCTION_DEVIATION))
#else
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Jerk"))
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(JERK))
#endif
.tag(11).button( BTN_POS(1,4), BTN_SIZE(1,1), F("Filament"))
.tag(15).button( BTN_POS(3,5), BTN_SIZE(1,1), F("Display"))
.tag(9) .button( BTN_POS(1,5), BTN_SIZE(2,1), F("Interface Settings"))
.tag(10).button( BTN_POS(1,6), BTN_SIZE(2,1), F("Restore Defaults"))
.tag(11).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXTF(FILAMENT))
.tag(15).button( BTN_POS(3,5), BTN_SIZE(1,1), GET_TEXTF(DISPLAY_MENU))
.tag(9) .button( BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXTF(INTERFACE_SETTINGS))
.tag(10).button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXTF(RESTORE_DEFAULTS))
.colors(action_btn)
.tag(1) .button( BTN_POS(3,6), BTN_SIZE(1,1), F("Back"));
.tag(1) .button( BTN_POS(3,6), BTN_SIZE(1,1), GET_TEXTF(BACK));
#endif
}
}

View File

@ -32,17 +32,17 @@ using namespace Theme;
void BacklashCompensationScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(2).units(PSTR("mm"));
w.heading( PSTR("Axis Backlash"));
w.color(x_axis).adjuster(2, PSTR("X:"), getAxisBacklash_mm(X));
w.color(y_axis).adjuster(4, PSTR("Y:"), getAxisBacklash_mm(Y));
w.color(z_axis).adjuster(6, PSTR("Z:"), getAxisBacklash_mm(Z));
w.precision(2).units( GET_TEXTF(UNITS_MM));
w.heading( GET_TEXTF(BACKLASH));
w.color(x_axis).adjuster(2, GET_TEXTF(AXIS_X), getAxisBacklash_mm(X));
w.color(y_axis).adjuster(4, GET_TEXTF(AXIS_Y), getAxisBacklash_mm(Y));
w.color(z_axis).adjuster(6, GET_TEXTF(AXIS_Z), getAxisBacklash_mm(Z));
#if ENABLED(CALIBRATION_GCODE)
w.button(12, PSTR("Measure automatically"));
w.button(12, GET_TEXTF(MEASURE_AUTOMATICALLY));
#endif
w.color(other).adjuster(8, PSTR("Smoothing:"), getBacklashSmoothing_mm());
w.precision(0).units(PSTR("%"))
.adjuster(10, PSTR("Correction:"), getBacklashCorrection_percent());
w.color(other).adjuster(8, GET_TEXTF(SMOOTHING), getBacklashSmoothing_mm());
w.precision(0).units(GET_TEXTF(UNITS_PERCENT))
.adjuster(10, GET_TEXTF(CORRECTION), getBacklashCorrection_percent());
w.precision(2).increments();
}

View File

@ -50,15 +50,15 @@ BaseNumericAdjustmentScreen::widgets_t::widgets_t(draw_mode_t what) : _what(what
cmd.font(font_medium)
.colors(action_btn)
#ifdef TOUCH_UI_PORTRAIT
.tag(1).button( BTN_POS(1,10), BTN_SIZE(13,1), F("Back"))
.tag(1).button( BTN_POS(1,10), BTN_SIZE(13,1), GET_TEXTF(BACK))
#else
.tag(1).button( BTN_POS(15,7), BTN_SIZE(4,1), F("Back"))
.tag(1).button( BTN_POS(15,7), BTN_SIZE(4,1), GET_TEXTF(BACK))
#endif
.colors(normal_btn);
}
_line = 1;
_units = PSTR("");
_units = F("");
}
BaseNumericAdjustmentScreen::widgets_t &BaseNumericAdjustmentScreen::widgets_t::precision(uint8_t decimals, precision_default_t initial) {
@ -69,14 +69,14 @@ BaseNumericAdjustmentScreen::widgets_t &BaseNumericAdjustmentScreen::widgets_t::
return *this;
}
void BaseNumericAdjustmentScreen::widgets_t::heading(const char *label) {
void BaseNumericAdjustmentScreen::widgets_t::heading(progmem_str label) {
CommandProcessor cmd;
cmd.font(font_medium).cmd(COLOR_RGB(bg_text_enabled));
if (_what & BACKGROUND) {
#ifdef TOUCH_UI_PORTRAIT
cmd.tag(0).fgcolor(bg_color).button( BTN_POS(1, _line), BTN_SIZE(12,1), progmem_str(label), OPT_FLAT);
cmd.tag(0).fgcolor(bg_color).button( BTN_POS(1, _line), BTN_SIZE(12,1), label, OPT_FLAT);
#else
cmd.tag(0).fgcolor(bg_color).button( BTN_POS(5, _line), BTN_SIZE(8,1), progmem_str(label), OPT_FLAT);
cmd.tag(0).fgcolor(bg_color).button( BTN_POS(5, _line), BTN_SIZE(8,1), label, OPT_FLAT);
#endif
}
@ -140,9 +140,9 @@ void BaseNumericAdjustmentScreen::widgets_t::increments() {
cmd.fgcolor(bg_color)
.tag(0)
#ifdef TOUCH_UI_PORTRAIT
.font(font_small).button( BTN_POS(1, _line), BTN_SIZE(4,1), F("Increment:"), OPT_FLAT);
.font(font_small).button( BTN_POS(1, _line), BTN_SIZE(4,1), GET_TEXTF(INCREMENT), OPT_FLAT);
#else
.font(font_medium).button( BTN_POS(15,1), BTN_SIZE(4,1), F("Increment:"), OPT_FLAT);
.font(font_medium).button( BTN_POS(15,1), BTN_SIZE(4,1), GET_TEXTF(INCREMENT), OPT_FLAT);
#endif
}
@ -157,7 +157,7 @@ void BaseNumericAdjustmentScreen::widgets_t::increments() {
#endif
}
void BaseNumericAdjustmentScreen::widgets_t::adjuster_sram_val(uint8_t tag, const char *label, const char *value, bool is_enabled) {
void BaseNumericAdjustmentScreen::widgets_t::adjuster_sram_val(uint8_t tag, progmem_str label, const char *value, bool is_enabled) {
CommandProcessor cmd;
if (_what & BACKGROUND) {
@ -179,7 +179,7 @@ void BaseNumericAdjustmentScreen::widgets_t::adjuster_sram_val(uint8_t tag, cons
_line++;
}
void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, const char *label, const char *value, bool is_enabled) {
void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, progmem_str label, const char *value, bool is_enabled) {
if (_what & BACKGROUND) {
adjuster_sram_val(tag, label, nullptr);
}
@ -191,7 +191,7 @@ void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, const char *l
}
}
void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, const char *label, float value, bool is_enabled) {
void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, progmem_str label, float value, bool is_enabled) {
if (_what & BACKGROUND) {
adjuster_sram_val(tag, label, nullptr);
}
@ -205,7 +205,7 @@ void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, const char *l
}
}
void BaseNumericAdjustmentScreen::widgets_t::button(uint8_t tag, const char *label, bool is_enabled) {
void BaseNumericAdjustmentScreen::widgets_t::button(uint8_t tag, progmem_str label, bool is_enabled) {
if (_what & FOREGROUND) {
CommandProcessor cmd;
cmd.colors(normal_btn)
@ -216,13 +216,13 @@ void BaseNumericAdjustmentScreen::widgets_t::button(uint8_t tag, const char *lab
#else
.font(font_medium)
#endif
.button(BTN_POS(5,_line), BTN_SIZE(9,1), progmem_str(label));
.button(BTN_POS(5,_line), BTN_SIZE(9,1), label);
}
_line++;
}
void BaseNumericAdjustmentScreen::widgets_t::text_field(uint8_t tag, const char *label, const char *value, bool is_enabled) {
void BaseNumericAdjustmentScreen::widgets_t::text_field(uint8_t tag, progmem_str label, const char *value, bool is_enabled) {
CommandProcessor cmd;
if (_what & BACKGROUND) {
@ -230,7 +230,7 @@ void BaseNumericAdjustmentScreen::widgets_t::text_field(uint8_t tag, const char
.font(font_small)
.cmd(COLOR_RGB(bg_text_enabled))
.fgcolor(_color).tag(0).button( BTN_POS(5,_line), BTN_SIZE(9,1), F(""), OPT_FLAT)
.fgcolor(bg_color) .tag(0).button( BTN_POS(1,_line), BTN_SIZE(4,1), (progmem_str) label, OPT_FLAT);
.fgcolor(bg_color) .tag(0).button( BTN_POS(1,_line), BTN_SIZE(4,1), label, OPT_FLAT);
}
if (_what & FOREGROUND) {
@ -242,7 +242,7 @@ void BaseNumericAdjustmentScreen::widgets_t::text_field(uint8_t tag, const char
_line++;
}
void BaseNumericAdjustmentScreen::widgets_t::two_buttons(uint8_t tag1, const char *label1, uint8_t tag2, const char *label2, bool is_enabled) {
void BaseNumericAdjustmentScreen::widgets_t::two_buttons(uint8_t tag1, progmem_str label1, uint8_t tag2, progmem_str label2, bool is_enabled) {
if (_what & FOREGROUND) {
CommandProcessor cmd;
cmd.enabled(is_enabled)
@ -251,23 +251,23 @@ void BaseNumericAdjustmentScreen::widgets_t::two_buttons(uint8_t tag1, const cha
#else
.font(font_medium)
#endif
.tag(is_enabled ? tag1: 0).button(BTN_POS(5,_line), BTN_SIZE(4.5,1), progmem_str(label1))
.tag(is_enabled ? tag2: 0).button(BTN_POS(9.5,_line), BTN_SIZE(4.5,1), progmem_str(label2));
.tag(is_enabled ? tag1: 0).button(BTN_POS(5,_line), BTN_SIZE(4.5,1), label1)
.tag(is_enabled ? tag2: 0).button(BTN_POS(9.5,_line), BTN_SIZE(4.5,1), label2);
}
_line++;
}
void BaseNumericAdjustmentScreen::widgets_t::toggle(uint8_t tag, const char *label, const char *text, bool value, bool is_enabled) {
void BaseNumericAdjustmentScreen::widgets_t::toggle(uint8_t tag, progmem_str label, bool value, bool is_enabled) {
if (_what & BACKGROUND) {
CommandProcessor cmd;
cmd.fgcolor(bg_color)
.tag(0)
.font(font_small)
#ifdef TOUCH_UI_PORTRAIT
.button( BTN_POS(1, _line), BTN_SIZE( 8,1), progmem_str(label), OPT_FLAT);
.button( BTN_POS(1, _line), BTN_SIZE( 8,1), label, OPT_FLAT);
#else
.button( BTN_POS(1, _line), BTN_SIZE(10,1), progmem_str(label), OPT_FLAT);
.button( BTN_POS(1, _line), BTN_SIZE(10,1), label, OPT_FLAT);
#endif
}
@ -278,9 +278,9 @@ void BaseNumericAdjustmentScreen::widgets_t::toggle(uint8_t tag, const char *lab
.font(font_small)
.colors(ui_toggle)
#ifdef TOUCH_UI_PORTRAIT
.toggle(BTN_POS( 9,_line), BTN_SIZE(5,1), progmem_str(text), value);
.toggle2(BTN_POS( 9,_line), BTN_SIZE(5,1), GET_TEXTF(NO), GET_TEXTF(YES), value);
#else
.toggle(BTN_POS(10,_line), BTN_SIZE(4,1), progmem_str(text), value);
.toggle2(BTN_POS(10,_line), BTN_SIZE(4,1), GET_TEXTF(NO), GET_TEXTF(YES), value);
#endif
}
@ -293,7 +293,7 @@ void BaseNumericAdjustmentScreen::widgets_t::home_buttons(uint8_t tag) {
cmd.fgcolor(bg_color)
.tag(0)
.font(font_small)
.button( BTN_POS(1, _line), BTN_SIZE(4,1), F("Home:"), OPT_FLAT);
.button( BTN_POS(1, _line), BTN_SIZE(4,1), GET_TEXTF(HOME), OPT_FLAT);
}
if (_what & FOREGROUND) {
@ -304,10 +304,10 @@ void BaseNumericAdjustmentScreen::widgets_t::home_buttons(uint8_t tag) {
#else
.font(font_medium)
#endif
.tag(tag+0).button(BTN_POS(5,_line), BTN_SIZE(2,1), F("X"))
.tag(tag+1).button(BTN_POS(7,_line), BTN_SIZE(2,1), F("Y"))
.tag(tag+2).button(BTN_POS(9,_line), BTN_SIZE(2,1), F("Z"))
.tag(tag+3).button(BTN_POS(11,_line), BTN_SIZE(3,1), F("All"));
.tag(tag+0).button(BTN_POS(5,_line), BTN_SIZE(2,1), GET_TEXTF(AXIS_X))
.tag(tag+1).button(BTN_POS(7,_line), BTN_SIZE(2,1), GET_TEXTF(AXIS_Y))
.tag(tag+2).button(BTN_POS(9,_line), BTN_SIZE(2,1), GET_TEXTF(AXIS_Z))
.tag(tag+3).button(BTN_POS(11,_line), BTN_SIZE(3,1), GET_TEXTF(AXIS_ALL));
}
_line++;

View File

@ -43,52 +43,52 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
#define GRID_ROWS 9
#define GRID_COLS 2
.tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), F("Display"))
.tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXTF(DISPLAY_MENU))
#if HAS_TRINAMIC
.enabled(1)
#else
.enabled(0)
#endif
.tag(3) .button( BTN_POS(1,2), BTN_SIZE(1,1), F("Motor mA"))
.tag(3) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXTF(MOTOR_CURRENT))
#if HAS_TRINAMIC
.enabled(1)
#else
.enabled(0)
#endif
.tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), F("Bump Sense"))
.tag(5) .button( BTN_POS(1,4), BTN_SIZE(1,1), F("Endstops"))
.tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXTF(BUMP_SENSE))
.tag(5) .button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXTF(ENDSTOPS))
#if HOTENDS > 1
.enabled(1)
#else
.enabled(0)
#endif
.tag(6) .button( BTN_POS(1,5), BTN_SIZE(1,1), F("Nozzle Offset"))
.tag(6) .button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXTF(NOZZLE_OFFSETS))
.tag(7) .button( BTN_POS(2,1), BTN_SIZE(1,1), F("Steps/mm"))
.tag(8) .button( BTN_POS(2,2), BTN_SIZE(1,1), F("Velocity "))
.tag(9) .button( BTN_POS(2,3), BTN_SIZE(1,1), F("Acceleration"))
.tag(7) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXTF(STEPS_PER_MM))
.tag(8) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXTF(MAX_VELOCITY))
.tag(9) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXTF(MAX_ACCELERATION))
#if ENABLED(JUNCTION_DEVIATION)
.tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Junc Dev"))
.tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(JUNCTION_DEVIATION))
#else
.tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Jerk"))
.tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(MAX_JERK))
#endif
#if ENABLED(BACKLASH_GCODE)
.enabled(1)
#else
.enabled(0)
#endif
.tag(11) .button( BTN_POS(2,5), BTN_SIZE(1,1), F("Backlash"))
.tag(11) .button( BTN_POS(2,5), BTN_SIZE(1,1), GET_TEXTF(BACKLASH))
#if ENABLED(LIN_ADVANCE)
.enabled(1)
#else
.enabled(0)
#endif
.tag(12) .button( BTN_POS(1,6), BTN_SIZE(2,1), F("Linear Advance"))
.tag(13) .button( BTN_POS(1,7), BTN_SIZE(2,1), F("Interface Settings"))
.tag(14) .button( BTN_POS(1,8), BTN_SIZE(2,1), F("Restore Factory Defaults"))
.tag(12) .button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXTF(LINEAR_ADVANCE))
.tag(13) .button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXTF(INTERFACE_SETTINGS))
.tag(14) .button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXTF(RESTORE_FAILSAFE))
.colors(action_btn)
.tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), F("Back"));
.tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXTF(BACK));
#undef GRID_COLS
#undef GRID_ROWS
}

View File

@ -29,7 +29,7 @@
using namespace FTDI;
void BioConfirmHomeE::onRedraw(draw_mode_t) {
drawMessage(F("About to re-home plunger and auto-level. Remove syringe prior to proceeding.\n\nContinue?"));
drawMessage(GET_TEXTF(HOMING_WARNING));
drawYesNoButtons(1);
}

View File

@ -29,7 +29,7 @@
using namespace FTDI;
void BioConfirmHomeXYZ::onRedraw(draw_mode_t) {
drawMessage(F("About to home to loading position.\nEnsure the top and the bed of the printer are clear.\n\nContinue?"));
drawMessage(GET_TEXTF(LOADING_WARNING));
drawYesNoButtons(1);
}

View File

@ -42,17 +42,17 @@ void MainMenu::onRedraw(draw_mode_t what) {
if (what & FOREGROUND) {
CommandProcessor cmd;
cmd.cmd(COLOR_RGB(bg_text_enabled))
.font(font_large).text( BTN_POS(1,1), BTN_SIZE(2,1), F("Main Menu"))
.font(font_large).text( BTN_POS(1,1), BTN_SIZE(2,1), GET_TEXTF(MAIN_MENU))
.colors(normal_btn)
.font(font_medium)
.tag(2).button( BTN_POS(1,2), BTN_SIZE(2,1), F("Load Syringe"))
.tag(3).button( BTN_POS(1,3), BTN_SIZE(2,1), F("Unlock XY Axis"))
.tag(4).button( BTN_POS(1,4), BTN_SIZE(2,1), F("Bed Temperature"))
.tag(5).button( BTN_POS(1,5), BTN_SIZE(2,1), F("Interface Settings"))
.tag(6).button( BTN_POS(1,6), BTN_SIZE(2,1), F("Advanced Settings"))
.tag(7).button( BTN_POS(1,7), BTN_SIZE(2,1), F("About Printer"))
.tag(2).button( BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXTF(LOAD_SYRINGE))
.tag(3).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXTF(UNLOCK_XY_AXIS))
.tag(4).button( BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXTF(BED_TEMPERATURE))
.tag(5).button( BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXTF(INTERFACE_SETTINGS))
.tag(6).button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXTF(ADVANCED_SETTINGS))
.tag(7).button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXTF(ABOUT_PRINTER))
.colors(action_btn)
.tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), F("Back"));
.tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXTF(BACK));
}
#undef GRID_COLS

View File

@ -91,12 +91,12 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
.cmd(COLOR_RGB(bg_text_enabled));
if (!isHeaterIdle(BED) && getTargetTemp_celsius(BED) > 0) {
sprintf_P(bed_str, PSTR("%-3d C"), ROUND(getTargetTemp_celsius(BED)));
sprintf_P(bed_str, F("%3d%S"), ROUND(getTargetTemp_celsius(BED), GET_TEXT(UNITS_C)));
ui.bounds(POLY(target_temp), x, y, h, v);
cmd.text(x, y, h, v, bed_str);
}
sprintf_P(bed_str, PSTR("%-3d C"), ROUND(getActualTemp_celsius(BED)));
sprintf_P(bed_str, F("%3d%S"), ROUND(getActualTemp_celsius(BED)), GET_TEXT(UNITS_C));
ui.bounds(POLY(actual_temp), x, y, h, v);
cmd.text(x, y, h, v, bed_str);
}
@ -175,13 +175,13 @@ void StatusScreen::draw_fine_motion(draw_mode_t what) {
ui.bounds(POLY(fine_label), x, y, h, v);
cmd.cmd(COLOR_RGB(bg_text_enabled))
.text(x, y, h, v, F("Fine motion:"));
.text(x, y, h, v, GET_TEXTF(FINE_MOTION));
}
if (what & FOREGROUND) {
ui.bounds(POLY(fine_toggle), x, y, h, v);
cmd.colors(ui_toggle)
.toggle(x, y, h, v, F("no\xFFyes"), fine_motion);
.toggle2(x, y, h, v, GET_TEXTF(NO), GET_TEXTF(YES), fine_motion);
}
}
@ -226,15 +226,11 @@ void StatusScreen::draw_buttons(draw_mode_t) {
.colors(has_media ? action_btn : normal_btn)
.tag(9).button(BTN_POS(1,9), BTN_SIZE(1,1),
isPrintingFromMedia() ?
F("Printing") :
#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
GET_TEXTF(PRINTING) :
#ifdef LULZBOT_MANUAL_USB_STARTUP
(Sd2Card::ready() ? F("USB Drive") : F("Enable USB"))
(Sd2Card::ready() ? GET_TEXTF(MEDIA) : GET_TEXTF(ENABLE_MEDIA))
#else
F("USB Drive")
#endif
#else
F("SD Card")
GET_TEXTF(MEDIA)
#endif
);
@ -282,7 +278,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) {
case 9:
#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
if (!Sd2Card::ready()) {
StatusScreen::setStatusMessage(F("Insert USB drive..."));
StatusScreen::setStatusMessage(GET_TEXTF(INSERT_MEDIA));
Sd2Card::usbStartup();
} else {
GOTO_SCREEN(FilesScreen);

View File

@ -38,27 +38,26 @@ void TuneMenu::onRedraw(draw_mode_t what) {
.font(font_medium);
}
#define GRID_ROWS 8
#define GRID_ROWS 7
#define GRID_COLS 2
if (what & FOREGROUND) {
CommandProcessor cmd;
cmd.cmd(COLOR_RGB(bg_text_enabled))
.font(font_large).text ( BTN_POS(1,1), BTN_SIZE(2,1), F("Print Menu"))
.font(font_large).text ( BTN_POS(1,1), BTN_SIZE(2,1), GET_TEXTF(PRINT_MENU))
.colors(normal_btn)
.font(font_medium)
.enabled(!isPrinting()).tag(2).button( BTN_POS(1,2), BTN_SIZE(2,1), isPrinting() ? F("Printing...") : F("Print Again"))
.enabled( isPrinting()).tag(3).button( BTN_POS(1,3), BTN_SIZE(2,1), F("Print Speed"))
.tag(4).button( BTN_POS(1,4), BTN_SIZE(2,1), F("Bed Temperature"))
.enabled( isPrinting()).tag(2).button( BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXTF(PRINT_SPEED))
.tag(3).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXTF(BED_TEMPERATURE))
#if ENABLED(BABYSTEPPING)
.enabled(true)
#else
.enabled(false)
#endif
.tag(5).button( BTN_POS(1,5), BTN_SIZE(2,1), F("Nudge Nozzle"))
.enabled(!isPrinting()).tag(6).button( BTN_POS(1,6), BTN_SIZE(2,1), F("Load Syringe"))
.enabled(!isPrinting()).tag(7).button( BTN_POS(1,7), BTN_SIZE(2,1), F("Unlock XY Axis"))
.colors(action_btn) .tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), F("Back"));
.tag(4).button( BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXTF(NUDGE_NOZZLE))
.enabled(!isPrinting()).tag(5).button( BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXTF(LOAD_SYRINGE))
.enabled(!isPrinting()).tag(6).button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXTF(UNLOCK_XY_AXIS))
.colors(action_btn) .tag(1).button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXTF(BACK));
}
#undef GRID_COLS
#undef GRID_ROWS
@ -67,17 +66,11 @@ void TuneMenu::onRedraw(draw_mode_t what) {
bool TuneMenu::onTouchEnd(uint8_t tag) {
switch (tag) {
case 1: GOTO_PREVIOUS(); break;
case 2: {
FileList files;
printFile(files.shortFilename());
GOTO_PREVIOUS();
break;
}
case 3: GOTO_SCREEN(FeedratePercentScreen); break;
case 4: GOTO_SCREEN(TemperatureScreen); break;
case 5: GOTO_SCREEN(NudgeNozzleScreen); break;
case 6: GOTO_SCREEN(BioConfirmHomeXYZ); break;
case 7: StatusScreen::unlockMotors(); break;
case 2: GOTO_SCREEN(FeedratePercentScreen); break;
case 3: GOTO_SCREEN(TemperatureScreen); break;
case 4: GOTO_SCREEN(NudgeNozzleScreen); break;
case 5: GOTO_SCREEN(BioConfirmHomeXYZ); break;
case 6: StatusScreen::unlockMotors(); break;
default:
return false;
}

View File

@ -57,13 +57,14 @@ void BootScreen::onIdle() {
// in case the display is borked.
InterfaceSettingsScreen::failSafeSettings();
StatusScreen::loadBitmaps();
GOTO_SCREEN(TouchCalibrationScreen);
current_screen.forget();
PUSH_SCREEN(StatusScreen);
} else {
if (!UIFlashStorage::is_valid()) {
StatusScreen::loadBitmaps();
SpinnerDialogBox::show(F("Please wait..."));
SpinnerDialogBox::show(GET_TEXTF(PLEASE_WAIT));
UIFlashStorage::format_flash();
SpinnerDialogBox::hide();
}
@ -82,6 +83,9 @@ void BootScreen::onIdle() {
current_screen.forget();
PUSH_SCREEN(StatusScreen);
PUSH_SCREEN(BioConfirmHomeE);
#elif defined(TOUCH_UI_LANGUAGE_MENU)
StatusScreen::setStatusMessage(F(WELCOME_MSG));
GOTO_SCREEN(LanguageMenu);
#else
StatusScreen::setStatusMessage(F(WELCOME_MSG));
GOTO_SCREEN(StatusScreen);

View File

@ -114,29 +114,24 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
#else
.font(font_medium)
#endif
.text(BTN_POS(1,1), BTN_SIZE(2,1), F("Extruder Selection:"))
.text(BTN_POS(1,1), BTN_SIZE(2,1), GET_TEXTF(EXTRUDER_SELECTION))
#ifdef TOUCH_UI_PORTRAIT
.text(BTN_POS(1,7), BTN_SIZE(1,1), F("Current Temp:"))
.text(BTN_POS(1,7), BTN_SIZE(1,1), F(""))
#else
.text(BTN_POS(3,1), BTN_SIZE(2,1), F("Current Temp:"))
.text(BTN_POS(3,1), BTN_SIZE(2,1), GET_TEXTF(CURRENT_TEMPERATURE))
.font(font_small)
#endif
.text(BTN_POS(1,3), BTN_SIZE(2,1), F("Removal Temp:"));
.text(BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXTF(REMOVAL_TEMPERATURE));
drawTempGradient(BTN_POS(1,4), BTN_SIZE(1,3));
}
if (what & FOREGROUND) {
char e_str[15];
const char *idle = PSTR("%-3d C / idle");
const char *not_idle = PSTR("%-3d / %-3d C");
sprintf_P(
e_str,
isHeaterIdle(getExtruder()) ? idle : not_idle,
ROUND(getActualTemp_celsius(getExtruder())),
ROUND(getTargetTemp_celsius(getExtruder()))
);
if (isHeaterIdle(getExtruder()))
sprintf_P(e_str, PSTR("%3d%S / %S"), ROUND(getActualTemp_celsius(getExtruder())), GET_TEXT(UNITS_C), GET_TEXT(TEMP_IDLE));
else
sprintf_P(e_str, PSTR("%3d / %3d%S"), ROUND(getActualTemp_celsius(getExtruder())), ROUND(getTargetTemp_celsius(getExtruder())), GET_TEXT(UNITS_C));
const rgb_t tcol = getWarmColor(getActualTemp_celsius(getExtruder()), COOL_TEMP, LOW_TEMP, MED_TEMP, HIGH_TEMP);
cmd.cmd(COLOR_RGB(tcol))
@ -158,12 +153,12 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
const bool t_ok = getActualTemp_celsius(getExtruder()) > getSoftenTemp() - 10;
if (screen_data.ChangeFilamentScreen.t_tag && !t_ok) {
cmd.text(BTN_POS(1,6), BTN_SIZE(1,1), F("Heating..."));
cmd.text(BTN_POS(1,6), BTN_SIZE(1,1), GET_TEXTF(HEATING));
} else if (getActualTemp_celsius(getExtruder()) > 100) {
cmd.cmd(COLOR_RGB(0xFF0000))
.text(BTN_POS(1,4), BTN_SIZE(1,1), F("Caution:"))
.text(BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXTF(CAUTION))
.colors(normal_btn)
.text(BTN_POS(1,6), BTN_SIZE(1,1), F("Hot!"));
.text(BTN_POS(1,6), BTN_SIZE(1,1), GET_TEXTF(HOT));
}
#define TOG_STYLE(A) colors(A ? action_btn : normal_btn)
@ -195,15 +190,28 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
const bool tog7 = screen_data.ChangeFilamentScreen.repeat_tag == 7;
const bool tog8 = screen_data.ChangeFilamentScreen.repeat_tag == 8;
#ifdef TOUCH_UI_PORTRAIT
cmd.font(font_large)
cmd.font(font_large);
#else
cmd.font(font_small)
cmd.font(font_small);
#endif
.tag(2) .TOG_STYLE(tog2) .button (BTN_POS(2,6), BTN_SIZE(1,1), F( STRINGIFY(LOW_TEMP) "C (PLA)"))
.tag(3) .TOG_STYLE(tog3) .button (BTN_POS(2,5), BTN_SIZE(1,1), F( STRINGIFY(MED_TEMP) "C (ABS)"))
.tag(4) .TOG_STYLE(tog4) .button (BTN_POS(2,4), BTN_SIZE(1,1), F( STRINGIFY(HIGH_TEMP) "C (High)"))
.colors(normal_btn)
{
char str[30];
sprintf_P(str, PSTR("%3d%S (%S)"), LOW_TEMP, GET_TEXT(UNITS_C), GET_TEXT(MATERIAL_PLA));
cmd.tag(2) .TOG_STYLE(tog2) .button (BTN_POS(2,6), BTN_SIZE(1,1), str);
}
{
char str[30];
sprintf_P(str, PSTR("%3d%S (%S)"), MED_TEMP, GET_TEXT(UNITS_C), GET_TEXT(MATERIAL_ABS));
cmd.tag(3) .TOG_STYLE(tog3) .button (BTN_POS(2,5), BTN_SIZE(1,1), str);
}
{
char str[30];
sprintf_P(str, PSTR("%3d%S (%S)"), HIGH_TEMP, GET_TEXT(UNITS_C), GET_TEXT(MATERIAL_HIGH_TEMP));
cmd.tag(4) .TOG_STYLE(tog4) .button (BTN_POS(2,4), BTN_SIZE(1,1), str);
}
cmd.colors(normal_btn)
// Add tags to color gradient
.cmd(COLOR_MASK(0,0,0,0))
@ -215,23 +223,23 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
.cmd(COLOR_RGB(t_ok ? bg_text_enabled : bg_text_disabled))
#ifdef TOUCH_UI_PORTRAIT
.font(font_large)
.tag(0) .text (BTN_POS(1,8), BTN_SIZE(1,1), F("Unload"))
.text (BTN_POS(2,8), BTN_SIZE(1,1), F("Load/Extrude"))
.tag(5) .enabled(t_ok).button (BTN_POS(1,9), BTN_SIZE(1,1), F("Momentary"))
.tag(6) .enabled(t_ok).button (BTN_POS(2,9), BTN_SIZE(1,1), F("Momentary"))
.tag(7).TOG_STYLE(tog7).enabled(t_ok).button (BTN_POS(1,10), BTN_SIZE(1,1), F("Continuous"))
.tag(8).TOG_STYLE(tog8).enabled(t_ok).button (BTN_POS(2,10), BTN_SIZE(1,1), F("Continuous"))
.tag(1).colors(action_btn) .button (BTN_POS(1,11), BTN_SIZE(2,1), F("Back"));
.tag(0) .text (BTN_POS(1,8), BTN_SIZE(1,1), GET_TEXTF(UNLOAD_FILAMENT))
.text (BTN_POS(2,8), BTN_SIZE(1,1), GET_TEXTF(LOAD_FILAMENT))
.tag(5) .enabled(t_ok).button (BTN_POS(1,9), BTN_SIZE(1,1), GET_TEXTF(MOMENTARY))
.tag(6) .enabled(t_ok).button (BTN_POS(2,9), BTN_SIZE(1,1), GET_TEXTF(MOMENTARY))
.tag(7).TOG_STYLE(tog7).enabled(t_ok).button (BTN_POS(1,10), BTN_SIZE(1,1), GET_TEXTF(CONTINUOUS))
.tag(8).TOG_STYLE(tog8).enabled(t_ok).button (BTN_POS(2,10), BTN_SIZE(1,1), GET_TEXTF(CONTINUOUS))
.tag(1).colors(action_btn) .button (BTN_POS(1,11), BTN_SIZE(2,1), GET_TEXTF(BACK));
#else
.font(font_small)
.tag(0) .text (BTN_POS(3,3), BTN_SIZE(1,1), F("Unload"))
.text (BTN_POS(4,3), BTN_SIZE(1,1), F("Load/Extrude"))
.tag(5) .enabled(t_ok).button (BTN_POS(3,4), BTN_SIZE(1,1), F("Momentary"))
.tag(6) .enabled(t_ok).button (BTN_POS(4,4), BTN_SIZE(1,1), F("Momentary"))
.tag(7).TOG_STYLE(tog7).enabled(t_ok).button (BTN_POS(3,5), BTN_SIZE(1,1), F("Continuous"))
.tag(8).TOG_STYLE(tog8).enabled(t_ok).button (BTN_POS(4,5), BTN_SIZE(1,1), F("Continuous"))
.tag(0) .text (BTN_POS(3,3), BTN_SIZE(1,1), GET_TEXTF(UNLOAD_FILAMENT))
.text (BTN_POS(4,3), BTN_SIZE(1,1), GET_TEXTF(LOAD_FILAMENT))
.tag(5) .enabled(t_ok).button (BTN_POS(3,4), BTN_SIZE(1,1), GET_TEXTF(MOMENTARY))
.tag(6) .enabled(t_ok).button (BTN_POS(4,4), BTN_SIZE(1,1), GET_TEXTF(MOMENTARY))
.tag(7).TOG_STYLE(tog7).enabled(t_ok).button (BTN_POS(3,5), BTN_SIZE(1,1), GET_TEXTF(CONTINUOUS))
.tag(8).TOG_STYLE(tog8).enabled(t_ok).button (BTN_POS(4,5), BTN_SIZE(1,1), GET_TEXTF(CONTINUOUS))
.font(font_medium)
.tag(1).colors(action_btn) .button (BTN_POS(3,6), BTN_SIZE(2,1), F("Back"));
.tag(1).colors(action_btn) .button (BTN_POS(3,6), BTN_SIZE(2,1), GET_TEXTF(BACK));
#endif
}
#undef GRID_COLS

View File

@ -29,7 +29,7 @@
using namespace ExtUI;
void ConfirmAbortPrintDialogBox::onRedraw(draw_mode_t) {
drawMessage(F("Are you sure you want to cancel the print?"));
drawMessage(GET_TEXTF(ABORT_WARNING));
drawYesNoButtons();
}

View File

@ -30,7 +30,7 @@ using namespace ExtUI;
using namespace Theme;
void ConfirmAutoCalibrationDialogBox::onRedraw(draw_mode_t) {
drawMessage(F("For best results, unload the filament and clean the hotend prior to starting calibration. Continue?"));
drawMessage(GET_TEXTF(CALIBRATION_WARNING));
drawYesNoButtons();
}

View File

@ -31,17 +31,17 @@
using namespace FTDI;
void ConfirmEraseFlashDialogBox::onRedraw(draw_mode_t) {
drawMessage(F("Are you sure? SPI flash will be erased."));
drawMessage(GET_TEXTF(ERASE_FLASH_WARNING));
drawYesNoButtons();
}
bool ConfirmEraseFlashDialogBox::onTouchEnd(uint8_t tag) {
switch (tag) {
case 1:
SpinnerDialogBox::show(F("Erasing..."));
SpinnerDialogBox::show(GET_TEXTF(ERASING));
UIFlashStorage::format_flash();
SpinnerDialogBox::hide();
AlertDialogBox::show(F("SPI flash erased"));
AlertDialogBox::show(GET_TEXTF(ERASED));
// Remove ConfirmEraseFlashDialogBox from the stack
// so the alert box doesn't return to me.
current_screen.forget();

View File

@ -33,14 +33,14 @@ using namespace Theme;
void DefaultAccelerationScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(0);
w.units(PSTR("mm/s^2"));
w.heading( PSTR("Default Acceleration"));
w.units(GET_TEXTF(UNITS_MM_S2));
w.heading( GET_TEXTF(ACCELERATION));
w.color(other);
w.adjuster( 2, PSTR("Printing:"), getPrintingAcceleration_mm_s2() );
w.adjuster( 4, PSTR("Travel:"), getTravelAcceleration_mm_s2() );
w.adjuster( 6, PSTR("Retraction:"), getRetractAcceleration_mm_s2() );
w.adjuster( 2, GET_TEXTF(ACCEL_PRINTING), getPrintingAcceleration_mm_s2() );
w.adjuster( 4, GET_TEXTF(ACCEL_TRAVEL), getTravelAcceleration_mm_s2() );
w.adjuster( 6, GET_TEXTF(ACCEL_RETRACT), getRetractAcceleration_mm_s2() );
w.increments();
w.button( 8, PSTR("Set Axis Maximum"));
w.button( 8, GET_TEXTF(SET_MAXIMUM));
}
bool DefaultAccelerationScreen::onTouchHeld(uint8_t tag) {

View File

@ -45,19 +45,19 @@ void DialogBoxBaseClass::drawMessage(const T message, int16_t font) {
}
template void DialogBoxBaseClass::drawMessage(const char *, int16_t font);
template void DialogBoxBaseClass::drawMessage(const progmem_str, int16_t font);
template void DialogBoxBaseClass::drawMessage(progmem_str, int16_t font);
void DialogBoxBaseClass::drawYesNoButtons(uint8_t default_btn) {
CommandProcessor cmd;
cmd.font(font_medium)
.colors(default_btn == 1 ? action_btn : normal_btn).tag(1).button( BTN_POS(1,8), BTN_SIZE(1,1), F("Yes"))
.colors(default_btn == 2 ? action_btn : normal_btn).tag(2).button( BTN_POS(2,8), BTN_SIZE(1,1), F("No"));
.colors(default_btn == 1 ? action_btn : normal_btn).tag(1).button( BTN_POS(1,8), BTN_SIZE(1,1), GET_TEXTF(YES))
.colors(default_btn == 2 ? action_btn : normal_btn).tag(2).button( BTN_POS(2,8), BTN_SIZE(1,1), GET_TEXTF(NO));
}
void DialogBoxBaseClass::drawOkayButton() {
CommandProcessor cmd;
cmd.font(font_medium)
.tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), F("Okay"));
.tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXTF(OKAY));
}
void DialogBoxBaseClass::drawButton(const progmem_str label) {

View File

@ -32,14 +32,14 @@ using namespace Theme;
void DisplayTuningScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(0, BaseNumericAdjustmentScreen::DEFAULT_LOWEST);
w.units(PSTR(""));
w.heading( PSTR("Display Tuning"));
w.units(F(""));
w.heading(GET_TEXTF(DISPLAY_MENU));
w.color(other);
w.adjuster( 2, PSTR("H Offset:"), CLCD::mem_read_16(CLCD::REG::HOFFSET) );
w.adjuster( 4, PSTR("V Offset:"), CLCD::mem_read_16(CLCD::REG::VOFFSET) );
w.adjuster( 2, GET_TEXTF(H_OFFSET), CLCD::mem_read_16(CLCD::REG::HOFFSET) );
w.adjuster( 4, GET_TEXTF(V_OFFSET), CLCD::mem_read_16(CLCD::REG::VOFFSET) );
w.increments();
w.heading( PSTR("Touch Screen"));
w.button(6, PSTR("Calibrate"));
w.heading( GET_TEXTF(TOUCH_SCREEN));
w.button(6, GET_TEXTF(CALIBRATE));
}
bool DisplayTuningScreen::onTouchHeld(uint8_t tag) {

View File

@ -48,7 +48,7 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) {
#define GRID_ROWS 7
#define GRID_COLS 6
#define PIN_BTN(X,Y,PIN,LABEL) button(BTN_POS(X,Y), BTN_SIZE(2,1), F(LABEL))
#define PIN_BTN(X,Y,PIN,LABEL) button(BTN_POS(X,Y), BTN_SIZE(2,1), LABEL)
#define PIN_ENABLED(LABEL,PIN,INV,X,Y) cmd.enabled(1).colors(READ(PIN##_PIN) != INV ? action_btn : normal_btn).PIN_BTN(X,Y,PIN,LABEL);
#define PIN_DISABLED(LABEL,PIN,INV,X,Y) cmd.enabled(0).PIN_BTN(X,Y,PIN,LABEL);
@ -57,68 +57,68 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) {
#else
cmd.font(font_medium)
#endif
.text(BTN_POS(1,1), BTN_SIZE(6,1), F("Endstop States:"))
.text(BTN_POS(1,1), BTN_SIZE(6,1), GET_TEXTF(ENDSTOPS))
.font(font_tiny);
#if PIN_EXISTS(X_MAX)
PIN_ENABLED ("X Max", X_MAX,X_MAX_ENDSTOP_INVERTING,1,2)
PIN_ENABLED (GET_TEXTF(X_MAX), X_MAX,X_MAX_ENDSTOP_INVERTING,1,2)
#else
PIN_DISABLED("X Max",X_MAX,X_MAX_ENDSTOP_INVERTING,1,2)
PIN_DISABLED(GET_TEXTF(X_MAX),X_MAX,X_MAX_ENDSTOP_INVERTING,1,2)
#endif
#if PIN_EXISTS(Y_MAX)
PIN_ENABLED ("Y Max",Y_MAX,Y_MAX_ENDSTOP_INVERTING,3,2)
PIN_ENABLED (GET_TEXTF(Y_MAX),Y_MAX,Y_MAX_ENDSTOP_INVERTING,3,2)
#else
PIN_DISABLED("Y Max",Y_MAX,Y_MAX_ENDSTOP_INVERTING,3,2)
PIN_DISABLED(GET_TEXTF(Y_MAX),Y_MAX,Y_MAX_ENDSTOP_INVERTING,3,2)
#endif
#if PIN_EXISTS(Z_MAX)
PIN_ENABLED ("Z Max",Z_MAX,Z_MAX_ENDSTOP_INVERTING,5,2)
PIN_ENABLED (GET_TEXTF(Z_MAX),Z_MAX,Z_MAX_ENDSTOP_INVERTING,5,2)
#else
PIN_DISABLED("Z Max",Z_MAX,Z_MAX_ENDSTOP_INVERTING,5,2)
PIN_DISABLED(GET_TEXTF(Z_MAX),Z_MAX,Z_MAX_ENDSTOP_INVERTING,5,2)
#endif
#if PIN_EXISTS(X_MIN)
PIN_ENABLED ("X Min",X_MIN,X_MIN_ENDSTOP_INVERTING,1,3)
PIN_ENABLED (GET_TEXTF(X_MIN),X_MIN,X_MIN_ENDSTOP_INVERTING,1,3)
#else
PIN_DISABLED("X Min",X_MIN,X_MIN_ENDSTOP_INVERTING,1,3)
PIN_DISABLED(GET_TEXTF(X_MIN),X_MIN,X_MIN_ENDSTOP_INVERTING,1,3)
#endif
#if PIN_EXISTS(Y_MIN)
PIN_ENABLED ("Y Min",Y_MIN,Y_MIN_ENDSTOP_INVERTING,3,3)
PIN_ENABLED (GET_TEXTF(Y_MIN),Y_MIN,Y_MIN_ENDSTOP_INVERTING,3,3)
#else
PIN_DISABLED("Y Min",Y_MIN,Y_MIN_ENDSTOP_INVERTING,3,3)
PIN_DISABLED(GET_TEXTF(Y_MIN),Y_MIN,Y_MIN_ENDSTOP_INVERTING,3,3)
#endif
#if PIN_EXISTS(Z_MIN)
PIN_ENABLED ("Z Min",Z_MIN,Z_MIN_ENDSTOP_INVERTING,5,3)
PIN_ENABLED (GET_TEXTF(Z_MIN),Z_MIN,Z_MIN_ENDSTOP_INVERTING,5,3)
#else
PIN_DISABLED("Z Min",Z_MIN,Z_MIN_ENDSTOP_INVERTING,5,3)
PIN_DISABLED(GET_TEXTF(Z_MIN),Z_MIN,Z_MIN_ENDSTOP_INVERTING,5,3)
#endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR) && PIN_EXISTS(FIL_RUNOUT)
PIN_ENABLED ("Runout 1",FIL_RUNOUT, FIL_RUNOUT_INVERTING,1,4)
PIN_ENABLED (GET_TEXTF(RUNOUT_1),FIL_RUNOUT, FIL_RUNOUT_INVERTING,1,4)
#else
PIN_DISABLED("Runout 1",FIL_RUNOUT, FIL_RUNOUT_INVERTING,1,4)
PIN_DISABLED(GET_TEXTF(RUNOUT_1),FIL_RUNOUT, FIL_RUNOUT_INVERTING,1,4)
#endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR) && PIN_EXISTS(FIL_RUNOUT2)
PIN_ENABLED ("Runout 2",FIL_RUNOUT2,FIL_RUNOUT_INVERTING,3,4)
PIN_ENABLED (GET_TEXTF(RUNOUT_2),FIL_RUNOUT2,FIL_RUNOUT_INVERTING,3,4)
#else
PIN_DISABLED("Runout 2",FIL_RUNOUT2,FIL_RUNOUT_INVERTING,3,4)
PIN_DISABLED(GET_TEXTF(RUNOUT_2),FIL_RUNOUT2,FIL_RUNOUT_INVERTING,3,4)
#endif
#if PIN_EXISTS(Z_MIN_PROBE)
PIN_ENABLED ("Z Probe",Z_MIN_PROBE,Z_MIN_PROBE_ENDSTOP_INVERTING,5,4)
PIN_ENABLED (GET_TEXTF(Z_PROBE),Z_MIN_PROBE,Z_MIN_PROBE_ENDSTOP_INVERTING,5,4)
#else
PIN_DISABLED("Z Probe",Z_MIN_PROBE,Z_MIN_PROBE_ENDSTOP_INVERTING,5,4)
PIN_DISABLED(GET_TEXTF(Z_PROBE),Z_MIN_PROBE,Z_MIN_PROBE_ENDSTOP_INVERTING,5,4)
#endif
#if HAS_SOFTWARE_ENDSTOPS
#undef EDGE_R
#define EDGE_R 30
cmd.font(font_small)
.text (BTN_POS(1,5), BTN_SIZE(3,1), F("Soft Limits:"), OPT_RIGHTX | OPT_CENTERY)
.text (BTN_POS(1,5), BTN_SIZE(3,1), GET_TEXTF(SOFT_ENDSTOPS), OPT_RIGHTX | OPT_CENTERY)
.colors(ui_toggle)
.tag(2).toggle(BTN_POS(4,5), BTN_SIZE(3,1), F("off\xFFon"), getSoftEndstopState());
.tag(2).toggle2(BTN_POS(4,5), BTN_SIZE(3,1), GET_TEXTF(NO), GET_TEXTF(YES), getSoftEndstopState());
#undef EDGE_R
#define EDGE_R 0
#endif
cmd.font(font_medium)
.colors(action_btn)
.tag(1).button( BTN_POS(1,7), BTN_SIZE(6,1), F("Back"));
.tag(1).button( BTN_POS(1,7), BTN_SIZE(6,1), GET_TEXTF(BACK));
#undef GRID_COLS
#undef GRID_ROWS
}

View File

@ -31,10 +31,10 @@ using namespace ExtUI;
void FeedratePercentScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(0).units(PSTR("%"));
w.precision(0).units(GET_TEXTF(UNITS_PERCENT));
w.heading(PSTR("Print Speed"));
w.adjuster(4, PSTR("Speed"), getFeedrate_percent());
w.heading(GET_TEXTF(PRINT_SPEED));
w.adjuster(4, GET_TEXTF(SPEED), getFeedrate_percent());
w.increments();
}

View File

@ -43,43 +43,43 @@ void FilamentMenu::onRedraw(draw_mode_t what) {
#ifdef TOUCH_UI_PORTRAIT
#define GRID_ROWS 9
#define GRID_COLS 2
.text ( BTN_POS(1,1), BTN_SIZE(2,1), F("Filament Options:"))
.text ( BTN_POS(1,1), BTN_SIZE(2,1), GET_TEXTF(FILAMENT))
.font(font_medium).colors(normal_btn)
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
.enabled(1)
#else
.enabled(0)
#endif
.tag(2).button( BTN_POS(1,2), BTN_SIZE(2,1), F("Runout Sensor"))
.tag(2).button( BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXTF(RUNOUT_SENSOR))
#if ENABLED(LIN_ADVANCE)
.enabled(1)
#else
.enabled(0)
#endif
.tag(3).button( BTN_POS(1,3), BTN_SIZE(2,1), F("Linear Advance"))
.tag(3).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXTF(LINEAR_ADVANCE))
.colors(action_btn)
.tag(1) .button( BTN_POS(1,9), BTN_SIZE(2,1), F("Back"));
.tag(1) .button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXTF(BACK));
#undef GRID_COLS
#undef GRID_ROWS
#else
#define GRID_ROWS 6
#define GRID_COLS 3
.text ( BTN_POS(1,1), BTN_SIZE(3,1), F("Filament Options:"))
.text ( BTN_POS(1,1), BTN_SIZE(3,1), GET_TEXTF(FILAMENT))
.font(font_medium).colors(normal_btn)
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
.enabled(1)
#else
.enabled(0)
#endif
.tag(2).button( BTN_POS(1,2), BTN_SIZE(3,1), F("Filament Runout"))
.tag(2).button( BTN_POS(1,2), BTN_SIZE(3,1), GET_TEXTF(RUNOUT_SENSOR))
#if ENABLED(LIN_ADVANCE)
.enabled(1)
#else
.enabled(0)
#endif
.tag(3).button( BTN_POS(1,3), BTN_SIZE(3,1), F("Linear Advance"))
.tag(3).button( BTN_POS(1,3), BTN_SIZE(3,1), GET_TEXTF(LINEAR_ADVANCE))
.colors(action_btn)
.tag(1) .button( BTN_POS(1,6), BTN_SIZE(3,1), F("Back"));
.tag(1) .button( BTN_POS(1,6), BTN_SIZE(3,1), GET_TEXTF(BACK));
#endif
}
}

View File

@ -32,15 +32,15 @@ using namespace Theme;
void FilamentRunoutScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.heading( PSTR("Runout Detection:"));
w.toggle( 2, PSTR("Filament Sensor:"), PSTR("off\xFFon"), getFilamentRunoutEnabled());
w.heading( GET_TEXTF(FILAMENT));
w.toggle( 2, GET_TEXTF(RUNOUT_SENSOR), getFilamentRunoutEnabled());
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
w.heading(PSTR("Detection Threshold:"));
w.units(PSTR("mm"));
w.heading(GET_TEXTF(DETECTION_THRESHOLD));
w.units(GET_TEXTF(UNITS_MM));
w.precision(0);
w.color(e_axis);
w.adjuster( 10, PSTR("Distance:"), getFilamentRunoutDistance_mm(), getFilamentRunoutEnabled());
w.adjuster( 10, GET_TEXTF(DISTANCE), getFilamentRunoutDistance_mm(), getFilamentRunoutEnabled());
w.increments();
#endif
}

View File

@ -165,13 +165,13 @@ void FilesScreen::drawFooter() {
cmd.colors(normal_btn)
.font(font_medium)
.colors(has_selection ? normal_btn : action_btn)
.tag(back_tag).button( BTN_POS(4,y), BTN_SIZE(3,h), F("Back"))
.tag(back_tag).button( BTN_POS(4,y), BTN_SIZE(3,h), GET_TEXTF(BACK))
.enabled(has_selection)
.colors(has_selection ? action_btn : normal_btn);
if (screen_data.FilesScreen.flags.is_dir) {
cmd.tag(244).button( BTN_POS(1, y), BTN_SIZE(3,h), F("Open"));
cmd.tag(244).button( BTN_POS(1, y), BTN_SIZE(3,h), GET_TEXTF(OPEN_DIR));
} else {
cmd.tag(243).button( BTN_POS(1, y), BTN_SIZE(3,h), F("Print"));
cmd.tag(243).button( BTN_POS(1, y), BTN_SIZE(3,h), GET_TEXTF(PRINT_FILE));
}
}
@ -210,7 +210,7 @@ bool FilesScreen::onTouchEnd(uint8_t tag) {
break;
case 243:
printFile(getSelectedShortFilename());
StatusScreen::setStatusMessage(F("Print Starting"));
StatusScreen::setStatusMessage(GET_TEXTF(PRINT_STARTING));
GOTO_SCREEN(StatusScreen);
return true;
case 244:

View File

@ -69,15 +69,15 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) {
.cmd(COLOR_RGB(bg_text_enabled))
.tag(0)
.font(font_medium)
.text(BTN_POS(1,1), BTN_SIZE(4,1), F("Interface Settings"))
.text(BTN_POS(1,1), BTN_SIZE(4,1), GET_TEXTF(INTERFACE_SETTINGS))
#undef EDGE_R
#define EDGE_R 30
.font(font_small)
.tag(0)
.text(BTN_POS(1,2), BTN_SIZE(2,1), F("LCD brightness:"), OPT_RIGHTX | OPT_CENTERY)
.text(BTN_POS(1,3), BTN_SIZE(2,1), F("Sound volume:"), OPT_RIGHTX | OPT_CENTERY)
.text(BTN_POS(1,4), BTN_SIZE(2,1), F("Screen lock:"), OPT_RIGHTX | OPT_CENTERY);
cmd.text(BTN_POS(1,5), BTN_SIZE(2,1), F("Boot screen:"), OPT_RIGHTX | OPT_CENTERY);
.text(BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXTF(LCD_BRIGHTNESS), OPT_RIGHTX | OPT_CENTERY)
.text(BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXTF(SOUND_VOLUME), OPT_RIGHTX | OPT_CENTERY)
.text(BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXTF(SCREEN_LOCK), OPT_RIGHTX | OPT_CENTERY);
cmd.text(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXTF(BOOT_SCREEN), OPT_RIGHTX | OPT_CENTERY);
#undef EDGE_R
}
@ -94,19 +94,19 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) {
.tag(2).slider(BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.brightness, 128)
.tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.volume, 0xFF)
.colors(ui_toggle)
.tag(4).toggle(BTN_POS(3,4), BTN_SIZE(w,1), F("off\xFFon"), LockScreen::is_enabled())
.tag(5).toggle(BTN_POS(3,5), BTN_SIZE(w,1), F("off\xFFon"), UIData::animations_enabled())
.tag(4).toggle2(BTN_POS(3,4), BTN_SIZE(w,1), GET_TEXTF(NO), GET_TEXTF(YES), LockScreen::is_enabled())
.tag(5).toggle2(BTN_POS(3,5), BTN_SIZE(w,1), GET_TEXTF(NO), GET_TEXTF(YES), UIData::animations_enabled())
#undef EDGE_R
#define EDGE_R 0
#ifdef TOUCH_UI_PORTRAIT
.colors(normal_btn)
.tag(6).button (BTN_POS(1,6), BTN_SIZE(4,1), F("Customize Sounds"))
.tag(6).button (BTN_POS(1,6), BTN_SIZE(4,1), GET_TEXTF(INTERFACE_SOUNDS))
.colors(action_btn)
.tag(1).button (BTN_POS(1,7), BTN_SIZE(4,1), F("Back"));
.tag(1).button (BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXTF(BACK));
#else
.tag(6).button (BTN_POS(1,6), BTN_SIZE(2,1), F("Customize Sounds"))
.tag(6).button (BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXTF(INTERFACE_SOUNDS))
.colors(action_btn)
.tag(1).button (BTN_POS(3,6), BTN_SIZE(2,1), F("Back"));
.tag(1).button (BTN_POS(3,6), BTN_SIZE(2,1), GET_TEXTF(BACK));
#endif
}
}
@ -263,9 +263,9 @@ void InterfaceSettingsScreen::loadSettings(const char *buff) {
success = persistentStore.write_data(0, data, LULZBOT_EEPROM_BACKUP_SIZE) == PERSISTENT_STORE_SUCCESS;
if (success)
StatusScreen::setStatusMessage(F("Settings restored from backup"));
StatusScreen::setStatusMessage(GET_TEXTF(EEPROM_RESTORED));
else
StatusScreen::setStatusMessage(F("Settings restored to default"));
StatusScreen::setStatusMessage(GET_TEXTF(EEPROM_RESET));
return success;
}

View File

@ -71,15 +71,15 @@ void InterfaceSoundsScreen::onRedraw(draw_mode_t what) {
#define GRID_ROWS 9
.font(font_medium)
.text(BTN_POS(1,1), BTN_SIZE(4,1), F("Interface Sounds"))
.text(BTN_POS(1,1), BTN_SIZE(4,1), GET_TEXTF(INTERFACE_SOUNDS))
#undef EDGE_R
#define EDGE_R 30
.font(font_small)
.tag(0).text (BTN_POS(1,2), BTN_SIZE(2,1), F("Sound volume:"), OPT_RIGHTX | OPT_CENTERY)
.text (BTN_POS(1,3), BTN_SIZE(2,1), F("Click sounds:"), OPT_RIGHTX | OPT_CENTERY)
.text (BTN_POS(1,5), BTN_SIZE(2,1), F("Print starting:"), OPT_RIGHTX | OPT_CENTERY)
.text (BTN_POS(1,6), BTN_SIZE(2,1), F("Print finished:"), OPT_RIGHTX | OPT_CENTERY)
.text (BTN_POS(1,7), BTN_SIZE(2,1), F("Print error:"), OPT_RIGHTX | OPT_CENTERY);
.tag(0).text (BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXTF(SOUND_VOLUME), OPT_RIGHTX | OPT_CENTERY)
.text (BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXTF(CLICK_SOUNDS), OPT_RIGHTX | OPT_CENTERY)
.text (BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXTF(PRINT_STARTING), OPT_RIGHTX | OPT_CENTERY)
.text (BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXTF(PRINT_FINISHED), OPT_RIGHTX | OPT_CENTERY)
.text (BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXTF(PRINT_ERROR), OPT_RIGHTX | OPT_CENTERY);
#undef EDGE_R
}
@ -95,7 +95,7 @@ void InterfaceSoundsScreen::onRedraw(draw_mode_t what) {
#define EDGE_R 30
.tag(2).slider (BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.volume, 0xFF)
.colors(ui_toggle)
.tag(3).toggle (BTN_POS(3,3), BTN_SIZE(w,1), F("off\xFFon"), UIData::touch_sounds_enabled())
.tag(3).toggle2 (BTN_POS(3,3), BTN_SIZE(w,1), GET_TEXTF(NO), GET_TEXTF(YES), UIData::touch_sounds_enabled())
#undef EDGE_R
.colors(normal_btn)
#define EDGE_R 0
@ -103,7 +103,7 @@ void InterfaceSoundsScreen::onRedraw(draw_mode_t what) {
.tag(5).button (BTN_POS(3,6), BTN_SIZE(2,1), getSoundSelection(PRINTING_FINISHED))
.tag(6).button (BTN_POS(3,7), BTN_SIZE(2,1), getSoundSelection(PRINTING_FAILED))
.colors(action_btn)
.tag(1).button (BTN_POS(1,9), BTN_SIZE(4,1), F("Back"));
.tag(1).button (BTN_POS(1,9), BTN_SIZE(4,1), GET_TEXTF(BACK));
}
}

View File

@ -34,12 +34,12 @@ void JerkScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(1);
w.units(PSTR("mm/s"));
w.heading( PSTR("Maximum Jerk"));
w.color(x_axis) .adjuster( 2, PSTR("X:"), getAxisMaxJerk_mm_s(X) );
w.color(y_axis) .adjuster( 4, PSTR("Y:"), getAxisMaxJerk_mm_s(Y) );
w.color(z_axis) .adjuster( 6, PSTR("Z:"), getAxisMaxJerk_mm_s(Z) );
w.color(e_axis) .adjuster( 8, PSTR("E:"), getAxisMaxJerk_mm_s(E0) );
w.units(GET_TEXTF(UNITS_MM_S));
w.heading(GET_TEXTF(JERK));
w.color(x_axis) .adjuster( 2, GET_TEXTF(AXIS_X), getAxisMaxJerk_mm_s(X) );
w.color(y_axis) .adjuster( 4, GET_TEXTF(AXIS_Y), getAxisMaxJerk_mm_s(Y) );
w.color(z_axis) .adjuster( 6, GET_TEXTF(AXIS_Z), getAxisMaxJerk_mm_s(Z) );
w.color(e_axis) .adjuster( 8, GET_TEXTF(AXIS_E), getAxisMaxJerk_mm_s(E0) );
w.increments();
}

View File

@ -33,8 +33,8 @@ using namespace Theme;
void JunctionDeviationScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(2);
w.units(PSTR("mm"));
w.heading( PSTR("Junction Deviation"));
w.units(GET_TEXTF(UNITS_MM));
w.heading(GET_TEXTF(JUNCTION_DEVIATION));
w.color(other) .adjuster( 2, PSTR(""), getJunctionDeviation_mm() );
w.increments();
}

View File

@ -46,8 +46,8 @@ void KillScreen::show(progmem_str message) {
cmd.font(Theme::font_large)
.cmd(COLOR_RGB(Theme::bg_text_enabled))
.text(BTN_POS(1,2), BTN_SIZE(4,1), message)
.text(BTN_POS(1,3), BTN_SIZE(4,1), F("PRINTER HALTED"))
.text(BTN_POS(1,6), BTN_SIZE(4,1), F("Please reset"));
.text(BTN_POS(1,3), BTN_SIZE(4,1), GET_TEXTF(PRINTER_HALTED))
.text(BTN_POS(1,6), BTN_SIZE(4,1), GET_TEXTF(PLEASE_RESET));
#undef GRID_COLS
#undef GRID_ROWS

View File

@ -0,0 +1,56 @@
/*********************
* language_menu.cpp *
*********************/
/****************************************************************************
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* To view a copy of the GNU General Public License, go to the following *
* location: <http://www.gnu.org/licenses/>. *
****************************************************************************/
#include "../config.h"
#if ENABLED(LULZBOT_TOUCH_UI) && defined(TOUCH_UI_LANGUAGE_MENU)
#include "screens.h"
using namespace FTDI;
using namespace Theme;
void LanguageMenu::onRedraw(draw_mode_t) {
CommandProcessor cmd;
cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color))
.cmd(CLEAR(true,true,true))
.colors(normal_btn)
.font(Theme::font_medium);
#define GRID_ROWS 8
#define GRID_COLS 1
for (uint8_t i = 0; i < get_language_count(); i++)
cmd.tag(1 + i).button(BTN_POS(1,i + 1), BTN_SIZE(1,1), get_text(i, String_Indices::LANGUAGE));
}
bool LanguageMenu::onTouchEnd(uint8_t tag) {
const uint8_t lang = tag - 1;
if (tag != 0) {
set_language(lang);
GOTO_SCREEN(StatusScreen);
return true;
}
return false;
}
#endif // LULZBOT_TOUCH_UI

View File

@ -33,16 +33,16 @@ using namespace Theme;
void LinearAdvanceScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(2, DEFAULT_LOWEST).color(e_axis);
w.heading( PSTR("Linear Advance:"));
w.heading( GET_TEXTF(LINEAR_ADVANCE));
#if EXTRUDERS == 1
w.adjuster( 2, PSTR("K:"), getLinearAdvance_mm_mm_s(E0) );
w.adjuster( 2, GET_TEXTF(LINEAR_ADVANCE_K), getLinearAdvance_mm_mm_s(E0) );
#else
w.adjuster( 2, PSTR("K E1:"), getLinearAdvance_mm_mm_s(E0) );
w.adjuster( 4, PSTR("K E2:"), getLinearAdvance_mm_mm_s(E1) );
w.adjuster( 2, GET_TEXTF(LINEAR_ADVANCE_K1), getLinearAdvance_mm_mm_s(E0) );
w.adjuster( 4, GET_TEXTF(LINEAR_ADVANCE_K2), getLinearAdvance_mm_mm_s(E1) );
#if EXTRUDERS > 2
w.adjuster( 6, PSTR("K E3:"), getLinearAdvance_mm_mm_s(E2) );
w.adjuster( 6, GET_TEXTF(LINEAR_ADVANCE_K3), getLinearAdvance_mm_mm_s(E2) );
#if EXTRUDERS > 3
w.adjuster( 8, PSTR("K E4:"), getLinearAdvance_mm_mm_s(E3) );
w.adjuster( 8, GET_TEXTF(LINEAR_ADVANCE_K4), getLinearAdvance_mm_mm_s(E3) );
#endif
#endif
#endif

View File

@ -65,16 +65,16 @@ void LockScreen::onRedraw(draw_mode_t what) {
progmem_str message;
switch (message_style()) {
case 'w':
message = F("Wrong passcode!");
message = GET_TEXTF(PASSCODE_REJECTED);
break;
case 'g':
message = F("Passcode accepted!");
message = GET_TEXTF(PASSCODE_ACCEPTED);
break;
default:
if (passcode == 0) {
message = F("Select Passcode:");
message = GET_TEXTF(PASSCODE_SELECT);
} else {
message = F("Enter Passcode:");
message = GET_TEXTF(PASSCODE_REQUEST);
}
}
message_style() = '\0'; // Terminate the string.

View File

@ -43,53 +43,53 @@ void MainMenu::onRedraw(draw_mode_t what) {
#ifdef TOUCH_UI_PORTRAIT
#define GRID_ROWS 8
#define GRID_COLS 2
.tag(2).button( BTN_POS(1,1), BTN_SIZE(1,1), F("Auto Home"))
.tag(2).button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXTF(AUTO_HOME))
#ifdef NOZZLE_CLEAN_FEATURE
.enabled(1)
#else
.enabled(0)
#endif
.tag(3).button( BTN_POS(2,1), BTN_SIZE(1,1), F("Clean Nozzle"))
.tag(4).button( BTN_POS(1,2), BTN_SIZE(1,1), F("Move Axis"))
.tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), F("Motors Off"))
.tag(6).button( BTN_POS(1,3), BTN_SIZE(2,1), F("Temperature"))
.tag(7).button( BTN_POS(1,4), BTN_SIZE(2,1), F("Change Filament"))
.tag(8).button( BTN_POS(1,5), BTN_SIZE(2,1), F("Advanced Settings"))
.tag(3).button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXTF(CLEAN_NOZZLE))
.tag(4).button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXTF(MOVE_AXIS))
.tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXTF(MOTORS_OFF))
.tag(6).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXTF(TEMPERATURE))
.tag(7).button( BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXTF(CHANGE_FILAMENT))
.tag(8).button( BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXTF(ADVANCED_SETTINGS))
#ifdef PRINTCOUNTER
.enabled(1)
#else
.enabled(0)
#endif
.tag(9).button( BTN_POS(1,7), BTN_SIZE(2,1), F("Printer Statistics"))
.tag(10).button( BTN_POS(1,6), BTN_SIZE(2,1), F("About Printer"))
.tag(9).button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXTF(PRINTER_STATISTICS))
.tag(10).button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXTF(ABOUT_PRINTER))
.colors(action_btn)
.tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), F("Back"));
.tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXTF(BACK));
#undef GRID_COLS
#undef GRID_ROWS
#else
#define GRID_ROWS 5
#define GRID_COLS 2
.tag(2).button( BTN_POS(1,1), BTN_SIZE(1,1), F("Auto Home"))
.tag(2).button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT(AUTO_HOME))
#if ENABLED(NOZZLE_CLEAN_FEATURE)
.enabled(1)
#else
.enabled(0)
#endif
.tag(3).button( BTN_POS(2,1), BTN_SIZE(1,1), F("Clean Nozzle"))
.tag(4).button( BTN_POS(1,2), BTN_SIZE(1,1), F("Move Axis"))
.tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), F("Motors Off"))
.tag(6).button( BTN_POS(1,3), BTN_SIZE(1,1), F("Temperature"))
.tag(7).button( BTN_POS(2,3), BTN_SIZE(1,1), F("Change Filament"))
.tag(8).button( BTN_POS(1,4), BTN_SIZE(1,1), F("Advanced Settings"))
.tag(3).button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXTF(CLEAN_NOZZLE))
.tag(4).button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXTF(MOVE_AXIS))
.tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXTF(MOTORS_OFF))
.tag(6).button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXTF(TEMPERATURE))
.tag(7).button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXTF(CHANGE_FILAMENT))
.tag(8).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXTF(ADVANCED_SETTINGS))
#ifdef PRINTCOUNTER
.enabled(1)
#else
.enabled(0)
#endif
.tag(9).button( BTN_POS(2,4), BTN_SIZE(1,1), F("Printer Statistics"))
.tag(10).button( BTN_POS(1,5), BTN_SIZE(1,1), F("About Printer"))
.tag(9).button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(PRINTER_STATISTICS))
.tag(10).button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXTF(ABOUT_PRINTER))
.colors(action_btn)
.tag(1).button( BTN_POS(2,5), BTN_SIZE(1,1), F("Back"));
.tag(1).button( BTN_POS(2,5), BTN_SIZE(1,1), GET_TEXTF(BACK));
#undef GRID_COLS
#undef GRID_ROWS
#endif

View File

@ -33,21 +33,21 @@ using namespace Theme;
void MaxAccelerationScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(0);
w.units(PSTR("mm/s^2"));
w.heading( PSTR("Maximum Acceleration"));
w.color(x_axis) .adjuster( 2, PSTR("X:"), getAxisMaxAcceleration_mm_s2(X) );
w.color(y_axis) .adjuster( 4, PSTR("Y:"), getAxisMaxAcceleration_mm_s2(Y) );
w.color(z_axis) .adjuster( 6, PSTR("Z:"), getAxisMaxAcceleration_mm_s2(Z) );
w.units(GET_TEXTF(UNITS_MM_S2));
w.heading(GET_TEXTF(ACCELERATION));
w.color(x_axis) .adjuster( 2, GET_TEXTF(AMAX_X), getAxisMaxAcceleration_mm_s2(X) );
w.color(y_axis) .adjuster( 4, GET_TEXTF(AMAX_Y), getAxisMaxAcceleration_mm_s2(Y) );
w.color(z_axis) .adjuster( 6, GET_TEXTF(AMAX_Z), getAxisMaxAcceleration_mm_s2(Z) );
#if EXTRUDERS == 1 || DISABLED(DISTINCT_E_FACTORS)
w.color(e_axis).adjuster( 8, PSTR("E:"), getAxisMaxAcceleration_mm_s2(E0) );
w.color(e_axis).adjuster( 8, GET_TEXTF(AMAX_E1), getAxisMaxAcceleration_mm_s2(E0) );
#elif EXTRUDERS > 1
w.color(e_axis).adjuster( 8, PSTR("E1:"), getAxisMaxAcceleration_mm_s2(E0) );
w.color(e_axis).adjuster(10, PSTR("E2:"), getAxisMaxAcceleration_mm_s2(E1) );
w.color(e_axis).adjuster( 8, GET_TEXTF(AMAX_E1), getAxisMaxAcceleration_mm_s2(E0) );
w.color(e_axis).adjuster(10, GET_TEXTF(AMAX_E2), getAxisMaxAcceleration_mm_s2(E1) );
#if EXTRUDERS > 2
w.color(e_axis).adjuster(12, PSTR("E3:"), getAxisMaxAcceleration_mm_s2(E2) );
w.color(e_axis).adjuster(12, GET_TEXTF(AMAX_E3), getAxisMaxAcceleration_mm_s2(E2) );
#endif
#if EXTRUDERS > 3
w.color(e_axis).adjuster(14, PSTR("E4:"), getAxisMaxAcceleration_mm_s2(E3) );
w.color(e_axis).adjuster(14, GET_TEXTF(AMAX_E4), getAxisMaxAcceleration_mm_s2(E3) );
#endif
#endif
w.increments();

View File

@ -34,21 +34,21 @@ void MaxVelocityScreen::onRedraw(draw_mode_t what) {
using namespace ExtUI;
widgets_t w(what);
w.precision(0);
w.units(PSTR("mm/s"));
w.heading( PSTR("Maximum Velocity"));
w.color(x_axis) .adjuster( 2, PSTR("X:"), getAxisMaxFeedrate_mm_s(X) );
w.color(y_axis) .adjuster( 4, PSTR("Y:"), getAxisMaxFeedrate_mm_s(Y) );
w.color(z_axis) .adjuster( 6, PSTR("Z:"), getAxisMaxFeedrate_mm_s(Z) );
w.units(GET_TEXTF(UNITS_MM_S));
w.heading( GET_TEXTF(VELOCITY));
w.color(x_axis) .adjuster( 2, GET_TEXTF(VMAX_X), getAxisMaxFeedrate_mm_s(X) );
w.color(y_axis) .adjuster( 4, GET_TEXTF(VMAX_Y), getAxisMaxFeedrate_mm_s(Y) );
w.color(z_axis) .adjuster( 6, GET_TEXTF(VMAX_Z), getAxisMaxFeedrate_mm_s(Z) );
#if EXTRUDERS == 1 || DISABLED(DISTINCT_E_FACTORS)
w.color(e_axis) .adjuster( 8, PSTR("E:"), getAxisMaxFeedrate_mm_s(E0) );
w.color(e_axis) .adjuster( 8, GET_TEXTF(VMAX_E1), getAxisMaxFeedrate_mm_s(E0) );
#elif EXTRUDERS > 1
w.color(e_axis) .adjuster( 8, PSTR("E1:"), getAxisMaxFeedrate_mm_s(E0) );
w.color(e_axis) .adjuster( 10, PSTR("E2:"), getAxisMaxFeedrate_mm_s(E1) );
w.color(e_axis) .adjuster( 8, GET_TEXTF(VMAX_E1), getAxisMaxFeedrate_mm_s(E0) );
w.color(e_axis) .adjuster( 10, GET_TEXTF(VMAX_E2), getAxisMaxFeedrate_mm_s(E1) );
#if EXTRUDERS > 2
w.color(e_axis).adjuster( 12, PSTR("E3:"), getAxisMaxFeedrate_mm_s(E2) );
w.color(e_axis).adjuster( 12, GET_TEXTF(VMAX_E3), getAxisMaxFeedrate_mm_s(E2) );
#endif
#if EXTRUDERS > 3
w.color(e_axis).adjuster( 14, PSTR("E4:"), getAxisMaxFeedrate_mm_s(E3) );
w.color(e_axis).adjuster( 14, GET_TEXTF(VMAX_E4), getAxisMaxFeedrate_mm_s(E3) );
#endif
#endif
w.increments();

View File

@ -45,23 +45,23 @@ void MoveAxisScreen::onEntry() {
void MoveAxisScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(1);
w.units(PSTR("mm"));
w.heading( PSTR("Move Axis"));
w.units(GET_TEXTF(UNITS_MM));
w.heading( GET_TEXTF(MOVE_AXIS));
w.home_buttons(20);
w.color(Theme::x_axis ) .adjuster( 2, PSTR("X:"), getAxisPosition_mm(X), canMove(X));
w.color(Theme::y_axis ) .adjuster( 4, PSTR("Y:"), getAxisPosition_mm(Y), canMove(Y));
w.color(Theme::z_axis ) .adjuster( 6, PSTR("Z:"), getAxisPosition_mm(Z), canMove(Z));
w.color(Theme::x_axis ) .adjuster( 2, GET_TEXTF(AXIS_X), getAxisPosition_mm(X), canMove(X));
w.color(Theme::y_axis ) .adjuster( 4, GET_TEXTF(AXIS_Y), getAxisPosition_mm(Y), canMove(Y));
w.color(Theme::z_axis ) .adjuster( 6, GET_TEXTF(AXIS_Z), getAxisPosition_mm(Z), canMove(Z));
#if EXTRUDERS == 1
w.color(Theme::e_axis) .adjuster( 8, PSTR("E:"), screen_data.MoveAxisScreen.e_rel[0], canMove(E0));
w.color(Theme::e_axis) .adjuster( 8, GET_TEXTF(AXIS_E), screen_data.MoveAxisScreen.e_rel[0], canMove(E0));
#elif EXTRUDERS > 1
w.color(Theme::e_axis) .adjuster( 8, PSTR("E1:"), screen_data.MoveAxisScreen.e_rel[0], canMove(E0));
w.color(Theme::e_axis) .adjuster( 10, PSTR("E2:"), screen_data.MoveAxisScreen.e_rel[1], canMove(E1));
w.color(Theme::e_axis) .adjuster( 8, GET_TEXTF(AXIS_E1), screen_data.MoveAxisScreen.e_rel[0], canMove(E0));
w.color(Theme::e_axis) .adjuster( 10, GET_TEXTF(AXIS_E2), screen_data.MoveAxisScreen.e_rel[1], canMove(E1));
#if EXTRUDERS > 2
w.color(Theme::e_axis) .adjuster( 12, PSTR("E3:"), screen_data.MoveAxisScreen.e_rel[2], canMove(E2));
w.color(Theme::e_axis) .adjuster( 12, GET_TEXTF(AXIS_E3), screen_data.MoveAxisScreen.e_rel[2], canMove(E2));
#endif
#if EXTRUDERS > 3
w.color(Theme::e_axis) .adjuster( 14, PSTR("E4:"), screen_data.MoveAxisScreen.e_rel[3], canMove(E3));
w.color(Theme::e_axis) .adjuster( 14, GET_TEXTF(AXIS_E4), screen_data.MoveAxisScreen.e_rel[3], canMove(E3));
#endif
#endif
w.increments();

View File

@ -39,14 +39,14 @@ void NozzleOffsetScreen::onEntry() {
void NozzleOffsetScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(2).units(PSTR("mm"));
w.precision(2).units(GET_TEXTF(UNITS_MM));
w.heading( PSTR("Nozzle Offset"));
w.color(Theme::x_axis).adjuster(2, PSTR("X:"), ExtUI::getNozzleOffset_mm(X, E1));
w.color(Theme::y_axis).adjuster(4, PSTR("Y:"), ExtUI::getNozzleOffset_mm(Y, E1));
w.color(Theme::z_axis).adjuster(6, PSTR("Z:"), ExtUI::getNozzleOffset_mm(Z, E1));
w.heading( GET_TEXTF(TOOL_OFFSETS));
w.color(Theme::x_axis).adjuster(2, GET_TEXTF(AXIS_X), ExtUI::getNozzleOffset_mm(X, E1));
w.color(Theme::y_axis).adjuster(4, GET_TEXTF(AXIS_Y), ExtUI::getNozzleOffset_mm(Y, E1));
w.color(Theme::z_axis).adjuster(6, GET_TEXTF(AXIS_Z), ExtUI::getNozzleOffset_mm(Z, E1));
#if ENABLED(CALIBRATION_GCODE)
w.button(8, PSTR("Measure automatically"), !isPrinting());
w.button(8, GET_TEXTF(MEASURE_AUTOMATICALLY), !isPrinting());
#endif
w.increments();
}

View File

@ -44,41 +44,42 @@ void NudgeNozzleScreen::onEntry() {
void NudgeNozzleScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(2, BaseNumericAdjustmentScreen::DEFAULT_MIDRANGE).units(PSTR("mm"));
w.precision(2, BaseNumericAdjustmentScreen::DEFAULT_MIDRANGE).units(GET_TEXTF(UNITS_MM));
w.heading( PSTR("Nudge Nozzle"));
w.heading( GET_TEXTF(NUDGE_NOZZLE));
#if ENABLED(BABYSTEP_XY)
w.color(x_axis).adjuster(2, PSTR("X:"), screen_data.NudgeNozzleScreen.rel[0] / getAxisSteps_per_mm(X));
w.color(y_axis).adjuster(4, PSTR("Y:"), screen_data.NudgeNozzleScreen.rel[1] / getAxisSteps_per_mm(Y));
w.color(x_axis).adjuster(2, GET_TEXTF(AXIS_X), screen_data.NudgeNozzleScreen.rel[0] / getAxisSteps_per_mm(X));
w.color(y_axis).adjuster(4, GET_TEXTF(AXIS_Y), screen_data.NudgeNozzleScreen.rel[1] / getAxisSteps_per_mm(Y));
#endif
w.color(z_axis).adjuster(6, PSTR("Z:"), screen_data.NudgeNozzleScreen.rel[2] / getAxisSteps_per_mm(Z));
w.color(z_axis).adjuster(6, GET_TEXTF(AXIS_Z), screen_data.NudgeNozzleScreen.rel[2] / getAxisSteps_per_mm(Z));
w.increments();
#if EXTRUDERS > 1
w.toggle (8, PSTR("Adjust Both Nozzles:"), PSTR("no\xFFyes"), screen_data.NudgeNozzleScreen.link_nozzles, PSTR("Yes\nNo"));
w.toggle (8, GET_TEXTF(ADJUST_BOTH_NOZZLES), screen_data.NudgeNozzleScreen.link_nozzles);
#endif
#if EXTRUDERS > 1 || HAS_BED_PROBE
w.toggle (9, PSTR("Show Offsets:"), PSTR("no\xFFyes"), screen_data.NudgeNozzleScreen.show_offsets, PSTR("Yes\nNo"));
w.toggle (9, GET_TEXTF(SHOW_OFFSETS), screen_data.NudgeNozzleScreen.show_offsets);
if (screen_data.NudgeNozzleScreen.show_offsets) {
char str[19], num1[7];
char str[19];
w.draw_mode(BOTH);
w.color(other);
#if HAS_BED_PROBE
dtostrf(getZOffset_mm(), 4, 2, num1);
sprintf_P(str, PSTR("%s mm"), num1);
w.text_field (0, PSTR("Z Offset"), str);
dtostrf(getZOffset_mm(), 4, 2, str);
strcat(str, " ");
strcat_P(str, GET_TEXT(UNITS_MM));
w.text_field (0, GET_TEXTF(ZPROBE_ZOFFSET), str);
#endif
#if EXTRUDERS > 1
char num2[7], num3[7];
char num1[7], num2[7], num3[7];
dtostrf(getNozzleOffset_mm(X, E1), 4, 2, num1);
dtostrf(getNozzleOffset_mm(Y, E1), 4, 2, num2);
dtostrf(getNozzleOffset_mm(Z, E1), 4, 2, num3);
sprintf_P(str, PSTR("%s; %s; %s mm"), num1, num2, num3);
w.text_field (0, PSTR("Noz. Offset"), str);
sprintf_P(str, PSTR("%s; %s; %s %S"), num1, num2, num3, GET_TEXT(UNITS_MM));
w.text_field (0, GET_TEXTF(TOOL_OFFSETS), str);
#endif
}
#endif

View File

@ -29,15 +29,15 @@
using namespace ExtUI;
void RestoreFailsafeDialogBox::onRedraw(draw_mode_t) {
drawMessage(F("Are you sure? Customizations will be lost."));
drawMessage(GET_TEXTF(EEPROM_RESET_WARNING));
drawYesNoButtons();
}
bool RestoreFailsafeDialogBox::onTouchEnd(uint8_t tag) {
switch (tag) {
case 1:
ExtUI::injectCommands_P(PSTR("M502\nM117 Factory settings restored."));
AlertDialogBox::show(F("Factory settings restored."));
ExtUI::injectCommands_P(PSTR("M502"));
AlertDialogBox::show(GET_TEXTF(EEPROM_RESET));
// Remove RestoreFailsafeDialogBox from the stack
// so the alert box doesn't return to it.
current_screen.forget();

View File

@ -31,7 +31,7 @@ using namespace ExtUI;
bool SaveSettingsDialogBox::needs_save = false;
void SaveSettingsDialogBox::onRedraw(draw_mode_t) {
drawMessage(F("Do you wish to save these settings as defaults?"));
drawMessage(GET_TEXTF(EEPROM_SAVE_PROMPT));
drawYesNoButtons();
}
@ -40,7 +40,7 @@ bool SaveSettingsDialogBox::onTouchEnd(uint8_t tag) {
switch (tag) {
case 1:
injectCommands_P(PSTR("M500"));
AlertDialogBox::show(F("Settings saved!"));
AlertDialogBox::show(GET_TEXTF(EEPROM_SAVED));
// Remove SaveSettingsDialogBox from the stack
// so the alert box doesn't return to me.
current_screen.forget();

View File

@ -31,6 +31,9 @@ screen_data_t screen_data;
SCREEN_TABLE {
DECL_SCREEN(BootScreen),
#if ENABLED(TOUCH_UI_LANGUAGE_MENU)
DECL_SCREEN(LanguageMenu),
#endif
DECL_SCREEN(TouchCalibrationScreen),
DECL_SCREEN(StatusScreen),
DECL_SCREEN(MainMenu),

View File

@ -23,6 +23,7 @@
#pragma once
#include "../ftdi_eve_lib/ftdi_eve_lib.h"
#include "../language/languages.h"
#include "../theme/theme.h"
#define ROUND(val) uint16_t((val)+0.5)
@ -219,6 +220,7 @@ class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE,
static void draw_status_message(draw_mode_t, const char * const);
public:
static void loadBitmaps();
static void setStatusMessage(const char *);
static void setStatusMessage(progmem_str);
static void onRedraw(draw_mode_t);
@ -350,7 +352,7 @@ class BaseNumericAdjustmentScreen : public BaseScreen {
uint8_t _line;
uint32_t _color;
uint8_t _decimals;
const char *_units;
progmem_str _units;
protected:
void _draw_increment_btn(uint8_t line, const uint8_t tag);
@ -359,19 +361,19 @@ class BaseNumericAdjustmentScreen : public BaseScreen {
widgets_t(draw_mode_t);
widgets_t &color(uint32_t color) {_color = color; return *this;}
widgets_t &units(const char *units) {_units = units; return *this;}
widgets_t &units(progmem_str units) {_units = units; return *this;}
widgets_t &draw_mode(draw_mode_t what) {_what = what; return *this;}
widgets_t &precision(uint8_t decimals, precision_default_t = DEFAULT_HIGHEST);
void heading (const char *label);
void adjuster_sram_val (uint8_t tag, const char *label, const char *value, bool is_enabled = true);
void adjuster (uint8_t tag, const char *label, const char *value, bool is_enabled = true);
void adjuster (uint8_t tag, const char *label, float value=0, bool is_enabled = true);
void button (uint8_t tag, const char *label, bool is_enabled = true);
void text_field (uint8_t tag, const char *label, const char *value, bool is_enabled = true);
void two_buttons (uint8_t tag1, const char *label1,
uint8_t tag2, const char *label2, bool is_enabled = true);
void toggle (uint8_t tag, const char *label, const char *text, bool value, bool is_enabled = true);
void heading (progmem_str label);
void adjuster_sram_val (uint8_t tag, progmem_str label, const char *value, bool is_enabled = true);
void adjuster (uint8_t tag, progmem_str label, const char *value, bool is_enabled = true);
void adjuster (uint8_t tag, progmem_str label, float value=0, bool is_enabled = true);
void button (uint8_t tag, progmem_str label, bool is_enabled = true);
void text_field (uint8_t tag, progmem_str label, const char *value, bool is_enabled = true);
void two_buttons (uint8_t tag1, progmem_str label1,
uint8_t tag2, progmem_str label2, bool is_enabled = true);
void toggle (uint8_t tag, progmem_str label, bool value, bool is_enabled = true);
void home_buttons (uint8_t tag);
void increments ();
};
@ -710,3 +712,11 @@ class MediaPlayerScreen : public BaseScreen, public UncachedScreen {
static void playStream(void *obj, media_streamer_func_t*);
};
#if ENABLED(TOUCH_UI_LANGUAGE_MENU)
class LanguageMenu : public BaseScreen, public UncachedScreen {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};
#endif

View File

@ -46,7 +46,7 @@ void SpinnerDialogBox::hide() {
}
void SpinnerDialogBox::enqueueAndWait_P(const progmem_str commands) {
enqueueAndWait_P(F("Please wait..."), commands);
enqueueAndWait_P(GET_TEXTF(PLEASE_WAIT), commands);
}
void SpinnerDialogBox::enqueueAndWait_P(const progmem_str message, const progmem_str commands) {

View File

@ -44,14 +44,14 @@ void StatisticsScreen::onRedraw(draw_mode_t what) {
.tag(0)
.font(Theme::font_medium)
.text(BTN_POS(1,1), BTN_SIZE(4,1), F("Printer Statistics"))
.text(BTN_POS(1,1), BTN_SIZE(4,1), GET_TEXTF(PRINTER_STATISTICS))
.font(Theme::font_small)
.tag(0)
.text(BTN_POS(1,2), BTN_SIZE(2,1), F("Total Prints:"), OPT_RIGHTX | OPT_CENTERY)
.text(BTN_POS(1,3), BTN_SIZE(2,1), F("Finished Prints:"), OPT_RIGHTX | OPT_CENTERY)
.text(BTN_POS(1,4), BTN_SIZE(2,1), F("Total Print Time:"), OPT_RIGHTX | OPT_CENTERY)
.text(BTN_POS(1,5), BTN_SIZE(2,1), F("Longest Print:"), OPT_RIGHTX | OPT_CENTERY)
.text(BTN_POS(1,6), BTN_SIZE(2,1), F("Filament Used:"), OPT_RIGHTX | OPT_CENTERY);
.text(BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXTF(INFO_PRINT_COUNT), OPT_RIGHTX | OPT_CENTERY)
.text(BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXTF(INFO_COMPLETED_PRINTS), OPT_RIGHTX | OPT_CENTERY)
.text(BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXTF(INFO_PRINT_TIME), OPT_RIGHTX | OPT_CENTERY)
.text(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXTF(INFO_PRINT_LONGEST), OPT_RIGHTX | OPT_CENTERY)
.text(BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXTF(INFO_PRINT_FILAMENT), OPT_RIGHTX | OPT_CENTERY);
// Don't chain the following, it causes strange issues with evaluation ordering!
cmd.text(BTN_POS(3,2), BTN_SIZE(2,1), getTotalPrints_str(buffer));
cmd.text(BTN_POS(3,3), BTN_SIZE(2,1), getFinishedPrints_str(buffer));
@ -63,7 +63,7 @@ void StatisticsScreen::onRedraw(draw_mode_t what) {
if (what & FOREGROUND) {
cmd.font(Theme::font_medium)
.colors(action_btn)
.tag(1).button(BTN_POS(1,7), BTN_SIZE(4,1), F("Back"));
.tag(1).button(BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXTF(BACK));
}
}

View File

@ -22,14 +22,14 @@
#include "../config.h"
#if ENABLED(LULZBOT_TOUCH_UI) && !defined(LULZBOT_USE_BIOPRINTER_UI)
#if ENABLED(LULZBOT_TOUCH_UI) && DISABLED(LULZBOT_USE_BIOPRINTER_UI)
#include "screens.h"
#include "screen_data.h"
#include "../archim2-flash/flash_storage.h"
#if ENABLED(SDSUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
#if BOTH(SDSUPPORT, LULZBOT_MANUAL_USB_STARTUP)
#include "../../../../../sd/cardreader.h"
#endif
@ -57,9 +57,9 @@ void StatusScreen::draw_axis_position(draw_mode_t what) {
.button( BTN_POS(1,7), BTN_SIZE(2,1), F(""), OPT_FLAT)
.font(Theme::font_small)
.text ( BTN_POS(1,5), BTN_SIZE(1,1), F("X"))
.text ( BTN_POS(1,6), BTN_SIZE(1,1), F("Y"))
.text ( BTN_POS(1,7), BTN_SIZE(1,1), F("Z"))
.text ( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXTF(AXIS_X))
.text ( BTN_POS(1,6), BTN_SIZE(1,1), GET_TEXTF(AXIS_Y))
.text ( BTN_POS(1,7), BTN_SIZE(1,1), GET_TEXTF(AXIS_Z))
.font(Theme::font_medium)
.fgcolor(Theme::x_axis) .button( BTN_POS(2,5), BTN_SIZE(2,1), F(""), OPT_FLAT)
@ -73,9 +73,9 @@ void StatusScreen::draw_axis_position(draw_mode_t what) {
.button( BTN_POS(3,5), BTN_SIZE(1,2), F(""), OPT_FLAT)
.font(Theme::font_small)
.text ( BTN_POS(1,5), BTN_SIZE(1,1), F("X"))
.text ( BTN_POS(2,5), BTN_SIZE(1,1), F("Y"))
.text ( BTN_POS(3,5), BTN_SIZE(1,1), F("Z"))
.text ( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXTF(AXIS_X))
.text ( BTN_POS(2,5), BTN_SIZE(1,1), GET_TEXTF(AXIS_Y))
.text ( BTN_POS(3,5), BTN_SIZE(1,1), GET_TEXTF(AXIS_Z))
.font(Theme::font_medium)
.fgcolor(Theme::x_axis) .button( BTN_POS(1,6), BTN_SIZE(1,1), F(""), OPT_FLAT)
@ -92,21 +92,24 @@ void StatusScreen::draw_axis_position(draw_mode_t what) {
if (isAxisPositionKnown(X)) {
dtostrf(getAxisPosition_mm(X), 5, 1, x_str);
strcat_P(x_str, PSTR(" mm"));
strcat_P(x_str, " ");
strcat_P(x_str, GET_TEXT(UNITS_MM));
} else {
strcpy_P(x_str, PSTR("?"));
}
if (isAxisPositionKnown(Y)) {
dtostrf(getAxisPosition_mm(Y), 5, 1, y_str);
strcat_P(y_str, PSTR(" mm"));
strcat_P(y_str, " ");
strcat_P(y_str, GET_TEXT(UNITS_MM));
} else {
strcpy_P(y_str, PSTR("?"));
}
if (isAxisPositionKnown(Z)) {
dtostrf(getAxisPosition_mm(Z), 5, 1, z_str);
strcat_P(z_str, PSTR(" mm"));
strcat_P(z_str, " ");
strcat_P(z_str, GET_TEXT(UNITS_MM));
} else {
strcpy_P(z_str, PSTR("?"));
}
@ -182,10 +185,10 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
if (what & FOREGROUND) {
using namespace ExtUI;
char e0_str[15];
char e1_str[15];
char bed_str[15];
char fan_str[15];
char e0_str[20];
char e1_str[20];
char bed_str[20];
char fan_str[20];
sprintf_P(
fan_str,
@ -193,35 +196,21 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
int8_t(getActualFan_percent(FAN0))
);
#if defined(TOUCH_UI_USE_UTF8) && defined(TOUCH_UI_UTF8_WESTERN_CHARSET)
const char *idle = PSTR(u8"%3d°C / idle");
const char *not_idle = PSTR(u8"%3d / %3d°C");
#else
const char *idle = PSTR("%3d C / idle");
const char *not_idle = PSTR("%3d / %3d C");
#endif
if (isHeaterIdle(BED))
sprintf_P(bed_str, PSTR("%3d%S / %S"), ROUND(getActualTemp_celsius(BED)), GET_TEXT(UNITS_C), GET_TEXT(TEMP_IDLE));
else
sprintf_P(bed_str, PSTR("%3d / %3d%S"), ROUND(getActualTemp_celsius(BED)), ROUND(getTargetTemp_celsius(BED)), GET_TEXT(UNITS_C));
sprintf_P(
bed_str,
isHeaterIdle(BED) ? idle : not_idle,
ROUND(getActualTemp_celsius(BED)),
ROUND(getTargetTemp_celsius(BED))
);
sprintf_P(
e0_str,
isHeaterIdle(H0) ? idle : not_idle,
ROUND(getActualTemp_celsius(H0)),
ROUND(getTargetTemp_celsius(H0))
);
if (isHeaterIdle(H0))
sprintf_P(e0_str, PSTR("%3d%S / %S"), ROUND(getActualTemp_celsius(H0)), GET_TEXT(UNITS_C), GET_TEXT(TEMP_IDLE));
else
sprintf_P(e0_str, PSTR("%3d / %3d%S"), ROUND(getActualTemp_celsius(H0)), ROUND(getTargetTemp_celsius(H0)), GET_TEXT(UNITS_C));
#if EXTRUDERS == 2
sprintf_P(
e1_str,
isHeaterIdle(H1) ? idle : not_idle,
ROUND(getActualTemp_celsius(H1)),
ROUND(getTargetTemp_celsius(H1))
);
if (isHeaterIdle(H1))
sprintf_P(e1_str, PSTR("%3d%S / %S"), ROUND(getActualTemp_celsius(H1)), PSTR(GET_TEXT(UNITS_C)), GET_TEXT(TEMP_IDLE));
else
sprintf_P(e1_str, PSTR("%3d / %3d%S"), ROUND(getActualTemp_celsius(H1)), ROUND(getTargetTemp_celsius(H1)), GET_TEXT(UNITS_C));
#else
strcpy_P(
e1_str,
@ -290,7 +279,7 @@ void StatusScreen::draw_interaction_buttons(draw_mode_t what) {
CommandProcessor cmd;
cmd.colors(normal_btn)
.font(Theme::font_medium)
#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
#if BOTH(SDSUPPORT, LULZBOT_MANUAL_USB_STARTUP)
.enabled(!Sd2Card::ready() || has_media)
#else
.enabled(has_media)
@ -301,22 +290,17 @@ void StatusScreen::draw_interaction_buttons(draw_mode_t what) {
#else
.tag(3).button( BTN_POS(1,7), BTN_SIZE(2,2),
#endif
isPrintingFromMedia() ? F("Printing") :
#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
#ifdef LULZBOT_MANUAL_USB_STARTUP
(Sd2Card::ready() ? F("USB Drive") : F("Enable USB"))
isPrintingFromMedia() ? GET_TEXTF(PRINTING) :
#if BOTH(SDSUPPORT, LULZBOT_MANUAL_USB_STARTUP)
(!Sd2Card::ready() ? GET_TEXTF(ENABLE_MEDIA) :
#else
F("USB Drive")
#endif
)
#else
F("SD Card"))
GET_TEXTF(MEDIA))
#endif
.colors(!has_media ? action_btn : normal_btn)
#ifdef TOUCH_UI_PORTRAIT
.tag(4).button( BTN_POS(3,8), BTN_SIZE(2,1), F("MENU"));
.tag(4).button( BTN_POS(3,8), BTN_SIZE(2,1), GET_TEXTF(MENU));
#else
.tag(4).button( BTN_POS(3,7), BTN_SIZE(2,2), F("MENU"));
.tag(4).button( BTN_POS(3,7), BTN_SIZE(2,2), GET_TEXTF(MENU));
#endif
}
#undef GRID_COLS
@ -423,9 +407,9 @@ bool StatusScreen::onTouchEnd(uint8_t tag) {
switch (tag) {
case 3:
#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
#if BOTH(SDSUPPORT, LULZBOT_MANUAL_USB_STARTUP)
if (!Sd2Card::ready()) {
StatusScreen::setStatusMessage(F("Insert USB drive..."));
StatusScreen::setStatusMessage(GET_TEXTF(INSERT_MEDIA));
Sd2Card::usbStartup();
} else {
GOTO_SCREEN(FilesScreen);

View File

@ -33,22 +33,22 @@ using namespace Theme;
void StepperBumpSensitivityScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(0, BaseNumericAdjustmentScreen::DEFAULT_LOWEST);
w.heading( PSTR("TMC Bump Sensitivity"));
w.color(x_axis) .adjuster( 2, PSTR("X:"), getTMCBumpSensitivity(X),
w.heading( GET_TEXTF(HOME_SENSE));
w.color(x_axis) .adjuster( 2, GET_TEXTF(AXIS_X), getTMCBumpSensitivity(X),
#if X_SENSORLESS && AXIS_HAS_STALLGUARD(X)
true
#else
false
#endif
);
w.color(y_axis) .adjuster( 4, PSTR("Y:"), getTMCBumpSensitivity(Y),
w.color(y_axis) .adjuster( 4, GET_TEXTF(AXIS_Y), getTMCBumpSensitivity(Y),
#if Y_SENSORLESS && AXIS_HAS_STALLGUARD(Y)
true
#else
false
#endif
);
w.color(z_axis) .adjuster( 6, PSTR("Z:"), getTMCBumpSensitivity(Z),
w.color(z_axis) .adjuster( 6, GET_TEXTF(AXIS_Z), getTMCBumpSensitivity(Z),
#if Z_SENSORLESS && AXIS_HAS_STALLGUARD(Z)
true
#else

View File

@ -33,21 +33,21 @@ using namespace Theme;
void StepperCurrentScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(0);
w.units(PSTR("mA"));
w.heading( PSTR("Stepper Current"));
w.color(x_axis) .adjuster( 2, PSTR("X:"), getAxisCurrent_mA(X) );
w.color(y_axis) .adjuster( 4, PSTR("Y:"), getAxisCurrent_mA(Y) );
w.color(z_axis) .adjuster( 6, PSTR("Z:"), getAxisCurrent_mA(Z) );
w.units(GET_TEXTF(UNITS_MILLIAMP));
w.heading( GET_TEXTF(MOTOR_CURRENT));
w.color(x_axis) .adjuster( 2, GET_TEXTF(AXIS_X), getAxisCurrent_mA(X) );
w.color(y_axis) .adjuster( 4, GET_TEXTF(AXIS_Y), getAxisCurrent_mA(Y) );
w.color(z_axis) .adjuster( 6, GET_TEXTF(AXIS_Z), getAxisCurrent_mA(Z) );
#if EXTRUDERS == 1
w.color(e_axis).adjuster( 8, PSTR("E:"), getAxisCurrent_mA(E0) );
w.color(e_axis).adjuster( 8, GET_TEXTF(AXIS_E), getAxisCurrent_mA(E0) );
#elif EXTRUDERS > 1
w.color(e_axis).adjuster( 8, PSTR("E1:"), getAxisCurrent_mA(E0) );
w.color(e_axis).adjuster(10, PSTR("E2:"), getAxisCurrent_mA(E1) );
w.color(e_axis).adjuster( 8, GET_TEXTF(AXIS_E1), getAxisCurrent_mA(E0) );
w.color(e_axis).adjuster(10, GET_TEXTF(AXIS_E2), getAxisCurrent_mA(E1) );
#if EXTRUDERS > 2
w.color(e_axis).adjuster(12, PSTR("E3:"), getAxisCurrent_mA(E2) );
w.color(e_axis).adjuster(12, GET_TEXTF(AXIS_E3), getAxisCurrent_mA(E2) );
#endif
#if EXTRUDERS > 3
w.color(e_axis).adjuster(14, PSTR("E4:"), getAxisCurrent_mA(E3) );
w.color(e_axis).adjuster(14, GET_TEXTF(AXIS_E4), getAxisCurrent_mA(E3) );
#endif
#endif
w.increments();

View File

@ -33,21 +33,21 @@ using namespace Theme;
void StepsScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(0);
w.units(PSTR("st/mm"));
w.heading( PSTR("Steps/mm"));
w.color(x_axis) .adjuster( 2, PSTR("X:"), getAxisSteps_per_mm(X) );
w.color(y_axis) .adjuster( 4, PSTR("Y:"), getAxisSteps_per_mm(Y) );
w.color(z_axis) .adjuster( 6, PSTR("Z:"), getAxisSteps_per_mm(Z) );
w.units(GET_TEXTF(UNITS_STEP_MM));
w.heading( GET_TEXTF(STEPS_PER_MM));
w.color(x_axis) .adjuster( 2, GET_TEXTF(AXIS_X), getAxisSteps_per_mm(X) );
w.color(y_axis) .adjuster( 4, GET_TEXTF(AXIS_Y), getAxisSteps_per_mm(Y) );
w.color(z_axis) .adjuster( 6, GET_TEXTF(AXIS_Z), getAxisSteps_per_mm(Z) );
#if EXTRUDERS == 1 || DISABLED(DISTINCT_E_FACTORS)
w.color(e_axis) .adjuster( 8, PSTR("E:"), getAxisSteps_per_mm(E0) );
w.color(e_axis) .adjuster( 8, GET_TEXTF(AXIS_E), getAxisSteps_per_mm(E0) );
#elif EXTRUDERS > 1
w.color(e_axis) .adjuster( 8, PSTR("E1:"), getAxisSteps_per_mm(E0) );
w.color(e_axis) .adjuster(10, PSTR("E2:"), getAxisSteps_per_mm(E1) );
w.color(e_axis) .adjuster( 8, GET_TEXTF(AXIS_E1), getAxisSteps_per_mm(E0) );
w.color(e_axis) .adjuster(10, GET_TEXTF(AXIS_E2), getAxisSteps_per_mm(E1) );
#if EXTRUDERS > 2
w.color(e_axis) .adjuster(12, PSTR("E3:"), getAxisSteps_per_mm(E2) );
w.color(e_axis) .adjuster(12, GET_TEXTF(AXIS_E3), getAxisSteps_per_mm(E2) );
#endif
#if EXTRUDERS > 3
w.color(e_axis) .adjuster(14, PSTR("E4:"), getAxisSteps_per_mm(E3) );
w.color(e_axis) .adjuster(14, GET_TEXTF(AXIS_E4), getAxisSteps_per_mm(E3) );
#endif
#endif
w.increments();

View File

@ -32,36 +32,29 @@ using namespace ExtUI;
void TemperatureScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(0).color(temp).units(
PSTR(
#if defined(TOUCH_UI_USE_UTF8) && defined(TOUCH_UI_UTF8_WESTERN_CHARSET)
u8"°C"
#else
"C"
#endif
));
w.heading( PSTR("Temperature:"));
w.button(30, PSTR("Cooldown (All Off)"));
w.precision(0).color(temp).units(GET_TEXTF(UNITS_C));
w.heading(GET_TEXTF(TEMPERATURE));
w.button(30, GET_TEXTF(COOLDOWN));
#ifndef LULZBOT_DISABLE_TOOLHEAD_HEATER
#if HOTENDS == 1
w.adjuster( 2, PSTR("Hot End:"), getTargetTemp_celsius(E0));
w.adjuster( 2, GET_TEXTF(HOTEND), getTargetTemp_celsius(E0));
#else
w.adjuster( 2, PSTR("Hot End 1:"), getTargetTemp_celsius(E0));
w.adjuster( 4, PSTR("Hot End 2:"), getTargetTemp_celsius(E1));
w.adjuster( 2, GET_TEXTF(HOTEND1), getTargetTemp_celsius(E0));
w.adjuster( 4, GET_TEXTF(HOTEND2), getTargetTemp_celsius(E1));
#if HOTENDS > 2
w.adjuster( 6, PSTR("Hot End 3:"), getTargetTemp_celsius(E2));
w.adjuster( 6, GET_TEXTF(HOTEND3), getTargetTemp_celsius(E2));
#endif
#if HOTENDS > 3
w.adjuster( 8, PSTR("Hot End 4:"), getTargetTemp_celsius(E3));
w.adjuster( 8, GET_TEXTF(HOTEND4), getTargetTemp_celsius(E3));
#endif
#endif
#endif
#if HAS_HEATED_BED
w.adjuster( 20, PSTR("Bed:"), getTargetTemp_celsius(BED));
w.adjuster( 20, GET_TEXTF(BED), getTargetTemp_celsius(BED));
#endif
#if FAN_COUNT > 0
w.color(fan_speed).units(PSTR("%"));
w.adjuster( 10, PSTR("Fan Speed:"), getTargetFan_percent(FAN0));
w.color(fan_speed).units(GET_TEXTF(UNITS_PERCENT));
w.adjuster( 10, GET_TEXTF(FAN_SPEED), getTargetFan_percent(FAN0));
#endif
w.increments();
}

View File

@ -44,22 +44,9 @@ void TouchCalibrationScreen::onEntry() {
cmd.cmd(CMD_DLSTART)
.cmd(CLEAR_COLOR_RGB(bg_color))
.cmd(CLEAR(true,true,true))
.cmd(COLOR_RGB(bg_text_enabled))
#ifdef TOUCH_UI_PORTRAIT
.font(font_large)
.text ( BTN_POS(1,8), BTN_SIZE(4,1), F("Release to begin"))
.text ( BTN_POS(1,9), BTN_SIZE(4,1), F("screen calibration"))
#else
.font(
#ifdef TOUCH_UI_800x480
font_large
#else
font_medium
#endif
)
.text ( BTN_POS(1,1), BTN_SIZE(4,16), F("Release to calibrate"))
#endif
.cmd(DL::DL_DISPLAY)
.cmd(COLOR_RGB(bg_text_enabled));
draw_text_box(cmd, BTN_POS(1,1), BTN_SIZE(4,16), GET_TEXTF(TOUCH_CALIBRATION_START), OPT_CENTER, font_large);
cmd.cmd(DL::DL_DISPLAY)
.cmd(CMD_SWAP)
.execute();
@ -88,23 +75,10 @@ void TouchCalibrationScreen::onRedraw(draw_mode_t) {
CommandProcessor cmd;
cmd.cmd(CLEAR_COLOR_RGB(bg_color))
.cmd(CLEAR(true,true,true))
.cmd(COLOR_RGB(bg_text_enabled))
.cmd(COLOR_RGB(bg_text_enabled));
#ifdef TOUCH_UI_PORTRAIT
.font(font_large)
.text ( BTN_POS(1,8), BTN_SIZE(4,1), F("Touch the dots"))
.text ( BTN_POS(1,9), BTN_SIZE(4,1), F("to calibrate"))
#else
.font(
#ifdef TOUCH_UI_800x480
font_large
#else
font_medium
#endif
)
.text ( BTN_POS(1,1), BTN_SIZE(4,16), F("Touch the dots to calibrate"))
#endif
.cmd(CMD_CALIBRATE);
draw_text_box(cmd, BTN_POS(1,1), BTN_SIZE(4,16), GET_TEXTF(TOUCH_CALIBRATION_PROMPT), OPT_CENTER, font_large);
cmd.cmd(CMD_CALIBRATE);
}
void TouchCalibrationScreen::onIdle() {

View File

@ -52,79 +52,79 @@ void TuneMenu::onRedraw(draw_mode_t what) {
cmd.colors(normal_btn)
.font(font_medium)
#ifdef TOUCH_UI_PORTRAIT
.tag(2).enabled(1) .button( BTN_POS(1,1), BTN_SIZE(2,1), F("Temperature"))
.tag(3).enabled(!isPrinting()).button( BTN_POS(1,2), BTN_SIZE(2,1), F("Change Filament"))
.tag(2).enabled(1) .button( BTN_POS(1,1), BTN_SIZE(2,1), GET_TEXTF(TEMPERATURE))
.tag(3).enabled(!isPrinting()).button( BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXTF(CHANGE_FILAMENT))
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
.enabled(1)
#else
.enabled(0)
#endif
.tag(9).button( BTN_POS(1,3), BTN_SIZE(2,1), F("Filament Options"))
.tag(9).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXTF(FILAMENT))
#if ENABLED(BABYSTEPPING)
.tag(4).enabled(1) .button( BTN_POS(1,4), BTN_SIZE(2,1), F("Nudge Nozzle"))
.tag(4).enabled(1) .button( BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXTF(NUDGE_NOZZLE))
#else
#if HAS_BED_PROBE
.enabled(1)
#else
.enabled(0)
#endif
.tag(4) .button( BTN_POS(1,4), BTN_SIZE(2,1), F("Adjust Z-Offset"))
.tag(4) .button( BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXTF(ZPROBE_ZOFFSET))
#endif
.tag(5).enabled(1) .button( BTN_POS(1,5), BTN_SIZE(2,1), F("Print Speed"))
.tag(5).enabled(1) .button( BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXTF(PRINT_SPEED))
.tag(isPrintingFromMediaPaused() ? 7 : 6)
#if ENABLED(SDSUPPORT)
.enabled(isPrintingFromMedia())
#else
.enabled(0)
#endif
.button( BTN_POS(1,6), BTN_SIZE(2,1), isPrintingFromMediaPaused() ? F("Resume Print") : F("Pause Print"))
.button( BTN_POS(1,6), BTN_SIZE(2,1), isPrintingFromMediaPaused() ? GET_TEXTF(RESUME_PRINT) : GET_TEXTF(PAUSE_PRINT))
#if ENABLED(SDSUPPORT)
.enabled(isPrintingFromMedia())
#else
.enabled(0)
#endif
.tag(8) .button( BTN_POS(1,7), BTN_SIZE(2,1), F("Cancel Print"))
.tag(8) .button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXTF(STOP_PRINT))
.tag(1).colors(action_btn)
.button( BTN_POS(1,8), BTN_SIZE(2,1), F("Back"));
.button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXTF(BACK));
#else // TOUCH_UI_PORTRAIT
.tag(2).enabled(1) .button( BTN_POS(1,1), BTN_SIZE(1,1), F("Temperature"))
.tag(3).enabled(!isPrinting()).button( BTN_POS(1,2), BTN_SIZE(1,1), F("Change Filament"))
.tag(2).enabled(1) .button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXTF(TEMPERATURE))
.tag(3).enabled(!isPrinting()).button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXTF(CHANGE_FILAMENT))
#if ENABLED(BABYSTEPPING)
.enabled(1)
#else
.enabled(0)
#endif
#if ENABLED(BABYSTEPPING)
.tag(4) .button( BTN_POS(2,1), BTN_SIZE(1,1), F("Nudge Nozzle"))
.tag(4) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXTF(NUDGE_NOZZLE))
#else
#if HAS_BED_PROBE
.enabled(1)
#else
.enabled(0)
#endif
.tag(4) .button( BTN_POS(1,4), BTN_SIZE(2,1), F("Adjust Z-Offset"))
.tag(4) .button( BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXTF(ZPROBE_ZOFFSET))
#endif
.tag(5).enabled(1) .button( BTN_POS(2,2), BTN_SIZE(1,1), F("Print Speed"))
.tag(5).enabled(1) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXTF(PRINT_SPEED))
.tag(isPrintingFromMediaPaused() ? 7 : 6)
#if ENABLED(SDSUPPORT)
.enabled(isPrintingFromMedia())
#else
.enabled(0)
#endif
.button( BTN_POS(1,3), BTN_SIZE(1,1), isPrintingFromMediaPaused() ? F("Resume Print") : F("Pause Print"))
.button( BTN_POS(1,3), BTN_SIZE(1,1), isPrintingFromMediaPaused() ? GET_TEXTF(RESUME_PRINT) : GET_TEXTF(PAUSE_PRINT))
#if ENABLED(SDSUPPORT)
.enabled(isPrintingFromMedia())
#else
.enabled(0)
#endif
.tag(8). button( BTN_POS(2,3), BTN_SIZE(1,1), F("Cancel Print"))
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
.tag(8). button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXTF(STOP_PRINT))
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
.enabled(1)
#else
.enabled(0)
#endif
.tag(9).button( BTN_POS(1,4), BTN_SIZE(1,1), F("Filament Options"))
.tag(1).colors(action_btn) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Back"));
.tag(9).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXTF(FILAMENT))
.tag(1).colors(action_btn) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXTF(BACK));
#endif
}
#undef GRID_COLS

View File

@ -32,10 +32,10 @@ using namespace Theme;
void ZOffsetScreen::onRedraw(draw_mode_t what) {
widgets_t w(what);
w.precision(2, BaseNumericAdjustmentScreen::DEFAULT_MIDRANGE).units(PSTR("mm"));
w.precision(2, BaseNumericAdjustmentScreen::DEFAULT_MIDRANGE).units(GET_TEXTF(UNITS_MM));
w.heading( PSTR("Z Offset"));
w.color(z_axis).adjuster(4, PSTR("Z Offset:"), getZOffset_mm());
w.heading( GET_TEXTF(ZPROBE_ZOFFSET));
w.color(z_axis).adjuster(4, GET_TEXTF(ZPROBE_ZOFFSET), getZOffset_mm());
w.increments();
}

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1215,6 +1215,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1214,6 +1214,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1215,6 +1215,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1219,6 +1219,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

View File

@ -1211,6 +1211,13 @@
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif
// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT
// Enable support for selection of languages at run-time
// (otherwise will use the value of LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU
// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE

Some files were not shown because too many files have changed in this diff Show More