Skip to content

Commit 9ec7c0e

Browse files
MichaelMichael
authored andcommitted
Merge commit 'ff12ea4ab1e4e25bfd17c96e8e6843bd13c4ef3b' into ender3v2_bugfix
* commit 'ff12ea4ab1e4e25bfd17c96e8e6843bd13c4ef3b': 🔖 Update configurations version 🐛 Use setTargetHotend in menus (MarlinFirmware#22247) 🐛 No HOTEND_LOOP with EXTRUDERS 0 (MarlinFirmware#22245) [cron] Bump distribution date (2021-06-28) 🌐 MSG_MOVE_100MM (MarlinFirmware#22242) 🐛 Fix wide glyph characters display (MarlinFirmware#22237)
2 parents 22daa46 + ff12ea4 commit 9ec7c0e

36 files changed

+89
-35
lines changed

Marlin/Configuration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
*
3636
* Advanced settings can be found in Configuration_adv.h
3737
*/
38-
#define CONFIGURATION_H_VERSION 02000900
38+
#define CONFIGURATION_H_VERSION 02000901
3939

4040
//===========================================================================
4141
//============================= Getting Started =============================

Marlin/Configuration_adv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*
3131
* Basic settings can be found in Configuration.h
3232
*/
33-
#define CONFIGURATION_ADV_H_VERSION 02000900
33+
#define CONFIGURATION_ADV_H_VERSION 02000901
3434

3535
//===========================================================================
3636
//============================= Thermal Settings ============================

Marlin/src/feature/power.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ bool Power::is_power_needed() {
8585
#endif
8686
) return true;
8787

88-
HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0 || thermalManager.temp_hotend[e].soft_pwm_amount > 0) return true;
88+
#if HAS_HOTEND
89+
HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0 || thermalManager.temp_hotend[e].soft_pwm_amount > 0) return true;
90+
#endif
91+
8992
if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed() > 0 || thermalManager.temp_bed.soft_pwm_amount > 0)) return true;
9093

9194
#if HAS_HOTEND && AUTO_POWER_E_TEMP

Marlin/src/inc/Version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* version was tagged.
4343
*/
4444
#ifndef STRING_DISTRIBUTION_DATE
45-
#define STRING_DISTRIBUTION_DATE "2021-06-27"
45+
#define STRING_DISTRIBUTION_DATE "2021-06-28"
4646
#endif
4747

4848
/**
@@ -52,7 +52,7 @@
5252
* to alert users to major changes.
5353
*/
5454

55-
#define MARLIN_HEX_VERSION 02000900
55+
#define MARLIN_HEX_VERSION 02000901
5656
#ifndef REQUIRED_CONFIGURATION_H_VERSION
5757
#define REQUIRED_CONFIGURATION_H_VERSION MARLIN_HEX_VERSION
5858
#endif

Marlin/src/lcd/dogm/marlinui_DOGM.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -369,13 +369,12 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
369369
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) {
370370

371371
if (mark_as_selected(row, style & SS_INVERT)) {
372-
373372
pixel_len_t n = LCD_PIXEL_WIDTH; // pixel width of string allowed
374-
375-
const int8_t plen = pstr ? utf8_strlen_P(pstr) : 0,
376-
vlen = vstr ? utf8_strlen(vstr) : 0;
373+
374+
const int plen = pstr ? calculateWidth(pstr) : 0,
375+
vlen = vstr ? utf8_strlen(vstr) : 0;
377376
if (style & SS_CENTER) {
378-
int8_t pad = (LCD_WIDTH - plen - vlen) / 2;
377+
int pad = (LCD_PIXEL_WIDTH - plen - vlen * MENU_FONT_WIDTH) / MENU_FONT_WIDTH / 2;
379378
while (--pad >= 0) n -= lcd_put_wchar(' ');
380379
}
381380

@@ -400,8 +399,9 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
400399
if (mark_as_selected(row, sel)) {
401400
const uint8_t vallen = (pgm ? utf8_strlen_P(inStr) : utf8_strlen((char*)inStr)),
402401
pixelwidth = (pgm ? uxg_GetUtf8StrPixelWidthP(u8g.getU8g(), inStr) : uxg_GetUtf8StrPixelWidth(u8g.getU8g(), (char*)inStr));
402+
const u8g_uint_t prop = USE_WIDE_GLYPH ? 2 : 1;
403403

404-
pixel_len_t n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, LCD_WIDTH - 2 - vallen) * (MENU_FONT_WIDTH);
404+
pixel_len_t n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, LCD_WIDTH - 2 - vallen * prop) * (MENU_FONT_WIDTH);
405405
if (vallen) {
406406
lcd_put_wchar(':');
407407
while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' ');
@@ -414,15 +414,16 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
414414
void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char * const value/*=nullptr*/) {
415415
ui.encoder_direction_normal();
416416

417+
const u8g_uint_t prop = USE_WIDE_GLYPH ? 2 : 1;
417418
const u8g_uint_t labellen = utf8_strlen_P(pstr), vallen = utf8_strlen(value);
418-
bool extra_row = labellen > LCD_WIDTH - 2 - vallen;
419+
bool extra_row = labellen * prop > LCD_WIDTH - 2 - vallen * prop;
419420

420421
#if ENABLED(USE_BIG_EDIT_FONT)
421422
// Use the menu font if the label won't fit on a single line
422423
constexpr u8g_uint_t lcd_edit_width = (LCD_PIXEL_WIDTH) / (EDIT_FONT_WIDTH);
423424
u8g_uint_t lcd_chr_fit, one_chr_width;
424-
if (labellen <= lcd_edit_width - 1) {
425-
if (labellen + vallen + 1 > lcd_edit_width) extra_row = true;
425+
if (labellen * prop <= lcd_edit_width - 1) {
426+
if (labellen * prop + vallen * prop + 1 > lcd_edit_width) extra_row = true;
426427
lcd_chr_fit = lcd_edit_width + 1;
427428
one_chr_width = EDIT_FONT_WIDTH;
428429
ui.set_font(FONT_EDIT);
@@ -454,7 +455,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
454455
onpage = PAGE_CONTAINS(baseline - (EDIT_FONT_ASCENT - 1), baseline);
455456
}
456457
if (onpage) {
457-
lcd_put_wchar(((lcd_chr_fit - 1) - (vallen + 1)) * one_chr_width, baseline, ' '); // Right-justified, padded, add a leading space
458+
lcd_put_wchar(((lcd_chr_fit - 1) - (vallen * prop + 1)) * one_chr_width, baseline, ' '); // Right-justified, padded, add a leading space
458459
lcd_put_u8str(value);
459460
}
460461
}
@@ -478,8 +479,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
478479
void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) {
479480
ui.draw_select_screen_prompt(pref, string, suff);
480481
draw_boxed_string(1, LCD_HEIGHT - 1, no, !yesno);
481-
const u8g_uint_t xpos = (LCD_WIDTH) / (USE_WIDE_GLYPH ? 2 : 1);
482-
draw_boxed_string(xpos - (utf8_strlen_P(yes) + 1), LCD_HEIGHT - 1, yes, yesno);
482+
draw_boxed_string(LCD_WIDTH - (utf8_strlen_P(yes) * (USE_WIDE_GLYPH ? 2 : 1) + 1), LCD_HEIGHT - 1, yes, yesno);
483483
}
484484

485485
#if ENABLED(SDSUPPORT)

Marlin/src/lcd/language/language_an.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ namespace Language_an {
8989
PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Mover 0.1mm");
9090
PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Mover 1mm");
9191
PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Mover 10mm");
92+
PROGMEM Language_Str MSG_MOVE_100MM = _UxGT("Mover 100mm");
9293
PROGMEM Language_Str MSG_SPEED = _UxGT("Velocidat");
9394
PROGMEM Language_Str MSG_BED_Z = _UxGT("Base Z");
9495
PROGMEM Language_Str MSG_NOZZLE = _UxGT("Boquilla");

Marlin/src/lcd/language/language_bg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ namespace Language_bg {
7979
PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Премести с 0.1mm");
8080
PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Премести с 1mm");
8181
PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Премести с 10mm");
82+
PROGMEM Language_Str MSG_MOVE_100MM = _UxGT("Премести с 100mm");
8283
PROGMEM Language_Str MSG_SPEED = _UxGT("Скорост");
8384
PROGMEM Language_Str MSG_BED_Z = _UxGT("Bed Z");
8485
PROGMEM Language_Str MSG_NOZZLE = " " LCD_STR_THERMOMETER _UxGT(" Дюза");

Marlin/src/lcd/language/language_ca.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ namespace Language_ca {
8989
PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Mou 0.1mm");
9090
PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Mou 1mm");
9191
PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Mou 10mm");
92+
PROGMEM Language_Str MSG_MOVE_100MM = _UxGT("Mou 100mm");
9293
PROGMEM Language_Str MSG_SPEED = _UxGT("Velocitat");
9394
PROGMEM Language_Str MSG_BED_Z = _UxGT("Llit Z");
9495
PROGMEM Language_Str MSG_NOZZLE = _UxGT("Nozzle");

Marlin/src/lcd/language/language_cz.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ namespace Language_cz {
241241
PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Posunout o 0,1mm");
242242
PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Posunout o 1mm");
243243
PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Posunout o 10mm");
244+
PROGMEM Language_Str MSG_MOVE_100MM = _UxGT("Posunout o 100mm");
244245
PROGMEM Language_Str MSG_SPEED = _UxGT("Rychlost");
245246
PROGMEM Language_Str MSG_BED_Z = _UxGT("Výška podl.");
246247
PROGMEM Language_Str MSG_NOZZLE = _UxGT("Tryska");

Marlin/src/lcd/language/language_da.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ namespace Language_da {
7979
PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Flyt 0.1mm");
8080
PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Flyt 1mm");
8181
PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Flyt 10mm");
82+
PROGMEM Language_Str MSG_MOVE_100MM = _UxGT("Flyt 100mm");
8283
PROGMEM Language_Str MSG_SPEED = _UxGT("Hastighed");
8384
PROGMEM Language_Str MSG_BED_Z = _UxGT("Plade Z");
8485
PROGMEM Language_Str MSG_NOZZLE = _UxGT("Dyse");

0 commit comments

Comments
 (0)