Skip to content

Commit

Permalink
Revert "Use M117 to set a label for the filament to load at the M600 …
Browse files Browse the repository at this point in the history
…Insert filament screen."

This reverts commit 67ff6c3.
  • Loading branch information
3d-gussner committed Jan 11, 2024
1 parent ecd5f6d commit b99a91b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 36 deletions.
9 changes: 1 addition & 8 deletions Firmware/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3403,8 +3403,6 @@ static void mmu_M600_load_filament(bool automatic) {
static void gcode_M600(const bool automatic, const float x_position, const float y_position, const float z_shift, const float e_shift, const float e_shift_late) {
st_synchronize();

lcd_setstatuspgm(MSG_FILAMENTCHANGE);

// When using an MMU, save the currently use slot number
// so the firmware can know which slot to eject after the filament
// is unloaded.
Expand Down Expand Up @@ -3477,8 +3475,6 @@ static void gcode_M600(const bool automatic, const float x_position, const float
}
while (repeat);

lcd_clear_generic_use_text();

lcd_update_enable(true);

// Not let's go back to print
Expand Down Expand Up @@ -6544,11 +6540,8 @@ SERIAL_PROTOCOLPGM("\n\n");
*/
case 117: {
const char *src = strchr_pointer + 4; // "M117"
while (*src == ' ') src++;
lcd_setstatus(src);
lcd_setstatus(*src == ' '? src + 1: src);
custom_message_type = CustomMsg::M117;

lcd_set_generic_use_text(src);
}
break;

Expand Down
24 changes: 2 additions & 22 deletions Firmware/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ static uint8_t lcd_status_message_level;
static uint8_t lcd_status_message_idx = 0;
static char lcd_status_message[LCD_WIDTH + 1];

/* Buffer for a generic LCD text */
static char lcd_generic_use_text[LCD_WIDTH + 1];

/* !Configuration settings */

static uint8_t lay1cal_filament = 0;
Expand Down Expand Up @@ -2124,18 +2121,12 @@ void lcd_wait_interact() {

lcd_clear();

lcd_puts_P(_i("Insert filament"));////MSG_INSERT_FILAMENT c=20
lcd_set_cursor(0, 1);
if (lcd_generic_use_text[0]) {
lcd_print(lcd_generic_use_text);
lcd_set_cursor(0, 2);
}

lcd_puts_at_P(0, 1, _i("Insert filament"));////MSG_INSERT_FILAMENT c=20
#ifdef FILAMENT_SENSOR
if (!fsensor.getAutoLoadEnabled())
#endif //FILAMENT_SENSOR
{
lcd_puts_P(_i("and press the knob"));////MSG_PRESS c=20 r=2
lcd_puts_at_P(0, 2, _i("and press the knob"));////MSG_PRESS c=20 r=2
}
}

Expand Down Expand Up @@ -7251,17 +7242,6 @@ uint8_t get_message_level()
return lcd_status_message_level;
}

void lcd_set_generic_use_text(const char *text)
{
strncpy(lcd_generic_use_text, text, LCD_WIDTH);
lcd_generic_use_text[LCD_WIDTH] = 0;
}

void lcd_clear_generic_use_text()
{
lcd_generic_use_text[0] = 0;
}

void menu_lcd_longpress_func(void)
{
// Wake up the LCD backlight and,
Expand Down
4 changes: 0 additions & 4 deletions Firmware/ultralcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ void lcd_reset_status_message_timeout();
void lcd_setalertstatus(const char* message, uint8_t severity = LCD_STATUS_ALERT);
void lcd_setalertstatuspgm(const char* message, uint8_t severity = LCD_STATUS_ALERT);

// Manage the generic use text content
void lcd_set_generic_use_text(const char *message);
void lcd_clear_generic_use_text();

//! Get/reset the current alert level
uint8_t get_message_level();
void lcd_reset_alert_level();
Expand Down
2 changes: 1 addition & 1 deletion lang/po/Firmware_fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -2435,7 +2435,7 @@ msgstr "Offset point [0;0]"
#. MSG_PRESS c=20 r=2
#: ../../Firmware/ultralcd.cpp:2123
msgid "and press the knob"
msgstr "et appuyez\nsur le bouton"
msgstr "et appuyez sur le bouton"

#. MSG_TO_LOAD_FIL c=20
#: ../../Firmware/ultralcd.cpp:1783
Expand Down
2 changes: 1 addition & 1 deletion lang/po/Firmware_hu.po
Original file line number Diff line number Diff line change
Expand Up @@ -2424,7 +2424,7 @@ msgstr "[0;0] pont offszet"
#. MSG_PRESS c=20 r=2
#: ../../Firmware/ultralcd.cpp:2123
msgid "and press the knob"
msgstr "es nyomd meg\na gombot"
msgstr "es nyomd meg a gombot"

#. MSG_TO_LOAD_FIL c=20
#: ../../Firmware/ultralcd.cpp:1783
Expand Down

0 comments on commit b99a91b

Please sign in to comment.