Skip to content

Commit

Permalink
Merge branch 'MarlinFirmware:bugfix-2.1.x' into MARLIN-E3S1PROFORK-BY…
Browse files Browse the repository at this point in the history
…TT-RELEASE-CODE-v004-dev
  • Loading branch information
ThomasToka authored Jul 28, 2023
2 parents 1a3f46b + 2a82ca8 commit 6233ef7
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2023-07-27"
//#define STRING_DISTRIBUTION_DATE "2023-07-28"

/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/feature/hotend_idle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ void HotendIdleProtection::check_hotends(const millis_t &ms) {
if (!do_prot)
next_protect_ms = 0; // No hotends are hot so cancel timeout
else if (!next_protect_ms) // Timeout is possible?
next_protect_ms = ms + cfg.timeout * 1000; // Start timeout if not already set
next_protect_ms = ms + 1000UL * cfg.timeout; // Start timeout if not already set
}

void HotendIdleProtection::check_e_motion(const millis_t &ms) {
static float old_e_position = 0;
if (old_e_position != current_position.e) {
old_e_position = current_position.e; // Track filament motion
if (next_protect_ms) // If some heater is on then...
next_protect_ms = ms + cfg.timeout * 1000; // ...delay the timeout till later
old_e_position = current_position.e; // Track filament motion
if (next_protect_ms) // If some heater is on then...
next_protect_ms = ms + 1000UL * cfg.timeout; // ...delay the timeout till later
}
}

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* version was tagged.
*/
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2023-07-27"
#define STRING_DISTRIBUTION_DATE "2023-07-28"
#endif

/**
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ int lcd_put_lchar_max(const lchar_t &c, const pixel_len_t max_length) {
* @param cb_read_byte : the callback function to read one byte from the utf8_str (from RAM or ROM)
* @param max_length : the pixel length of the string allowed (or number of slots in HD44780)
*
* @return the number of pixels advanced
* @return the number of characters emitted
*
* Draw a UTF-8 string
*/
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/lcd/HD44780/marlinui_HD44780.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,8 @@ void MarlinUI::draw_status_screen() {
void MenuEditItemBase::draw(const bool sel, const uint8_t row, FSTR_P const ftpl, const char * const inStr, const bool pgm) {
const uint8_t vlen = inStr ? (pgm ? utf8_strlen_P(inStr) : utf8_strlen(inStr)) : 0;
lcd_put_lchar(0, row, sel ? LCD_STR_ARROW_RIGHT[0] : ' ');
uint8_t n = lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, LCD_WIDTH - 2 - vlen);
uint8_t n = LCD_WIDTH - 2 - vlen;
n -= lcd_put_u8str(ftpl, itemIndex, itemStringC, itemStringF, n);
if (vlen) {
lcd_put_u8str(F(":"));
for (; n; --n) lcd_put_u8str(F(" "));
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ int lcd_put_lchar_max(const lchar_t &c, const pixel_len_t max_length) {
* @param cb_read_byte : the callback function to read one byte from the utf8_str (from RAM or ROM)
* @param max_length : the pixel length of the string allowed (or number of slots in HD44780)
*
* @return the number of pixels advanced
* @return the number of characters emitted
*
* Draw a UTF-8 string
*/
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/dogm/lcdprint_u8g.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void lcd_moveto(const lcd_uint_t col, const lcd_uint_t row) { u8g.setPrintPos(co
void lcd_put_int(const int i) { u8g.print(i); }

// return < 0 on error
// return the advanced pixels
// return the number of pixels advanced
int lcd_put_lchar_max(const lchar_t &c, const pixel_len_t max_length) {
if (c < 256) {
u8g.print((char)c);
Expand Down
24 changes: 13 additions & 11 deletions Marlin/src/lcd/e3v2/proui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3437,19 +3437,21 @@ void drawMotionMenu() {
updateMenu(motionMenu);
}

#if HAS_PREHEAT
void drawPreheatHotendMenu() {
checkkey = ID_Menu;
if (SET_MENU(preheatHotendMenu, MSG_PREHEAT_HOTEND, 1 + PREHEAT_COUNT)) {
BACK_ITEM(drawFilamentManMenu);
#define _ITEM_PREHEAT_HE(N) MENU_ITEM(ICON_Preheat##N, MSG_PREHEAT_##N, onDrawMenuItem, DoPreheatHotend##N);
REPEAT_1(PREHEAT_COUNT, _ITEM_PREHEAT_HE)
#if ENABLED(ADVANCED_PAUSE_FEATURE)

#if HAS_PREHEAT

void drawPreheatHotendMenu() {
checkkey = ID_Menu;
if (SET_MENU(preheatHotendMenu, MSG_PREHEAT_HOTEND, 1 + PREHEAT_COUNT)) {
BACK_ITEM(drawFilamentManMenu);
#define _ITEM_PREHEAT_HE(N) MENU_ITEM(ICON_Preheat##N, MSG_PREHEAT_##N, onDrawMenuItem, DoPreheatHotend##N);
REPEAT_1(PREHEAT_COUNT, _ITEM_PREHEAT_HE)
}
updateMenu(preheatHotendMenu);
}
updateMenu(preheatHotendMenu);
}
#endif

#if ENABLED(ADVANCED_PAUSE_FEATURE)
#endif

void drawFilamentManMenu() {
checkkey = ID_Menu;
Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/lcd/lcdprint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
* ~ displays '1'....'11' for indexes 0 - 10
* * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL)
* @ displays an axis name such as XYZUVW, or E for an extruder
*
* Return the given maxlen minus the number of characters emitted, i.e., the number of unused columns
*/
lcd_uint_t lcd_put_u8str_P(PGM_P const ptpl, const int8_t ind, const char *cstr/*=nullptr*/, FSTR_P const fstr/*=nullptr*/, const lcd_uint_t maxlen/*=LCD_WIDTH*/) {
const uint8_t prop = USE_WIDE_GLYPH ? 2 : 1;
Expand Down

0 comments on commit 6233ef7

Please sign in to comment.