Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin into bugfix-2.0.x

This commit is contained in:
Bob-the-Kuhn
2019-04-25 12:06:01 -05:00
154 changed files with 1156 additions and 525 deletions

View File

@ -1038,9 +1038,7 @@ void MarlinUI::draw_status_screen() {
}
void draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string, PGM_P const suff) {
SETCURSOR(0, 0); lcd_put_u8str_P(pref);
if (string) wrap_string(1, string);
if (suff) lcd_put_u8str_P(suff);
ui.draw_select_screen_prompt(pref, string, suff);
SETCURSOR(0, LCD_HEIGHT - 1);
lcd_put_wchar(yesno ? ' ' : '['); lcd_put_u8str_P(no); lcd_put_wchar(yesno ? ' ' : ']');
SETCURSOR_RJ(utf8_strlen_P(yes) + 2, LCD_HEIGHT - 1);

View File

@ -94,3 +94,16 @@ public:
: U8GLIB(&u8g_dev_tft_320x240_upscale_from_128x64, cs, rs, reset)
{ }
};
extern u8g_dev_t u8g_dev_uc1701_mini12864_HAL_2x_sw_spi, u8g_dev_uc1701_mini12864_HAL_2x_hw_spi;
class U8GLIB_MINI12864_2X_HAL : public U8GLIB {
public:
U8GLIB_MINI12864_2X_HAL(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
: U8GLIB(&u8g_dev_uc1701_mini12864_HAL_2x_sw_spi, sck, mosi, cs, a0, reset)
{ }
U8GLIB_MINI12864_2X_HAL(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE)
: U8GLIB(&u8g_dev_uc1701_mini12864_HAL_2x_hw_spi, cs, a0, reset)
{ }
};

View File

@ -158,9 +158,7 @@ void ST7920_Lite_Status_Screen::entry_mode_select(const bool ac_increase, const
// function for scroll_or_addr_select()
void ST7920_Lite_Status_Screen::_scroll_or_addr_select(const bool sa) {
extended_function_set(true);
cmd(0b00100010 |
(sa ? 0b000001 : 0)
);
cmd(0b00000010 | (sa ? 0b00000001 : 0));
current_bits.sa = sa;
}
@ -907,34 +905,6 @@ void ST7920_Lite_Status_Screen::clear_text_buffer() {
ncs();
}
#if ENABLED(U8GLIB_ST7920) && !defined(U8G_HAL_LINKS) && !defined(__SAM3X8E__)
#include "ultralcd_st7920_u8glib_rrd_AVR.h"
void ST7920_Lite_Status_Screen::cs() {
ST7920_CS();
current_bits.synced = false;
}
void ST7920_Lite_Status_Screen::ncs() {
ST7920_NCS();
current_bits.synced = false;
}
void ST7920_Lite_Status_Screen::sync_cmd() {
ST7920_SET_CMD();
}
void ST7920_Lite_Status_Screen::sync_dat() {
ST7920_SET_DAT();
}
void ST7920_Lite_Status_Screen::write_byte(const uint8_t data) {
ST7920_WRITE_BYTE(data);
}
#endif
void MarlinUI::draw_status_screen() {
ST7920_Lite_Status_Screen::update(false);
}

View File

@ -15,6 +15,8 @@
*/
#pragma once
#include "../../HAL/shared/HAL_ST7920.h"
#include "../../core/macros.h"
#include "../../libs/duration_t.h"
@ -28,11 +30,11 @@ class ST7920_Lite_Status_Screen {
uint8_t sa : 1;
} current_bits;
static void cs();
static void ncs();
static void sync_cmd();
static void sync_dat();
static void write_byte(const uint8_t w);
static void cs() { ST7920_cs(); current_bits.synced = false; }
static void ncs() { ST7920_cs(); current_bits.synced = false; }
static void sync_cmd() { ST7920_set_cmd(); }
static void sync_dat() { ST7920_set_dat(); }
static void write_byte(const uint8_t w) { ST7920_write_byte(w); }
FORCE_INLINE static void write_word(const uint16_t w) {
write_byte((w >> 8) & 0xFF);

View File

@ -66,42 +66,47 @@
#define PAGE_HEIGHT 8
static const uint8_t u8g_dev_uc1701_mini12864_HAL_init_seq[] PROGMEM = {
U8G_ESC_CS(0), /* disable chip */
U8G_ESC_ADR(0), /* instruction mode */
U8G_ESC_RST(1), /* do reset low pulse with (1*16)+2 milliseconds */
U8G_ESC_CS(1), /* enable chip */
U8G_ESC_CS(0), /* disable chip */
U8G_ESC_ADR(0), /* instruction mode */
U8G_ESC_RST(1), /* do reset low pulse with (1*16)+2 milliseconds */
U8G_ESC_CS(1), /* enable chip */
0x0E2, /* soft reset */
0x040, /* set display start line to 0 */
0x0A0, /* ADC set to reverse */
0x0C8, /* common output mode */
0x0A6, /* display normal, bit val 0: LCD pixel off. */
0x0A2, /* LCD bias 1/9 */
0x02F, /* all power control circuits on */
0x0F8, /* set booster ratio to */
0x000, /* 4x */
0x023, /* set V0 voltage resistor ratio to large */
0x081, /* set contrast */
0x027, /* contrast value */
0x0AC, /* indicator */
0x000, /* disable */
0x0AF, /* display on */
0x0E2, /* soft reset */
0x040, /* set display start line to 0 */
0x0A0, /* ADC set to reverse */
0x0C8, /* common output mode */
0x0A6, /* display normal, bit val 0: LCD pixel off. */
0x0A2, /* LCD bias 1/9 */
0x02F, /* all power control circuits on */
0x0F8, /* set booster ratio to */
0x000, /* 4x */
0x023, /* set V0 voltage resistor ratio to large */
0x081, /* set contrast */
0x027, /* contrast value */
0x0AC, /* indicator */
0x000, /* disable */
0x0AF, /* display on */
U8G_ESC_DLY(100), /* delay 100 ms */
0x0A5, /* display all points, ST7565 */
U8G_ESC_DLY(100), /* delay 100 ms */
U8G_ESC_DLY(100), /* delay 100 ms */
0x0A4, /* normal display */
U8G_ESC_CS(0), /* disable chip */
U8G_ESC_END /* end of sequence */
U8G_ESC_CS(0), /* disable chip */
U8G_ESC_DLY(100), /* delay 100 ms */
U8G_ESC_CS(1), /* enable chip */
0x0A5, /* display all points, ST7565 */
U8G_ESC_CS(0), /* disable chip */
U8G_ESC_DLY(100), /* delay 100 ms */
U8G_ESC_DLY(100), /* delay 100 ms */
U8G_ESC_CS(1), /* enable chip */
0x0A4, /* normal display */
U8G_ESC_CS(0), /* disable chip */
U8G_ESC_END /* end of sequence */
};
static const uint8_t u8g_dev_uc1701_mini12864_HAL_data_start[] PROGMEM = {
U8G_ESC_ADR(0), /* instruction mode */
U8G_ESC_CS(1), /* enable chip */
0x010, /* set upper 4 bit of the col adr to 0 */
0x000, /* set lower 4 bit of the col adr to 4 */
U8G_ESC_END /* end of sequence */
U8G_ESC_ADR(0), /* instruction mode */
U8G_ESC_CS(1), /* enable chip */
0x010, /* set upper 4 bit of the col adr to 0 */
0x000, /* set lower 4 bit of the col adr to 4 */
U8G_ESC_END /* end of sequence */
};
uint8_t u8g_dev_uc1701_mini12864_HAL_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {

View File

@ -175,14 +175,14 @@ void MarlinUI::set_font(const MarlinFont font_nr) {
// Can the text fit to the right of the bitmap?
if (text_max_width < rspace) {
constexpr uint8_t inter = (width - text_max_width - (START_BMPWIDTH)) / 3; // Evenly distribute horizontal space
constexpr int8_t inter = (width - text_max_width - (START_BMPWIDTH)) / 3; // Evenly distribute horizontal space
offx = inter; // First the boot logo...
offy = (height - (START_BMPHEIGHT)) / 2; // ...V-aligned in the full height
txt_offx_1 = txt_offx_2 = inter + (START_BMPWIDTH) + inter; // Text right of the bitmap
txt_base = (height + MENU_FONT_ASCENT + text_total_height - (MENU_FONT_HEIGHT)) / 2; // Text vertical center
}
else {
constexpr uint8_t inter = (height - text_total_height - (START_BMPHEIGHT)) / 3; // Evenly distribute vertical space
constexpr int8_t inter = (height - text_total_height - (START_BMPHEIGHT)) / 3; // Evenly distribute vertical space
offy = inter; // V-align boot logo proportionally
offx = rspace / 2; // Center the boot logo in the whole space
txt_offx_1 = (width - text_width_1) / 2; // Text 1 centered
@ -439,9 +439,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
}
void draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string, PGM_P const suff) {
SETCURSOR(0, 0); lcd_put_u8str_P(pref);
if (string) wrap_string(1, string);
if (suff) lcd_put_u8str_P(suff);
ui.draw_select_screen_prompt(pref, string, suff);
draw_boxed_string(1, LCD_HEIGHT - 1, no, !yesno);
draw_boxed_string(LCD_WIDTH - (utf8_strlen_P(yes) + 1), LCD_HEIGHT - 1, yes, yesno);
}

View File

@ -111,8 +111,8 @@
// The MINIPanel display
//#define U8G_CLASS U8GLIB_MINI12864
//#define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // 8 stripes
#define U8G_CLASS U8GLIB_MINI12864_2X
#if EITHER(FYSETC_MINI_12864, TARGET_LPC1768)
#define U8G_CLASS U8GLIB_MINI12864_2X_HAL
#if BOTH(FYSETC_MINI_12864, FORCE_SOFT_SPI)
#define U8G_PARAM DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0 // 4 stripes SW-SPI
#else
#define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // 4 stripes HW-SPI

View File

@ -134,4 +134,13 @@ u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn, &u8g
#pragma GCC reset_options
#if ENABLED(LIGHTWEIGHT_UI)
#include "../../HAL/shared/HAL_ST7920.h"
void ST7920_cs() { ST7920_CS(); }
void ST7920_ncs() { ST7920_NCS(); }
void ST7920_set_cmd() { ST7920_SET_CMD(); }
void ST7920_set_dat() { ST7920_SET_DAT(); }
void ST7920_write_byte(const uint8_t val) { ST7920_WRITE_BYTE(val); }
#endif
#endif // U8GLIB_ST7920 && !U8G_HAL_LINKS && !__SAM3X8E__

View File

@ -332,9 +332,11 @@
#define MSG_ENDSTOP_ABORT _UxGT("Endstopp Abbr.")
#define MSG_HEATING_FAILED_LCD _UxGT("HEIZEN ERFOLGLOS")
#define MSG_HEATING_FAILED_LCD_BED _UxGT("Bett heizen fehlge.")
#define MSG_HEATING_FAILED_LCD_CHAMBER _UxGT("Geh. heizen fehlge.")
#define MSG_ERR_REDUNDANT_TEMP _UxGT("REDUND. TEMP-ABWEI.")
#define MSG_THERMAL_RUNAWAY LCD_STR_THERMOMETER _UxGT(" NICHT ERREICHT")
#define MSG_THERMAL_RUNAWAY_BED _UxGT("BETT") MSG_THERMAL_RUNAWAY
#define MSG_THERMAL_RUNAWAY_CHAMBER _UxGT("GEH.") MSG_THERMAL_RUNAWAY
#define MSG_ERR_MAXTEMP LCD_STR_THERMOMETER _UxGT(" ÜBERSCHRITTEN")
#define MSG_ERR_MINTEMP LCD_STR_THERMOMETER _UxGT(" UNTERSCHRITTEN")
#define MSG_ERR_MAXTEMP_BED _UxGT("BETT ") LCD_STR_THERMOMETER _UxGT(" ÜBERSCHRITTEN")

View File

@ -753,12 +753,27 @@
#ifndef MSG_START_PRINT
#define MSG_START_PRINT _UxGT("Start print")
#endif
#ifndef MSG_BUTTON_NEXT
#define MSG_BUTTON_NEXT _UxGT("Next")
#endif
#ifndef MSG_BUTTON_INIT
#define MSG_BUTTON_INIT _UxGT("Init")
#endif
#ifndef MSG_BUTTON_STOP
#define MSG_BUTTON_STOP _UxGT("Stop")
#endif
#ifndef MSG_BUTTON_PRINT
#define MSG_BUTTON_PRINT _UxGT("Print")
#endif
#ifndef MSG_BUTTON_RESET
#define MSG_BUTTON_RESET _UxGT("Reset")
#endif
#ifndef MSG_BUTTON_CANCEL
#define MSG_BUTTON_CANCEL _UxGT("Cancel")
#endif
#ifndef MSG_BUTTON_DONE
#define MSG_BUTTON_DONE _UxGT("Done")
#endif
#ifndef MSG_PAUSE_PRINT
#define MSG_PAUSE_PRINT _UxGT("Pause print")
#endif
@ -930,6 +945,9 @@
#ifndef MSG_HEATING_FAILED_LCD_BED
#define MSG_HEATING_FAILED_LCD_BED _UxGT("Bed heating failed")
#endif
#ifndef MSG_HEATING_FAILED_LCD_CHAMBER
#define MSG_HEATING_FAILED_LCD_CHAMBER _UxGT("Chamber heating fail")
#endif
#ifndef MSG_ERR_REDUNDANT_TEMP
#define MSG_ERR_REDUNDANT_TEMP _UxGT("Err: REDUNDANT TEMP")
#endif
@ -939,6 +957,9 @@
#ifndef MSG_THERMAL_RUNAWAY_BED
#define MSG_THERMAL_RUNAWAY_BED _UxGT("BED THERMAL RUNAWAY")
#endif
#ifndef MSG_THERMAL_RUNAWAY_CHAMBER
#define MSG_THERMAL_RUNAWAY_CHAMBER _UxGT("CHAMBER T. RUNAWAY")
#endif
#ifndef MSG_ERR_MAXTEMP
#define MSG_ERR_MAXTEMP _UxGT("Err: MAXTEMP")
#endif

View File

@ -33,19 +33,25 @@
#define CHARSIZE 2
#define WELCOME_MSG MACHINE_NAME _UxGT(" prête.")
#define MSG_YES _UxGT("Oui")
#define MSG_NO _UxGT("Non")
#define MSG_BACK _UxGT("Retour")
#define MSG_SD_INSERTED _UxGT("Carte insérée")
#define MSG_SD_REMOVED _UxGT("Carte retirée")
#define MSG_LCD_ENDSTOPS _UxGT("Butées") // Max length 8 characters
#define MSG_LCD_ENDSTOPS _UxGT("Butées")
#define MSG_LCD_SOFT_ENDSTOPS _UxGT("Butées SW")
#define MSG_MAIN _UxGT("Menu principal")
#define MSG_AUTOSTART _UxGT("Demarrage auto")
#define MSG_ADVANCED_SETTINGS _UxGT("Config. avancée")
#define MSG_CONFIGURATION _UxGT("Configuration")
#define MSG_AUTOSTART _UxGT("Exéc. auto#.gcode")
#define MSG_DISABLE_STEPPERS _UxGT("Arrêter moteurs")
#define MSG_DEBUG_MENU _UxGT("Menu debug")
#define MSG_PROGRESS_BAR_TEST _UxGT("Test barre progress.")
#define MSG_AUTO_HOME _UxGT("Origine auto.")
#define MSG_AUTO_HOME_X _UxGT("Origine X Auto.")
#define MSG_AUTO_HOME_Y _UxGT("Origine Y Auto.")
#define MSG_AUTO_HOME_Z _UxGT("Origine Z Auto.")
#define MSG_AUTO_HOME_X _UxGT("Origine X auto.")
#define MSG_AUTO_HOME_Y _UxGT("Origine Y auto.")
#define MSG_AUTO_HOME_Z _UxGT("Origine Z auto.")
#define MSG_AUTO_Z_ALIGN _UxGT("Align. Z auto.")
#define MSG_LEVEL_BED_HOMING _UxGT("Origine XYZ")
#define MSG_LEVEL_BED_WAITING _UxGT("Clic pour commencer")
#define MSG_LEVEL_BED_NEXT_POINT _UxGT("Point suivant")
@ -59,14 +65,20 @@
#define MSG_PREHEAT_1_ALL _UxGT("Préch. " PREHEAT_1_LABEL " Tout")
#define MSG_PREHEAT_1_END MSG_PREHEAT_1 _UxGT(" buse")
#define MSG_PREHEAT_1_BEDONLY _UxGT("Préch. " PREHEAT_1_LABEL " lit")
#define MSG_PREHEAT_1_SETTINGS _UxGT("Régl. prech. " PREHEAT_1_LABEL)
#define MSG_PREHEAT_1_SETTINGS _UxGT("Régl. préch. " PREHEAT_1_LABEL)
#define MSG_PREHEAT_2 _UxGT("Préchauffage " PREHEAT_2_LABEL)
#define MSG_PREHEAT_2_N _UxGT("Préchauff. " PREHEAT_2_LABEL " ")
#define MSG_PREHEAT_2_ALL _UxGT("Préch. " PREHEAT_2_LABEL " Tout")
#define MSG_PREHEAT_2_END MSG_PREHEAT_2 _UxGT(" buse")
#define MSG_PREHEAT_2_BEDONLY _UxGT("Préch. " PREHEAT_2_LABEL " lit")
#define MSG_PREHEAT_2_SETTINGS _UxGT("Régl. prech. " PREHEAT_2_LABEL)
#define MSG_PREHEAT_2_SETTINGS _UxGT("Régl. préch. " PREHEAT_2_LABEL)
#define MSG_PREHEAT_CUSTOM _UxGT("Préchauff. perso.")
#define MSG_COOLDOWN _UxGT("Refroidir")
#define MSG_LASER_MENU _UxGT("Contrôle Laser")
#define MSG_LASER_OFF _UxGT("Laser Off")
#define MSG_LASER_ON _UxGT("Laser On")
#define MSG_LASER_POWER _UxGT("Puissance")
#define MSG_SPINDLE_REVERSE _UxGT("Inverser broches")
#define MSG_SWITCH_PS_ON _UxGT("Allumer alim.")
#define MSG_SWITCH_PS_OFF _UxGT("Eteindre alim.")
#define MSG_EXTRUDE _UxGT("Extrusion")
@ -77,12 +89,24 @@
#define MSG_LEVEL_CORNERS _UxGT("Niveau coins")
#define MSG_NEXT_CORNER _UxGT("Coin suivant")
#define MSG_EDITING_STOPPED _UxGT("Arrêt édit. maillage")
#define MSG_USER_MENU _UxGT("Commandes perso")
#define MSG_MESH_X _UxGT("Index X")
#define MSG_MESH_Y _UxGT("Index Y")
#define MSG_MESH_EDIT_Z _UxGT("Valeur Z")
#define MSG_USER_MENU _UxGT("Commandes perso.")
#define MSG_UBL_DOING_G29 _UxGT("G29 en cours")
#define MSG_UBL_UNHOMED _UxGT("Origine XYZ d'abord")
#define MSG_UBL_TOOLS _UxGT("Outils UBL")
#define MSG_UBL_LEVEL_BED _UxGT("Niveau lit unifié")
#define MSG_IDEX_MENU _UxGT("Mode IDEX")
#define MSG_IDEX_MODE_AUTOPARK _UxGT("Auto-Park")
#define MSG_IDEX_MODE_DUPLICATE _UxGT("Duplication")
#define MSG_IDEX_MODE_MIRRORED_COPY _UxGT("Copie miroir")
#define MSG_IDEX_MODE_FULL_CTRL _UxGT("Contrôle complet")
#define MSG_OFFSETS_MENU _UxGT("Offsets Outil")
#define MSG_X_OFFSET _UxGT("Buse 2 X")
#define MSG_Y_OFFSET _UxGT("Buse 2 Y")
#define MSG_Z_OFFSET _UxGT("Buse 2 Z")
#define MSG_UBL_MANUAL_MESH _UxGT("Maillage manuel")
#define MSG_UBL_BC_INSERT _UxGT("Poser câle & mesurer")
#define MSG_UBL_BC_INSERT2 _UxGT("Mesure")
@ -167,6 +191,7 @@
#define MSG_MOVE_Y _UxGT("Dépl. Y")
#define MSG_MOVE_Z _UxGT("Dépl. Z")
#define MSG_MOVE_E _UxGT("Extrudeur")
#define MSG_HOTEND_TOO_COLD _UxGT("Buse trop froide")
#define MSG_MOVE_01MM _UxGT("Dépl. 0.1mm")
#define MSG_MOVE_1MM _UxGT("Dépl. 1mm")
#define MSG_MOVE_10MM _UxGT("Dépl. 10mm")
@ -174,6 +199,7 @@
#define MSG_BED_Z _UxGT("Lit Z")
#define MSG_NOZZLE _UxGT("Buse")
#define MSG_BED _UxGT("Lit")
#define MSG_CHAMBER _UxGT("Caisson")
#define MSG_FAN_SPEED _UxGT("Vitesse ventil.")
#define MSG_EXTRA_FAN_SPEED _UxGT("Extra V ventil.")
@ -203,6 +229,7 @@
#endif
#define MSG_VE_JERK _UxGT("Ve jerk")
#define MSG_VELOCITY _UxGT("Vélocité")
#define MSG_JUNCTION_DEVIATION _UxGT("Déviat. jonct.")
#define MSG_VMAX _UxGT("Vmax ")
#define MSG_VMIN _UxGT("Vmin ")
#define MSG_VTRAV_MIN _UxGT("V dépl. min")
@ -240,19 +267,26 @@
#define MSG_LOAD_EEPROM _UxGT("Lire config")
#define MSG_RESTORE_FAILSAFE _UxGT("Restaurer défauts")
#define MSG_INIT_EEPROM _UxGT("Initialiser EEPROM")
#define MSG_SD_UPDATE _UxGT("MàJ. SD")
#define MSG_RESET_PRINTER _UxGT("RàZ. imprimante")
#define MSG_REFRESH _UxGT("Actualiser")
#define MSG_WATCH _UxGT("Surveiller")
#define MSG_PREPARE _UxGT("Préparer")
#define MSG_TUNE _UxGT("Régler")
#define MSG_START_PRINT _UxGT("Démarrer Impr.")
#define MSG_BUTTON_PRINT _UxGT("Imprimer")
#define MSG_BUTTON_CANCEL _UxGT("Annuler")
#define MSG_PAUSE_PRINT _UxGT("Interrompre impr.")
#define MSG_RESUME_PRINT _UxGT("Reprendre impr.")
#define MSG_STOP_PRINT _UxGT("Arrêter impr.")
#define MSG_OUTAGE_RECOVERY _UxGT("Récupér. coupure")
#define MSG_CARD_MENU _UxGT("Impr. depuis SD")
#define MSG_NO_CARD _UxGT("Pas de carte")
#define MSG_DWELL _UxGT("Repos...")
#define MSG_USERWAIT _UxGT("Atten. de l'util.")
#define MSG_USERWAIT _UxGT("Attente utilis.")
#define MSG_PRINT_PAUSED _UxGT("Impr. en pause")
#define MSG_PRINT_ABORTED _UxGT("Impr. Annulée")
#define MSG_PRINTING _UxGT("Impression")
#define MSG_PRINT_ABORTED _UxGT("Impr. annulée")
#define MSG_NO_MOVE _UxGT("Moteurs bloqués.")
#define MSG_KILLED _UxGT("MORT.")
#define MSG_STOPPED _UxGT("STOPPÉ.")
@ -264,34 +298,50 @@
#define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("Ech. Rappel mm")
#define MSG_CONTROL_RETRACT_RECOVERF _UxGT("Rappel V")
#define MSG_CONTROL_RETRACT_RECOVER_SWAPF _UxGT("Ech. Rappel V")
#define MSG_AUTORETRACT _UxGT("Retrait. Auto.")
#define MSG_AUTORETRACT _UxGT("Retrait auto.")
#define MSG_TOOL_CHANGE _UxGT("Changement outil")
#define MSG_TOOL_CHANGE_ZLIFT _UxGT("Augmenter Z")
#define MSG_SINGLENOZZLE_PRIME_SPD _UxGT("Vitesse primaire")
#define MSG_SINGLENOZZLE_RETRACT_SPD _UxGT("Vitesse retrait")
#define MSG_NOZZLE_STANDBY _UxGT("Attente buse")
#define MSG_FILAMENT_SWAP_LENGTH _UxGT("Distance retrait")
#define MSG_FILAMENTCHANGE _UxGT("Changer filament")
#define MSG_FILAMENTLOAD _UxGT("Charger fil.")
#define MSG_FILAMENTUNLOAD _UxGT("Décharger fil.")
#define MSG_FILAMENTUNLOAD_ALL _UxGT("Décharger tout")
#define MSG_INIT_SDCARD _UxGT("Init. la carte SD")
#define MSG_CHANGE_SDCARD _UxGT("Changer de carte")
#define MSG_ZPROBE_OUT _UxGT("Z sonde hors lit")
#define MSG_ZPROBE_OUT _UxGT("Sonde Z hors lit")
#define MSG_SKEW_FACTOR _UxGT("Facteur écart")
#define MSG_BLTOUCH _UxGT("BLTouch")
#define MSG_BLTOUCH_SELFTEST _UxGT("Autotest BLTouch")
#define MSG_BLTOUCH_RESET _UxGT("RaZ BLTouch")
#define MSG_BLTOUCH_DEPLOY _UxGT("Déployer BLTouch")
#define MSG_BLTOUCH_SW_MODE _UxGT("Mode BLTouch SW")
#define MSG_BLTOUCH_5V_MODE _UxGT("Mode BLTouch 5V")
#define MSG_BLTOUCH_OD_MODE _UxGT("Mode BLTouch OD")
#define MSG_BLTOUCH_STOW _UxGT("Ranger BLTouch")
#define MSG_MANUAL_DEPLOY _UxGT("Déployer Sonde Z")
#define MSG_MANUAL_STOW _UxGT("Ranger Sonde Z")
#define MSG_HOME _UxGT("Origine") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST
#define MSG_FIRST _UxGT("Premier")
#define MSG_ZPROBE_ZOFFSET _UxGT("Décalage Z")
#define MSG_BABYSTEP_X _UxGT("Babystep X")
#define MSG_BABYSTEP_Y _UxGT("Babystep Y")
#define MSG_BABYSTEP_Z _UxGT("Babystep Z")
#define MSG_BABYSTEP_TOTAL _UxGT("Total")
#define MSG_ENDSTOP_ABORT _UxGT("Butée abandon")
#define MSG_HEATING_FAILED_LCD _UxGT("Erreur de chauffe")
#define MSG_HEATING_FAILED_LCD_BED _UxGT("Erreur de chauffe lit")
#define MSG_ERR_REDUNDANT_TEMP _UxGT("Err: TEMP. REDONDANTE")
#define MSG_THERMAL_RUNAWAY _UxGT("EMBALLEMENT THERM.")
#define MSG_THERMAL_RUNAWAY_BED _UxGT("ERREUR THERMIQUE LIT")
#define MSG_ERR_MAXTEMP _UxGT("Err: TEMP. MAX")
#define MSG_ERR_MINTEMP _UxGT("Err: TEMP. MIN")
#define MSG_ERR_MAXTEMP_BED _UxGT("Err: TEMP. MAX LIT")
#define MSG_ERR_MINTEMP_BED _UxGT("Err: TEMP. MIN LIT")
#define MSG_ERR_MAXTEMP_CHAMBER _UxGT("Err: MAXTEMP CAISSON")
#define MSG_ERR_MINTEMP_CHAMBER _UxGT("Err: MINTEMP CAISSON")
#define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST
#define MSG_HALTED _UxGT("IMPR. STOPPÉE")
@ -301,7 +351,9 @@
#define MSG_SHORT_MINUTE _UxGT("m") // One character only
#define MSG_HEATING _UxGT("En chauffe...")
#define MSG_COOLING _UxGT("Refroidissement")
#define MSG_BED_HEATING _UxGT("Lit en chauffe...")
#define MSG_BED_COOLING _UxGT("Refroid. du lit...")
#define MSG_DELTA_CALIBRATE _UxGT("Calibration Delta")
#define MSG_DELTA_CALIBRATE_X _UxGT("Calibrer X")
#define MSG_DELTA_CALIBRATE_Y _UxGT("Calibrer Y")
@ -310,6 +362,7 @@
#define MSG_DELTA_SETTINGS _UxGT("Réglages Delta")
#define MSG_DELTA_AUTO_CALIBRATE _UxGT("Calibration Auto")
#define MSG_DELTA_HEIGHT_CALIBRATE _UxGT("Hauteur Delta")
#define MSG_DELTA_Z_OFFSET_CALIBRATE _UxGT("Delta Z sonde")
#define MSG_DELTA_DIAG_ROD _UxGT("Diagonale")
#define MSG_DELTA_HEIGHT _UxGT("Hauteur")
#define MSG_DELTA_RADIUS _UxGT("Rayon")
@ -323,9 +376,9 @@
#define MSG_MESH_LEVELING _UxGT("Niveau maillage")
#define MSG_INFO_STATS_MENU _UxGT("Stats. imprimante")
#define MSG_INFO_BOARD_MENU _UxGT("Infos carte")
#define MSG_INFO_THERMISTOR_MENU _UxGT("Thermistors")
#define MSG_INFO_THERMISTOR_MENU _UxGT("Thermistances")
#define MSG_INFO_EXTRUDERS _UxGT("Extrudeurs")
#define MSG_INFO_BAUDRATE _UxGT("Baud")
#define MSG_INFO_BAUDRATE _UxGT("Bauds")
#define MSG_INFO_PROTOCOL _UxGT("Protocole")
#define MSG_CASE_LIGHT _UxGT("Lumière caisson")
#define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("Luminosité")
@ -358,35 +411,109 @@
#define MSG_FILAMENT_CHANGE_OPTION_PURGE _UxGT("Purger encore")
#define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Reprendre impr.")
#define MSG_FILAMENT_CHANGE_NOZZLE _UxGT(" Buse: ")
#define MSG_RUNOUT_SENSOR _UxGT("Capteur Fil.")
#define MSG_ERR_HOMING_FAILED _UxGT("Echec origine")
#define MSG_ERR_PROBING_FAILED _UxGT("Echec sonde")
#define MSG_M600_TOO_COLD _UxGT("M600: Trop froid")
#define MSG_MMU2_FILAMENT_CHANGE_HEADER _UxGT("CHANGER FILAMENT")
#define MSG_MMU2_CHOOSE_FILAMENT_HEADER _UxGT("CHOISIR FILAMENT")
#define MSG_MMU2_MENU _UxGT("MMU")
#define MSG_MMU2_WRONG_FIRMWARE _UxGT("Update MMU firmware!")
#define MSG_MMU2_NOT_RESPONDING _UxGT("MMU ne répond plus")
#define MSG_MMU2_RESUME _UxGT("Continuer impr.")
#define MSG_MMU2_RESUMING _UxGT("Reprise...")
#define MSG_MMU2_LOAD_FILAMENT _UxGT("Charger filament")
#define MSG_MMU2_LOAD_ALL _UxGT("Charger tous")
#define MSG_MMU2_LOAD_TO_NOZZLE _UxGT("Charger dans buse")
#define MSG_MMU2_EJECT_FILAMENT _UxGT("Ejecter filament")
#define MSG_MMU2_EJECT_FILAMENT0 _UxGT("Ejecter fil. 1")
#define MSG_MMU2_EJECT_FILAMENT1 _UxGT("Ejecter fil. 2")
#define MSG_MMU2_EJECT_FILAMENT2 _UxGT("Ejecter fil. 3")
#define MSG_MMU2_EJECT_FILAMENT3 _UxGT("Ejecter fil. 4")
#define MSG_MMU2_EJECT_FILAMENT4 _UxGT("Ejecter fil. 5")
#define MSG_MMU2_UNLOAD_FILAMENT _UxGT("Retrait filament")
#define MSG_MMU2_LOADING_FILAMENT _UxGT("Chargem. fil. %i...")
#define MSG_MMU2_EJECTING_FILAMENT _UxGT("Ejection fil...")
#define MSG_MMU2_UNLOADING_FILAMENT _UxGT("Retrait fil....")
#define MSG_MMU2_ALL _UxGT("Tous")
#define MSG_MMU2_FILAMENT0 _UxGT("Filament 1")
#define MSG_MMU2_FILAMENT1 _UxGT("Filament 2")
#define MSG_MMU2_FILAMENT2 _UxGT("Filament 3")
#define MSG_MMU2_FILAMENT3 _UxGT("Filament 4")
#define MSG_MMU2_FILAMENT4 _UxGT("Filament 5")
#define MSG_MMU2_RESET _UxGT("Réinit. MMU")
#define MSG_MMU2_RESETTING _UxGT("Réinit. MMU...")
#define MSG_MMU2_EJECT_RECOVER _UxGT("Retrait, click")
#define MSG_MIX _UxGT("Mix")
#define MSG_MIX_COMPONENT _UxGT("Composante")
#define MSG_MIXER _UxGT("Mixeur")
#define MSG_GRADIENT _UxGT("Dégradé")
#define MSG_FULL_GRADIENT _UxGT("Dégradé complet")
#define MSG_TOGGLE_MIX _UxGT("Toggle mix")
#define MSG_CYCLE_MIX _UxGT("Cycle mix")
#define MSG_GRADIENT_MIX _UxGT("Mix dégradé")
#define MSG_REVERSE_GRADIENT _UxGT("Inverser dégradé")
#define MSG_ACTIVE_VTOOL _UxGT("Active V-tool")
#define MSG_START_VTOOL _UxGT("Début V-tool")
#define MSG_END_VTOOL _UxGT(" Fin V-tool")
#define MSG_GRADIENT_ALIAS _UxGT("Alias V-tool")
#define MSG_RESET_VTOOLS _UxGT("Réinit. V-tools")
#define MSG_COMMIT_VTOOL _UxGT("Valider Mix V-tool")
#define MSG_VTOOLS_RESET _UxGT("V-tools réinit. ok")
#define MSG_START_Z _UxGT("Début Z")
#define MSG_END_Z _UxGT(" Fin Z")
#define MSG_BRICKOUT _UxGT("Casse-briques")
#define MSG_INVADERS _UxGT("Invaders")
#define MSG_SNAKE _UxGT("Sn4k3")
#define MSG_MAZE _UxGT("Labyrinthe")
#if LCD_HEIGHT >= 4
// Up to 3 lines allowed
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Attente Démarrage")
#define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("du filament")
#define MSG_FILAMENT_CHANGE_INIT_3 _UxGT("changer")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Attente de")
#define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("décharger filament")
#define MSG_ADVANCED_PAUSE_WAITING_1 _UxGT("Presser bouton")
#define MSG_ADVANCED_PAUSE_WAITING_2 _UxGT("pour reprendre")
#define MSG_PAUSE_PRINT_INIT_1 _UxGT("Parking...")
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Attente filament")
#define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("pour démarrer")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Insérer filament")
#define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("et app. bouton")
#define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("pour continuer...")
#define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Presser le bouton...")
#define MSG_FILAMENT_CHANGE_HEAT_2 _UxGT("Pr chauffer la buse")
#define MSG_FILAMENT_CHANGE_HEAT_2 _UxGT("pr chauffer la buse")
#define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Buse en chauffe")
#define MSG_FILAMENT_CHANGE_HEATING_2 _UxGT("Patientez SVP...")
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Attente de")
#define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("Chargement filament")
#define MSG_FILAMENT_CHANGE_HEATING_2 _UxGT("Patienter SVP...")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Attente")
#define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("retrait du filament")
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Attente")
#define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("chargement filament")
#define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Attente")
#define MSG_FILAMENT_CHANGE_PURGE_2 _UxGT("Purger filament")
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Attente impression")
#define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("pour reprendre")
#define MSG_FILAMENT_CHANGE_PURGE_2 _UxGT("Purge filament")
#define MSG_FILAMENT_CHANGE_CONT_PURGE_1 _UxGT("Presser pour finir")
#define MSG_FILAMENT_CHANGE_CONT_PURGE_2 _UxGT("la purge du filament")
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Attente reprise")
#define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("impression")
#else // LCD_HEIGHT < 4
// Up to 2 lines allowed
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Patientez...")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Ejection...")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Insérer et clic")
#define MSG_ADVANCED_PAUSE_WAITING_1 _UxGT("Presser pr continuer")
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Patience...")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Insérer fil.")
#define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Chauffer ?")
#define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Chauffage...")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Ejecting...")
#define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Chargement...")
#define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Purge...")
#define MSG_FILAMENT_CHANGE_CONT_PURGE_1 _UxGT("Terminer ?")
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Reprise...")
#endif // LCD_HEIGHT < 4
#define MSG_TMC_DRIVERS _UxGT("Drivers TMC")
#define MSG_TMC_CURRENT _UxGT("Courant driver")
#define MSG_TMC_HYBRID_THRS _UxGT("Seuil hybride")
#define MSG_TMC_HOMING_THRS _UxGT("Home sans capteur")
#define MSG_TMC_STEPPING_MODE _UxGT("Mode pas à pas")
#define MSG_TMC_STEALTH_ENABLED _UxGT("StealthChop activé")
#define MSG_SERVICE_RESET _UxGT("Réinit.")
#define MSG_SERVICE_IN _UxGT(" dans:")
#define MSG_BACKLASH _UxGT("Backlash")
#define MSG_BACKLASH_CORRECTION _UxGT("Correction")
#define MSG_BACKLASH_SMOOTHING _UxGT("Lissage")

View File

@ -330,9 +330,11 @@
#define MSG_ENDSTOP_ABORT _UxGT("Finecorsa annullati")
#define MSG_HEATING_FAILED_LCD _UxGT("Riscald. Fallito")
#define MSG_HEATING_FAILED_LCD_BED _UxGT("Risc. piatto fallito")
#define MSG_HEATING_FAILED_LCD_CHAMBER _UxGT("Risc. camera fallito")
#define MSG_ERR_REDUNDANT_TEMP _UxGT("Err: TEMP RIDONDANTE")
#define MSG_THERMAL_RUNAWAY _UxGT("TEMP FUORI CONTROLLO")
#define MSG_THERMAL_RUNAWAY_BED _UxGT("TEMP PIAT.FUORI CTRL")
#define MSG_THERMAL_RUNAWAY_CHAMBER _UxGT("T.CAMERA FUORI CTRL")
#define MSG_ERR_MAXTEMP _UxGT("Err: TEMP MASSIMA")
#define MSG_ERR_MINTEMP _UxGT("Err: TEMP MINIMA")
#define MSG_ERR_MAXTEMP_BED _UxGT("Err: TEMP MAX PIATTO")

View File

@ -268,6 +268,8 @@ void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, co
#if HAS_GRAPHICAL_LCD
drawing_screen = false;
#endif
set_ui_selection(false);
}
}
@ -436,12 +438,21 @@ void _lcd_draw_homing() {
void _lcd_toggle_bed_leveling() { set_bed_leveling_enabled(!planner.leveling_active); }
#endif
void do_select_screen(PGM_P const yes, PGM_P const no, bool &yesno, PGM_P const pref, const char * const string, PGM_P const suff) {
//
// Selection screen presents a prompt and two options
//
bool ui_selection; // = false
void set_ui_selection(const bool sel) { ui_selection = sel; }
void do_select_screen(PGM_P const yes, PGM_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string/*=NULL*/, PGM_P const suff/*=NULL*/) {
if (ui.encoderPosition) {
yesno = int16_t(ui.encoderPosition) > 0;
ui_selection = int16_t(ui.encoderPosition) > 0;
ui.encoderPosition = 0;
}
draw_select_screen(yes, no, yesno, pref, string, suff);
const bool got_click = ui.use_click();
if (got_click || ui.should_draw()) {
draw_select_screen(yes, no, ui_selection, pref, string, suff);
if (got_click) { ui_selection ? yesFunc() : noFunc(); }
}
}
#endif // HAS_LCD_MENU

View File

@ -65,12 +65,15 @@ DECLARE_MENU_EDIT_TYPE(uint32_t, long5, ftostr5rj, 0.01f ); // 123
///////// Menu Item Draw Functions /////////
////////////////////////////////////////////
void draw_edit_screen(PGM_P const pstr, const char* const value=NULL);
typedef void (*selectFunc_t)();
void draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string, PGM_P const suff);
void do_select_screen(PGM_P const yes, PGM_P const no, bool &yesno, PGM_P const pref, const char * const string=NULL, PGM_P const suff=NULL);
inline void do_select_screen_yn(bool &yesno, PGM_P const pref, const char * const string, PGM_P const suff) {
do_select_screen(PSTR(MSG_YES), PSTR(MSG_NO), yesno, pref, string, suff);
void set_ui_selection(const bool sel);
void do_select_screen(PGM_P const yes, PGM_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string=NULL, PGM_P const suff=NULL);
inline void do_select_screen_yn(selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string=NULL, PGM_P const suff=NULL) {
do_select_screen(PSTR(MSG_YES), PSTR(MSG_NO), yesFunc, noFunc, pref, string, suff);
}
void draw_edit_screen(PGM_P const pstr, const char* const value=NULL);
void draw_menu_item(const bool sel, const uint8_t row, PGM_P const pstr, const char pre_char, const char post_char);
void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const bool center=true, const bool invert=false, const char *valstr=NULL);
void _draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm);

View File

@ -604,16 +604,13 @@ void menu_backlash();
#include "../../module/configuration_store.h"
static void lcd_init_eeprom() {
ui.completion_feedback(settings.init_eeprom());
ui.goto_previous_screen();
}
static void lcd_init_eeprom_confirm() {
START_MENU();
MENU_BACK(MSG_ADVANCED_SETTINGS);
MENU_ITEM(function, MSG_INIT_EEPROM, lcd_init_eeprom);
END_MENU();
do_select_screen(
PSTR(MSG_BUTTON_INIT), PSTR(MSG_BUTTON_CANCEL),
[]{ ui.completion_feedback(settings.init_eeprom()); },
ui.goto_previous_screen,
PSTR(MSG_INIT_EEPROM), NULL, PSTR("?")
);
}
#endif

View File

@ -50,13 +50,6 @@ static_assert(LEVEL_CORNERS_Z_HOP >= 0, "LEVEL_CORNERS_Z_HOP must be >= 0. Pleas
static bool leveling_was_active = false;
#endif
static inline void _lcd_level_bed_corners_back() {
#if HAS_LEVELING
set_bed_leveling_enabled(leveling_was_active);
#endif
ui.goto_previous_screen_no_defer();
}
/**
* Level corners, starting in the front-left corner.
*/
@ -94,17 +87,23 @@ static inline void _lcd_goto_next_corner() {
}
static inline void menu_level_bed_corners() {
START_MENU();
MENU_ITEM(function,
#if ENABLED(LEVEL_CENTER_TOO)
MSG_LEVEL_BED_NEXT_POINT
#else
MSG_NEXT_CORNER
#endif
, _lcd_goto_next_corner
do_select_screen(
PSTR(MSG_BUTTON_NEXT), PSTR(MSG_BUTTON_DONE),
_lcd_goto_next_corner,
[]{
#if HAS_LEVELING
set_bed_leveling_enabled(leveling_was_active);
#endif
ui.goto_previous_screen_no_defer();
},
PSTR(
#if ENABLED(LEVEL_CENTER_TOO)
MSG_LEVEL_BED_NEXT_POINT
#else
MSG_NEXT_CORNER
#endif
), NULL, PSTR("?")
);
MENU_ITEM(function, MSG_BACK, _lcd_level_bed_corners_back);
END_MENU();
}
static inline void _lcd_level_bed_corners_homing() {
@ -112,6 +111,7 @@ static inline void _lcd_level_bed_corners_homing() {
if (all_axes_homed()) {
bed_corner = 0;
ui.goto_screen(menu_level_bed_corners);
set_ui_selection(true);
_lcd_goto_next_corner();
}
}

View File

@ -44,6 +44,8 @@ static void lcd_power_loss_recovery_cancel() {
ui.return_to_status();
}
// TODO: Display long filename with Cancel/Resume buttons
// Requires supporting methods in PLR class.
void menu_job_recovery() {
ui.defer_status_screen();
START_MENU();

View File

@ -101,10 +101,7 @@
}
void menu_abort_confirm() {
START_MENU();
MENU_BACK(MSG_MAIN);
MENU_ITEM(function, MSG_STOP_PRINT, lcd_abort_job);
END_MENU();
do_select_screen(PSTR(MSG_BUTTON_STOP), PSTR(MSG_BACK), lcd_abort_job, ui.goto_previous_screen, PSTR(MSG_STOP_PRINT), NULL, PSTR("?"));
}
#endif // MACHINE_CAN_STOP

View File

@ -250,17 +250,17 @@ void lcd_mixer_mix_edit() {
//
// Reset All V-Tools
//
inline void _lcd_reset_vtools() {
LCD_MESSAGEPGM(MSG_VTOOLS_RESET);
ui.return_to_status();
mixer.reset_vtools();
}
void menu_mixer_vtools_reset_confirm() {
START_MENU();
MENU_BACK(MSG_BACK);
MENU_ITEM(function, MSG_RESET_VTOOLS, _lcd_reset_vtools);
END_MENU();
do_select_screen(
PSTR(MSG_BUTTON_RESET), PSTR(MSG_BUTTON_CANCEL),
[]{
mixer.reset_vtools();
LCD_MESSAGEPGM(MSG_VTOOLS_RESET);
ui.return_to_status();
},
ui.goto_previous_screen,
PSTR(MSG_RESET_VTOOLS), NULL, PSTR("?")
);
}
void menu_mixer() {

View File

@ -81,17 +81,12 @@ inline void sdcard_start_selected_file() {
#if ENABLED(SD_MENU_CONFIRM_START)
bool do_print_file;
void menu_sd_confirm() {
if (ui.should_draw())
do_select_screen(PSTR(MSG_BUTTON_PRINT), PSTR(MSG_BUTTON_CANCEL), do_print_file, PSTR(MSG_START_PRINT " "), card.longest_filename(), PSTR("?"));
if (ui.use_click()) {
if (do_print_file)
sdcard_start_selected_file();
else
ui.goto_previous_screen();
}
do_select_screen(
PSTR(MSG_BUTTON_PRINT), PSTR(MSG_BUTTON_CANCEL),
sdcard_start_selected_file, ui.goto_previous_screen,
PSTR(MSG_START_PRINT " "), card.longest_filename(), PSTR("?")
);
}
#endif
@ -106,7 +101,6 @@ class MenuItem_sdfile {
sd_items = screen_items;
#endif
#if ENABLED(SD_MENU_CONFIRM_START)
do_print_file = false;
MenuItem_submenu::action(menu_sd_confirm);
#else
sdcard_start_selected_file();

View File

@ -31,52 +31,32 @@
#include "menu.h"
#include "../../module/printcounter.h"
inline void _lcd_reset_service(const int index) {
print_job_timer.resetServiceInterval(index);
BUZZ(200, 404);
ui.reset_status();
ui.return_to_status();
inline void _menu_service(const int index, PGM_P const name) {
char sram[30];
strncpy_P(sram, name, 29);
do_select_screen(
PSTR(MSG_BUTTON_RESET), PSTR(MSG_BUTTON_CANCEL),
[]{
print_job_timer.resetServiceInterval(index);
ui.completion_feedback(true);
ui.reset_status();
ui.return_to_status();
},
ui.goto_previous_screen,
PSTR(MSG_SERVICE_RESET), sram, PSTR("?")
);
}
#if SERVICE_INTERVAL_1 > 0
void menu_action_reset_service1() { _lcd_reset_service(1); }
void menu_service1() { _menu_service(1, PSTR(SERVICE_NAME_1)); }
#endif
#if SERVICE_INTERVAL_2 > 0
void menu_action_reset_service2() { _lcd_reset_service(2); }
void menu_service2() { _menu_service(2, PSTR(SERVICE_NAME_2)); }
#endif
#if SERVICE_INTERVAL_3 > 0
void menu_action_reset_service3() { _lcd_reset_service(3); }
#endif
inline void _menu_service(const int index) {
START_MENU();
MENU_BACK(MSG_MAIN);
switch (index) {
#if SERVICE_INTERVAL_1 > 0
case 1: MENU_ITEM(function, MSG_SERVICE_RESET, menu_action_reset_service1); break;
#endif
#if SERVICE_INTERVAL_2 > 0
case 2: MENU_ITEM(function, MSG_SERVICE_RESET, menu_action_reset_service2); break;
#endif
#if SERVICE_INTERVAL_3 > 0
case 3: MENU_ITEM(function, MSG_SERVICE_RESET, menu_action_reset_service3); break;
#endif
}
END_MENU();
}
#if SERVICE_INTERVAL_1 > 0
void menu_service1() { _menu_service(1); }
#endif
#if SERVICE_INTERVAL_2 > 0
void menu_service2() { _menu_service(2); }
#endif
#if SERVICE_INTERVAL_3 > 0
void menu_service3() { _menu_service(3); }
void menu_service3() { _menu_service(3, PSTR(SERVICE_NAME_3)); }
#endif
#endif // HAS_LCD_MENU && HAS_SERVICE_INTERVALS && PRINTCOUNTER

View File

@ -32,7 +32,7 @@
#include "../../module/stepper_indirection.h"
#include "../../feature/tmc_util.h"
#define TMC_EDIT_STORED_I_RMS(ST) MENU_ITEM_EDIT_CALLBACK(uint16_4, MSG_##ST, &stepper##ST.val_mA, 100, 3000, refresh_stepper_current_##ST)
#define TMC_EDIT_STORED_I_RMS(ST,MSG) MENU_ITEM_EDIT_CALLBACK(uint16_4, MSG, &stepper##ST.val_mA, 100, 3000, refresh_stepper_current_##ST)
#if AXIS_IS_TMC(X)
void refresh_stepper_current_X() { stepperX.refresh_stepper_current(); }
@ -78,50 +78,50 @@ void menu_tmc_current() {
START_MENU();
MENU_BACK(MSG_TMC_DRIVERS);
#if AXIS_IS_TMC(X)
TMC_EDIT_STORED_I_RMS(X);
TMC_EDIT_STORED_I_RMS(X, MSG_X);
#endif
#if AXIS_IS_TMC(Y)
TMC_EDIT_STORED_I_RMS(Y);
TMC_EDIT_STORED_I_RMS(Y, MSG_Y);
#endif
#if AXIS_IS_TMC(Z)
TMC_EDIT_STORED_I_RMS(Z);
TMC_EDIT_STORED_I_RMS(Z, MSG_Z);
#endif
#if AXIS_IS_TMC(X2)
TMC_EDIT_STORED_I_RMS(X2);
TMC_EDIT_STORED_I_RMS(X2, MSG_X2);
#endif
#if AXIS_IS_TMC(Y2)
TMC_EDIT_STORED_I_RMS(Y2);
TMC_EDIT_STORED_I_RMS(Y2, MSG_Y2);
#endif
#if AXIS_IS_TMC(Z2)
TMC_EDIT_STORED_I_RMS(Z2);
TMC_EDIT_STORED_I_RMS(Z2, MSG_Z2);
#endif
#if AXIS_IS_TMC(Z3)
TMC_EDIT_STORED_I_RMS(Z3);
TMC_EDIT_STORED_I_RMS(Z3, MSG_Z3);
#endif
#if AXIS_IS_TMC(E0)
TMC_EDIT_STORED_I_RMS(E0);
TMC_EDIT_STORED_I_RMS(E0, MSG_E1);
#endif
#if AXIS_IS_TMC(E1)
TMC_EDIT_STORED_I_RMS(E1);
TMC_EDIT_STORED_I_RMS(E1, MSG_E2);
#endif
#if AXIS_IS_TMC(E2)
TMC_EDIT_STORED_I_RMS(E2);
TMC_EDIT_STORED_I_RMS(E2, MSG_E3);
#endif
#if AXIS_IS_TMC(E3)
TMC_EDIT_STORED_I_RMS(E3);
TMC_EDIT_STORED_I_RMS(E3, MSG_E4);
#endif
#if AXIS_IS_TMC(E4)
TMC_EDIT_STORED_I_RMS(E4);
TMC_EDIT_STORED_I_RMS(E4, MSG_E5);
#endif
#if AXIS_IS_TMC(E5)
TMC_EDIT_STORED_I_RMS(E5);
TMC_EDIT_STORED_I_RMS(E5, MSG_E6);
#endif
END_MENU();
}
#if ENABLED(HYBRID_THRESHOLD)
#define TMC_EDIT_STORED_HYBRID_THRS(ST) MENU_ITEM_EDIT_CALLBACK(uint8, MSG_##ST, &stepper##ST.stored.hybrid_thrs, 0, 255, refresh_hybrid_thrs_##ST);
#define TMC_EDIT_STORED_HYBRID_THRS(ST, MSG) MENU_ITEM_EDIT_CALLBACK(uint8, MSG, &stepper##ST.stored.hybrid_thrs, 0, 255, refresh_hybrid_thrs_##ST);
#if AXIS_HAS_STEALTHCHOP(X)
void refresh_hybrid_thrs_X() { stepperX.refresh_hybrid_thrs(planner.settings.axis_steps_per_mm[X_AXIS]); }
@ -167,43 +167,43 @@ void menu_tmc_current() {
START_MENU();
MENU_BACK(MSG_TMC_DRIVERS);
#if AXIS_HAS_STEALTHCHOP(X)
TMC_EDIT_STORED_HYBRID_THRS(X);
TMC_EDIT_STORED_HYBRID_THRS(X, MSG_X);
#endif
#if AXIS_HAS_STEALTHCHOP(Y)
TMC_EDIT_STORED_HYBRID_THRS(Y);
TMC_EDIT_STORED_HYBRID_THRS(Y, MSG_Y);
#endif
#if AXIS_HAS_STEALTHCHOP(Z)
TMC_EDIT_STORED_HYBRID_THRS(Z);
TMC_EDIT_STORED_HYBRID_THRS(Z, MSG_Z);
#endif
#if AXIS_HAS_STEALTHCHOP(X2)
TMC_EDIT_STORED_HYBRID_THRS(X2);
TMC_EDIT_STORED_HYBRID_THRS(X2, MSG_X2);
#endif
#if AXIS_HAS_STEALTHCHOP(Y2)
TMC_EDIT_STORED_HYBRID_THRS(Y2);
TMC_EDIT_STORED_HYBRID_THRS(Y2, MSG_Y2);
#endif
#if AXIS_HAS_STEALTHCHOP(Z2)
TMC_EDIT_STORED_HYBRID_THRS(Z2);
TMC_EDIT_STORED_HYBRID_THRS(Z2, MSG_Z2);
#endif
#if AXIS_HAS_STEALTHCHOP(Z3)
TMC_EDIT_STORED_HYBRID_THRS(Z3);
TMC_EDIT_STORED_HYBRID_THRS(Z3, MSG_Z3);
#endif
#if AXIS_HAS_STEALTHCHOP(E0)
TMC_EDIT_STORED_HYBRID_THRS(E0);
TMC_EDIT_STORED_HYBRID_THRS(E0, MSG_E1);
#endif
#if AXIS_HAS_STEALTHCHOP(E1)
TMC_EDIT_STORED_HYBRID_THRS(E1);
TMC_EDIT_STORED_HYBRID_THRS(E1, MSG_E2);
#endif
#if AXIS_HAS_STEALTHCHOP(E2)
TMC_EDIT_STORED_HYBRID_THRS(E2);
TMC_EDIT_STORED_HYBRID_THRS(E2, MSG_E3);
#endif
#if AXIS_HAS_STEALTHCHOP(E3)
TMC_EDIT_STORED_HYBRID_THRS(E3);
TMC_EDIT_STORED_HYBRID_THRS(E3, MSG_E4);
#endif
#if AXIS_HAS_STEALTHCHOP(E4)
TMC_EDIT_STORED_HYBRID_THRS(E4);
TMC_EDIT_STORED_HYBRID_THRS(E4, MSG_E5);
#endif
#if AXIS_HAS_STEALTHCHOP(E5)
TMC_EDIT_STORED_HYBRID_THRS(E5);
TMC_EDIT_STORED_HYBRID_THRS(E5, MSG_E6);
#endif
END_MENU();
}
@ -243,7 +243,7 @@ void menu_tmc_current() {
#if HAS_STEALTHCHOP
#define TMC_EDIT_STEP_MODE(ST) MENU_ITEM_EDIT_CALLBACK(bool, MSG_##ST, &stepper##ST.stored.stealthChop_enabled, refresh_stepping_mode_##ST)
#define TMC_EDIT_STEP_MODE(ST, MSG) MENU_ITEM_EDIT_CALLBACK(bool, MSG, &stepper##ST.stored.stealthChop_enabled, refresh_stepping_mode_##ST)
#if AXIS_HAS_STEALTHCHOP(X)
void refresh_stepping_mode_X() { stepperX.refresh_stepping_mode(); }
@ -290,43 +290,43 @@ void menu_tmc_current() {
STATIC_ITEM(MSG_TMC_STEALTH_ENABLED);
MENU_BACK(MSG_TMC_DRIVERS);
#if AXIS_HAS_STEALTHCHOP(X)
TMC_EDIT_STEP_MODE(X);
TMC_EDIT_STEP_MODE(X, MSG_X);
#endif
#if AXIS_HAS_STEALTHCHOP(Y)
TMC_EDIT_STEP_MODE(Y);
TMC_EDIT_STEP_MODE(Y, MSG_Y);
#endif
#if AXIS_HAS_STEALTHCHOP(Z)
TMC_EDIT_STEP_MODE(Z);
TMC_EDIT_STEP_MODE(Z, MSG_Z);
#endif
#if AXIS_HAS_STEALTHCHOP(X2)
TMC_EDIT_STEP_MODE(X2);
TMC_EDIT_STEP_MODE(X2, MSG_X2);
#endif
#if AXIS_HAS_STEALTHCHOP(Y2)
TMC_EDIT_STEP_MODE(Y2);
TMC_EDIT_STEP_MODE(Y2, MSG_Y2);
#endif
#if AXIS_HAS_STEALTHCHOP(Z2)
TMC_EDIT_STEP_MODE(Z2);
TMC_EDIT_STEP_MODE(Z2, MSG_Z2);
#endif
#if AXIS_HAS_STEALTHCHOP(Z3)
TMC_EDIT_STEP_MODE(Z3);
TMC_EDIT_STEP_MODE(Z3, MSG_Z3);
#endif
#if AXIS_HAS_STEALTHCHOP(E0)
TMC_EDIT_STEP_MODE(E0);
TMC_EDIT_STEP_MODE(E0, MSG_E1);
#endif
#if AXIS_HAS_STEALTHCHOP(E1)
TMC_EDIT_STEP_MODE(E1);
TMC_EDIT_STEP_MODE(E1, MSG_E2);
#endif
#if AXIS_HAS_STEALTHCHOP(E2)
TMC_EDIT_STEP_MODE(E2);
TMC_EDIT_STEP_MODE(E2, MSG_E3);
#endif
#if AXIS_HAS_STEALTHCHOP(E3)
TMC_EDIT_STEP_MODE(E3);
TMC_EDIT_STEP_MODE(E3, MSG_E4);
#endif
#if AXIS_HAS_STEALTHCHOP(E4)
TMC_EDIT_STEP_MODE(E4);
TMC_EDIT_STEP_MODE(E4, MSG_E5);
#endif
#if AXIS_HAS_STEALTHCHOP(E5)
TMC_EDIT_STEP_MODE(E5);
TMC_EDIT_STEP_MODE(E5, MSG_E6);
#endif
END_MENU();
}

View File

@ -615,8 +615,10 @@ void _lcd_ubl_step_by_step() {
void _lcd_ubl_level_bed() {
START_MENU();
MENU_BACK(MSG_MOTION);
MENU_ITEM(gcode, MSG_UBL_ACTIVATE_MESH, PSTR("G29 A"));
MENU_ITEM(gcode, MSG_UBL_DEACTIVATE_MESH, PSTR("G29 D"));
if (planner.leveling_active)
MENU_ITEM(gcode, MSG_UBL_DEACTIVATE_MESH, PSTR("G29 D"));
else
MENU_ITEM(gcode, MSG_UBL_ACTIVATE_MESH, PSTR("G29 A"));
MENU_ITEM(submenu, MSG_UBL_STEP_BY_STEP_MENU, _lcd_ubl_step_by_step);
MENU_ITEM(function, MSG_UBL_MESH_EDIT, _lcd_ubl_output_map_lcd_cmd);
MENU_ITEM(submenu, MSG_UBL_STORAGE_MESH_MENU, _lcd_ubl_storage_mesh);

View File

@ -192,24 +192,39 @@ millis_t next_button_update_ms;
#endif
void wrap_string(uint8_t y, const char * const string) {
uint8_t x = LCD_WIDTH;
void _wrap_string(uint8_t &x, uint8_t &y, const char * const string, read_byte_cb_t cb_read_byte) {
SETCURSOR(x, y);
if (string) {
uint8_t *p = (uint8_t*)string;
for (;;) {
if (x >= LCD_WIDTH) {
x = 0;
SETCURSOR(0, y++);
}
wchar_t ch;
p = get_utf8_value_cb(p, read_byte_ram, &ch);
p = get_utf8_value_cb(p, cb_read_byte, &ch);
if (!ch) break;
lcd_put_wchar(ch);
x++;
if (x >= LCD_WIDTH) {
x = 0; y++;
SETCURSOR(0, y);
}
}
}
}
void MarlinUI::draw_select_screen_prompt(PGM_P const pref, const char * const string/*=NULL*/, PGM_P const suff/*=NULL*/) {
const uint8_t plen = utf8_strlen_P(pref), slen = suff ? utf8_strlen_P(suff) : 0;
uint8_t x = 0, y = 0;
if (!string && plen + slen <= LCD_WIDTH) {
x = (LCD_WIDTH - plen - slen) / 2;
y = LCD_HEIGHT > 3 ? 1 : 0;
}
wrap_string_P(x, y, pref);
if (string) {
if (x) { x = 0; y++; } // Move to the start of the next line
wrap_string(x, y, string);
}
if (suff) wrap_string_P(x, y, suff);
}
#endif // HAS_LCD_MENU
void MarlinUI::init() {
@ -668,6 +683,7 @@ void MarlinUI::update() {
static uint16_t max_display_update_time = 0;
static millis_t next_lcd_update_ms;
millis_t ms = millis();
#if HAS_LCD_MENU
@ -729,11 +745,12 @@ void MarlinUI::update() {
refresh();
init_lcd(); // May revive the LCD if static electricity killed it
ms = millis();
next_lcd_update_ms = ms + LCD_UPDATE_INTERVAL; // delay LCD update until after SD activity completes
}
#endif // SDSUPPORT && SD_DETECT_PIN
const millis_t ms = millis();
if (ELAPSED(ms, next_lcd_update_ms)
#if HAS_GRAPHICAL_LCD
|| drawing_screen

View File

@ -72,7 +72,11 @@
#define LCDWRITE(c) lcd_put_wchar(c)
#endif
void wrap_string(uint8_t y, const char * const string);
#include "fontutils.h"
void _wrap_string(uint8_t &x, uint8_t &y, const char * const string, read_byte_cb_t cb_read_byte);
inline void wrap_string_P(uint8_t &x, uint8_t &y, PGM_P const pstr) { _wrap_string(x, y, pstr, read_byte_rom); }
inline void wrap_string(uint8_t &x, uint8_t &y, const char * const string) { _wrap_string(x, y, string, read_byte_ram); }
#if ENABLED(SDSUPPORT)
#include "../sd/cardreader.h"
@ -457,6 +461,8 @@ public:
static void ubl_plot(const uint8_t x, const uint8_t inverted_y);
#endif
static void draw_select_screen_prompt(PGM_P const pref, const char * const string=NULL, PGM_P const suff=NULL);
#elif HAS_SPI_LCD
static constexpr bool lcd_clicked = false;