diff --git a/Firmware/Configuration.h b/Firmware/Configuration.h index b0dfcb1b..31d47195 100644 --- a/Firmware/Configuration.h +++ b/Firmware/Configuration.h @@ -9,7 +9,7 @@ // Firmware version #define FW_version "3.1.1-RC4" -#define FW_build 139g +#define FW_build 140 //#define FW_build --BUILD-NUMBER-- #define FW_version_build FW_version " b" STR(FW_build) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 6628d481..1c1ec77b 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -6422,17 +6422,35 @@ void handle_status_leds(void) { void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument set in Marlin.h { - if (fsensor_enabled && filament_autoload_enabled && !fsensor_M600 && !moves_planned() && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LCD_COMMAND_V2_CAL) && (current_temperature[0] > EXTRUDE_MINTEMP)) + if (fsensor_enabled && filament_autoload_enabled && !fsensor_M600 && !moves_planned() && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LCD_COMMAND_V2_CAL)) { if (fsensor_autoload_enabled) { if (fsensor_check_autoload()) { - fsensor_autoload_check_stop(); - tone(BEEPER, 1000); - delay_keep_alive(50); - noTone(BEEPER); - enquecommand_front_P((PSTR("M701"))); + + if (degHotend0() > EXTRUDE_MINTEMP) + { + fsensor_autoload_check_stop(); + tone(BEEPER, 1000); + delay_keep_alive(50); + noTone(BEEPER); + loading_flag = true; + enquecommand_front_P((PSTR("M701"))); + } + else + { + lcd_update_enable(false); + lcd_implementation_clear(); + lcd.setCursor(0, 0); + lcd_printPGM(MSG_ERROR); + lcd.setCursor(0, 2); + lcd_printPGM(MSG_PREHEAT_NOZZLE); + delay(2000); + lcd_implementation_clear(); + lcd_update_enable(true); + } + } } else diff --git a/Firmware/language_all.cpp b/Firmware/language_all.cpp index fce37efb..27d4c1e0 100644 --- a/Firmware/language_all.cpp +++ b/Firmware/language_all.cpp @@ -35,12 +35,19 @@ const char * const MSG_AUTHOR_LANG_TABLE[1] PROGMEM = { }; const char MSG_AUTOLOADING_ENABLED_EN[] PROGMEM = "Autoloading filament is active, just press the knob and insert filament..."; -const char MSG_AUTOLOADING_ENABLED_CZ[] PROGMEM = "Automaticke zavedeni filamentu aktivni, stisknete tlacitko a vlozte filament..."; +const char MSG_AUTOLOADING_ENABLED_CZ[] PROGMEM = "Automaticke zavadeni filamentu aktivni, stisknete tlacitko a vlozte filament..."; const char * const MSG_AUTOLOADING_ENABLED_LANG_TABLE[LANG_NUM] PROGMEM = { MSG_AUTOLOADING_ENABLED_EN, MSG_AUTOLOADING_ENABLED_CZ }; +const char MSG_AUTOLOADING_ONLY_IF_FSENS_ON_EN[] PROGMEM = "Autoloading filament available only when filament sensor is turned on..."; +const char MSG_AUTOLOADING_ONLY_IF_FSENS_ON_CZ[] PROGMEM = "Automaticke zavadeni filamentu dostupne pouze pri zapnutem filament senzoru..."; +const char * const MSG_AUTOLOADING_ONLY_IF_FSENS_ON_LANG_TABLE[LANG_NUM] PROGMEM = { + MSG_AUTOLOADING_ONLY_IF_FSENS_ON_EN, + MSG_AUTOLOADING_ONLY_IF_FSENS_ON_CZ +}; + const char MSG_AUTOLOAD_FILAMENT_EN[] PROGMEM = "AutoLoad filament"; const char MSG_AUTOLOAD_FILAMENT_CZ[] PROGMEM = "AutoZavedeni fil."; const char * const MSG_AUTOLOAD_FILAMENT_LANG_TABLE[LANG_NUM] PROGMEM = { @@ -423,8 +430,10 @@ const char * const MSG_CRASHDETECT_ON_LANG_TABLE[LANG_NUM] PROGMEM = { }; const char MSG_CRASH_DETECTED_EN[] PROGMEM = "Crash detected. Continue printing?"; -const char * const MSG_CRASH_DETECTED_LANG_TABLE[1] PROGMEM = { - MSG_CRASH_DETECTED_EN +const char MSG_CRASH_DETECTED_CZ[] PROGMEM = "Naraz detekovan, pokracovat v tisku?"; +const char * const MSG_CRASH_DETECTED_LANG_TABLE[LANG_NUM] PROGMEM = { + MSG_CRASH_DETECTED_EN, + MSG_CRASH_DETECTED_CZ }; const char MSG_CRASH_DET_ONLY_IN_NORMAL_EN[] PROGMEM = "Crash detection can be turned on only in Normal mode."; @@ -624,7 +633,7 @@ const char * const MSG_FILAMENTCHANGE_LANG_TABLE[LANG_NUM] PROGMEM = { MSG_FILAMENTCHANGE_CZ }; -const char MSG_FILAMENT_CLEAN_EN[] PROGMEM = "Filament extruding & with right color?"; +const char MSG_FILAMENT_CLEAN_EN[] PROGMEM = "Filament extruding & with correct color?"; const char MSG_FILAMENT_CLEAN_CZ[] PROGMEM = "Filament vytlacen a spravne barvy?"; const char * const MSG_FILAMENT_CLEAN_LANG_TABLE[LANG_NUM] PROGMEM = { MSG_FILAMENT_CLEAN_EN, @@ -760,7 +769,7 @@ const char * const MSG_FREE_MEMORY_LANG_TABLE[1] PROGMEM = { }; const char MSG_FSENSOR_NA_EN[] PROGMEM = "Fil. sensor [N/A]"; -const char MSG_FSENSOR_NA_CZ[] PROGMEM = "Fil. senzor [err]"; +const char MSG_FSENSOR_NA_CZ[] PROGMEM = "Fil. senzor [N/A]"; const char * const MSG_FSENSOR_NA_LANG_TABLE[LANG_NUM] PROGMEM = { MSG_FSENSOR_NA_EN, MSG_FSENSOR_NA_CZ @@ -780,20 +789,34 @@ const char * const MSG_FSENSOR_ON_LANG_TABLE[LANG_NUM] PROGMEM = { MSG_FSENSOR_ON_CZ }; +const char MSG_FSENS_AUTOLOAD_NA_EN[] PROGMEM = "F. autoload [N/A]"; +const char MSG_FSENS_AUTOLOAD_NA_CZ[] PROGMEM = "F. autozav. [N/A]"; +const char * const MSG_FSENS_AUTOLOAD_NA_LANG_TABLE[LANG_NUM] PROGMEM = { + MSG_FSENS_AUTOLOAD_NA_EN, + MSG_FSENS_AUTOLOAD_NA_CZ +}; + const char MSG_FSENS_AUTOLOAD_OFF_EN[] PROGMEM = "F. autoload [off]"; -const char MSG_FSENS_AUTOLOAD_OFF_CZ[] PROGMEM = "F. autozav. [off]"; +const char MSG_FSENS_AUTOLOAD_OFF_CZ[] PROGMEM = "F. autozav. [vyp]"; const char * const MSG_FSENS_AUTOLOAD_OFF_LANG_TABLE[LANG_NUM] PROGMEM = { MSG_FSENS_AUTOLOAD_OFF_EN, MSG_FSENS_AUTOLOAD_OFF_CZ }; const char MSG_FSENS_AUTOLOAD_ON_EN[] PROGMEM = "F. autoload [on]"; -const char MSG_FSENS_AUTOLOAD_ON_CZ[] PROGMEM = "F. autozav. [on]"; +const char MSG_FSENS_AUTOLOAD_ON_CZ[] PROGMEM = "F. autozav. [zap]"; const char * const MSG_FSENS_AUTOLOAD_ON_LANG_TABLE[LANG_NUM] PROGMEM = { MSG_FSENS_AUTOLOAD_ON_EN, MSG_FSENS_AUTOLOAD_ON_CZ }; +const char MSG_FSENS_NOT_RESPONDING_EN[] PROGMEM = "ERROR: Filament sensor is not responding, please check connection."; +const char MSG_FSENS_NOT_RESPONDING_CZ[] PROGMEM = "CHYBA: Filament senzor nereaguje, zkontrolujte zapojeni."; +const char * const MSG_FSENS_NOT_RESPONDING_LANG_TABLE[LANG_NUM] PROGMEM = { + MSG_FSENS_NOT_RESPONDING_EN, + MSG_FSENS_NOT_RESPONDING_CZ +}; + const char MSG_HEATING_EN[] PROGMEM = "Heating"; const char MSG_HEATING_CZ[] PROGMEM = "Zahrivani"; const char * const MSG_HEATING_LANG_TABLE[LANG_NUM] PROGMEM = { @@ -1201,7 +1224,7 @@ const char * const MSG_NO_LANG_TABLE[LANG_NUM] PROGMEM = { MSG_NO_CZ }; -const char MSG_NOT_COLOR_EN[] PROGMEM = "Color not right"; +const char MSG_NOT_COLOR_EN[] PROGMEM = "Color not correct"; const char MSG_NOT_COLOR_CZ[] PROGMEM = "Barva neni cista"; const char * const MSG_NOT_COLOR_LANG_TABLE[LANG_NUM] PROGMEM = { MSG_NOT_COLOR_EN, @@ -1604,13 +1627,17 @@ const char * const MSG_SD_WRITE_TO_FILE_LANG_TABLE[1] PROGMEM = { }; const char MSG_SECOND_SERIAL_OFF_EN[] PROGMEM = "RPi port [off]"; -const char * const MSG_SECOND_SERIAL_OFF_LANG_TABLE[1] PROGMEM = { - MSG_SECOND_SERIAL_OFF_EN +const char MSG_SECOND_SERIAL_OFF_CZ[] PROGMEM = "RPi port [vyp]"; +const char * const MSG_SECOND_SERIAL_OFF_LANG_TABLE[LANG_NUM] PROGMEM = { + MSG_SECOND_SERIAL_OFF_EN, + MSG_SECOND_SERIAL_OFF_CZ }; const char MSG_SECOND_SERIAL_ON_EN[] PROGMEM = "RPi port [on]"; -const char * const MSG_SECOND_SERIAL_ON_LANG_TABLE[1] PROGMEM = { - MSG_SECOND_SERIAL_ON_EN +const char MSG_SECOND_SERIAL_ON_CZ[] PROGMEM = "RPi port [zap]"; +const char * const MSG_SECOND_SERIAL_ON_LANG_TABLE[LANG_NUM] PROGMEM = { + MSG_SECOND_SERIAL_ON_EN, + MSG_SECOND_SERIAL_ON_CZ }; const char MSG_SELFTEST_EN[] PROGMEM = "Selftest "; diff --git a/Firmware/language_all.h b/Firmware/language_all.h index 207b5c3d..d9577ca2 100644 --- a/Firmware/language_all.h +++ b/Firmware/language_all.h @@ -34,6 +34,8 @@ extern const char* const MSG_AUTHOR_LANG_TABLE[1]; #define MSG_AUTHOR LANG_TABLE_SELECT_EXPLICIT(MSG_AUTHOR_LANG_TABLE, 0) extern const char* const MSG_AUTOLOADING_ENABLED_LANG_TABLE[LANG_NUM]; #define MSG_AUTOLOADING_ENABLED LANG_TABLE_SELECT(MSG_AUTOLOADING_ENABLED_LANG_TABLE) +extern const char* const MSG_AUTOLOADING_ONLY_IF_FSENS_ON_LANG_TABLE[LANG_NUM]; +#define MSG_AUTOLOADING_ONLY_IF_FSENS_ON LANG_TABLE_SELECT(MSG_AUTOLOADING_ONLY_IF_FSENS_ON_LANG_TABLE) extern const char* const MSG_AUTOLOAD_FILAMENT_LANG_TABLE[LANG_NUM]; #define MSG_AUTOLOAD_FILAMENT LANG_TABLE_SELECT(MSG_AUTOLOAD_FILAMENT_LANG_TABLE) extern const char* const MSG_AUTO_HOME_LANG_TABLE[1]; @@ -152,8 +154,8 @@ extern const char* const MSG_CRASHDETECT_OFF_LANG_TABLE[LANG_NUM]; #define MSG_CRASHDETECT_OFF LANG_TABLE_SELECT(MSG_CRASHDETECT_OFF_LANG_TABLE) extern const char* const MSG_CRASHDETECT_ON_LANG_TABLE[LANG_NUM]; #define MSG_CRASHDETECT_ON LANG_TABLE_SELECT(MSG_CRASHDETECT_ON_LANG_TABLE) -extern const char* const MSG_CRASH_DETECTED_LANG_TABLE[1]; -#define MSG_CRASH_DETECTED LANG_TABLE_SELECT_EXPLICIT(MSG_CRASH_DETECTED_LANG_TABLE, 0) +extern const char* const MSG_CRASH_DETECTED_LANG_TABLE[LANG_NUM]; +#define MSG_CRASH_DETECTED LANG_TABLE_SELECT(MSG_CRASH_DETECTED_LANG_TABLE) extern const char* const MSG_CRASH_DET_ONLY_IN_NORMAL_LANG_TABLE[LANG_NUM]; #define MSG_CRASH_DET_ONLY_IN_NORMAL LANG_TABLE_SELECT(MSG_CRASH_DET_ONLY_IN_NORMAL_LANG_TABLE) extern const char* const MSG_CRASH_DET_STEALTH_FORCE_OFF_LANG_TABLE[LANG_NUM]; @@ -272,10 +274,14 @@ extern const char* const MSG_FSENSOR_OFF_LANG_TABLE[LANG_NUM]; #define MSG_FSENSOR_OFF LANG_TABLE_SELECT(MSG_FSENSOR_OFF_LANG_TABLE) extern const char* const MSG_FSENSOR_ON_LANG_TABLE[LANG_NUM]; #define MSG_FSENSOR_ON LANG_TABLE_SELECT(MSG_FSENSOR_ON_LANG_TABLE) +extern const char* const MSG_FSENS_AUTOLOAD_NA_LANG_TABLE[LANG_NUM]; +#define MSG_FSENS_AUTOLOAD_NA LANG_TABLE_SELECT(MSG_FSENS_AUTOLOAD_NA_LANG_TABLE) extern const char* const MSG_FSENS_AUTOLOAD_OFF_LANG_TABLE[LANG_NUM]; #define MSG_FSENS_AUTOLOAD_OFF LANG_TABLE_SELECT(MSG_FSENS_AUTOLOAD_OFF_LANG_TABLE) extern const char* const MSG_FSENS_AUTOLOAD_ON_LANG_TABLE[LANG_NUM]; #define MSG_FSENS_AUTOLOAD_ON LANG_TABLE_SELECT(MSG_FSENS_AUTOLOAD_ON_LANG_TABLE) +extern const char* const MSG_FSENS_NOT_RESPONDING_LANG_TABLE[LANG_NUM]; +#define MSG_FSENS_NOT_RESPONDING LANG_TABLE_SELECT(MSG_FSENS_NOT_RESPONDING_LANG_TABLE) extern const char* const MSG_HEATING_LANG_TABLE[LANG_NUM]; #define MSG_HEATING LANG_TABLE_SELECT(MSG_HEATING_LANG_TABLE) extern const char* const MSG_HEATING_COMPLETE_LANG_TABLE[LANG_NUM]; @@ -540,10 +546,10 @@ extern const char* const MSG_SD_WORKDIR_FAIL_LANG_TABLE[1]; #define MSG_SD_WORKDIR_FAIL LANG_TABLE_SELECT_EXPLICIT(MSG_SD_WORKDIR_FAIL_LANG_TABLE, 0) extern const char* const MSG_SD_WRITE_TO_FILE_LANG_TABLE[1]; #define MSG_SD_WRITE_TO_FILE LANG_TABLE_SELECT_EXPLICIT(MSG_SD_WRITE_TO_FILE_LANG_TABLE, 0) -extern const char* const MSG_SECOND_SERIAL_OFF_LANG_TABLE[1]; -#define MSG_SECOND_SERIAL_OFF LANG_TABLE_SELECT_EXPLICIT(MSG_SECOND_SERIAL_OFF_LANG_TABLE, 0) -extern const char* const MSG_SECOND_SERIAL_ON_LANG_TABLE[1]; -#define MSG_SECOND_SERIAL_ON LANG_TABLE_SELECT_EXPLICIT(MSG_SECOND_SERIAL_ON_LANG_TABLE, 0) +extern const char* const MSG_SECOND_SERIAL_OFF_LANG_TABLE[LANG_NUM]; +#define MSG_SECOND_SERIAL_OFF LANG_TABLE_SELECT(MSG_SECOND_SERIAL_OFF_LANG_TABLE) +extern const char* const MSG_SECOND_SERIAL_ON_LANG_TABLE[LANG_NUM]; +#define MSG_SECOND_SERIAL_ON LANG_TABLE_SELECT(MSG_SECOND_SERIAL_ON_LANG_TABLE) extern const char* const MSG_SELFTEST_LANG_TABLE[1]; #define MSG_SELFTEST LANG_TABLE_SELECT_EXPLICIT(MSG_SELFTEST_LANG_TABLE, 0) extern const char* const MSG_SELFTEST_AXIS_LANG_TABLE[LANG_NUM]; diff --git a/Firmware/language_cz.h b/Firmware/language_cz.h index 7237c920..15eee1dc 100644 --- a/Firmware/language_cz.h +++ b/Firmware/language_cz.h @@ -348,7 +348,7 @@ ve #define MSG_CALIBRATE_Z_AUTO "Kalibruji Z" #define MSG_FSENSOR_OFF "Fil. senzor [vyp]" -#define MSG_FSENSOR_NA "Fil. senzor [err]" +#define MSG_FSENSOR_NA "Fil. senzor [N/A]" #define MSG_FSENSOR_ON "Fil. senzor [zap]" #define MSG_CRASHDETECT_ON "Crash det. [zap]" #define MSG_CRASHDETECT_NA "Crash det. [N/A]" @@ -357,7 +357,10 @@ ve #define MSG_FANS_CHECK_OFF "Kontr. vent.[vyp]" #define(length=17, lines=1) MSG_FSENS_AUTOLOAD_ON "F. autozav. [zap]" #define(length=17, lines=1) MSG_FSENS_AUTOLOAD_OFF "F. autozav. [vyp]" +#define(length=17, lines=1) MSG_FSENS_AUTOLOAD_NA "F. autozav. [N/A]" #define MSG_RECOVERING_PRINT "Obnovovani tisku " +#define(length=20, lines=2) MSG_CRASH_DETECTED "Naraz detekovan, pokracovat v tisku?" + #define MSG_SELFTEST_AXIS "Osa" #define MSG_SELFTEST_AXIS_LENGTH "Delka osy" #define MSG_STEEL_SHEET_CHECK "Je tiskovy plat na heatbed?" @@ -374,11 +377,11 @@ ve #define(length=20, lines=1) MSG_SORTING "Trideni souboru" -#define(length=11, lines=1) MSG_INFO_NOZZLE_FAN "Trysk. vent:" -#define(length=11, lines=1) MSG_INFO_PRINT_FAN "Tisk. vent:" +#define(length=12, lines=1) MSG_INFO_NOZZLE_FAN "Trysk. vent:" +#define(length=12, lines=1) MSG_INFO_PRINT_FAN "Tisk. vent:" -#define(length=17, lines=1) MSG_SECOND_SERIAL_ON "RPi port [zap]" +#define(length=17, lines=1) MSG_SECOND_SERIAL_ON "RPi port [zap]" #define(length=17, lines=1) MSG_SECOND_SERIAL_OFF "RPi port [vyp]" #define(length=15, lines=1) MSG_INFO_EXTRUDER "Extruder info" @@ -389,4 +392,8 @@ ve #define(length=20, lines=4) MSG_CRASH_DET_ONLY_IN_NORMAL "Crash detekce muze byt zapnuta pouze v Normal modu" #define(length=20, lines=4) MSG_CRASH_DET_STEALTH_FORCE_OFF "POZOR: Crash detekce deaktivovana ve Stealth modu" -#define(length=20, lines=4) MSG_AUTOLOADING_ENABLED "Automaticke zavedeni filamentu aktivni, stisknete tlacitko a vlozte filament..." +#define(length=20, lines=4) MSG_AUTOLOADING_ENABLED "Automaticke zavadeni filamentu aktivni, stisknete tlacitko a vlozte filament..." +#define(length=20, lines=4) MSG_AUTOLOADING_ONLY_IF_FSENS_ON "Automaticke zavadeni filamentu dostupne pouze pri zapnutem filament senzoru..." + +#define(length=20, lines=4) MSG_FSENS_NOT_RESPONDING "CHYBA: Filament senzor nereaguje, zkontrolujte zapojeni." + diff --git a/Firmware/language_en.h b/Firmware/language_en.h index a79dba0c..2a17a710 100644 --- a/Firmware/language_en.h +++ b/Firmware/language_en.h @@ -92,7 +92,7 @@ #define MSG_YES "Yes" #define MSG_NO "No" #define(length=19) MSG_NOT_LOADED "Filament not loaded" -#define MSG_NOT_COLOR "Color not right" +#define MSG_NOT_COLOR "Color not correct" #define(length=20) MSG_LOADING_FILAMENT "Loading filament" #define(length=20) MSG_PLEASE_WAIT "Please wait" #define MSG_LOADING_COLOR "Loading color" @@ -269,8 +269,8 @@ #define(length=20, lines=8) MSG_MARK_FIL "Mark filament 100mm from extruder body. Click when done." #define(length=20, lines=8) MSG_CLEAN_NOZZLE_E "E calibration finished. Please clean the nozzle. Click when done." #define(length=20, lines=3) MSG_WAITING_TEMP "Waiting for nozzle and bed cooling" -#define(length=20, lines=2) MSG_FILAMENT_CLEAN "Filament extruding & with right color?" -#define(lenght=18, lines=1) MSG_UNLOADING_FILAMENT "Unloading filament" +#define(length=20, lines=2) MSG_FILAMENT_CLEAN "Filament extruding & with correct color?" +#define(lenght=20, lines=1) MSG_UNLOADING_FILAMENT "Unloading filament" #define(length=20, lines=8) MSG_PAPER "Place a sheet of paper under the nozzle during the calibration of first 4 points. If the nozzle catches the paper, power off the printer immediately." #define MSG_BED_CORRECTION_MENU "Bed level correct" @@ -381,6 +381,7 @@ #define(length=17, lines=1) MSG_FANS_CHECK_OFF "Fans check [off]" #define(length=17, lines=1) MSG_FSENS_AUTOLOAD_ON "F. autoload [on]" #define(length=17, lines=1) MSG_FSENS_AUTOLOAD_OFF "F. autoload [off]" +#define(length=17, lines=1) MSG_FSENS_AUTOLOAD_NA "F. autoload [N/A]" #define(length=20, lines=4) MSG_PRESS_TO_UNLOAD "Please press the knob to unload filament" #define(length=20, lines=2) MSG_UNLOAD_SUCCESSFULL "Repeat unloading filament?" #define(length=20, lines=2) MSG_FILE_INCOMPLETE "File incomplete. Continue anyway?" @@ -397,5 +398,7 @@ #define(length=20, lines=4) MSG_CRASH_DET_ONLY_IN_NORMAL "Crash detection can be turned on only in Normal mode." #define(length=20, lines=4) MSG_CRASH_DET_STEALTH_FORCE_OFF "WARNING: Crash detection disabled in Stealth mode" -#define(length=20, lines=4) MSG_AUTOLOADING_ENABLED "Autoloading filament is active, just press the knob and insert filament..." +#define(length=20, lines=4) MSG_AUTOLOADING_ENABLED "Autoloading filament is active, just press the knob and insert filament..." +#define(length=20, lines=4) MSG_AUTOLOADING_ONLY_IF_FSENS_ON "Autoloading filament available only when filament sensor is turned on..." +#define(length=20, lines=4) MSG_FSENS_NOT_RESPONDING "ERROR: Filament sensor is not responding, please check connection." diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 5ca3bad3..a7503a13 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -33,6 +33,10 @@ extern int lcd_change_fil_state; extern bool fans_check_enabled; extern bool filament_autoload_enabled; +extern bool fsensor_not_responding; + +extern bool fsensor_enabled; + //Function pointer to menu functions. typedef void (*menuFunc_t)(); @@ -1933,7 +1937,7 @@ void lcd_LoadFilament() { if (degHotend0() > EXTRUDE_MINTEMP) { - if (filament_autoload_enabled) + if (filament_autoload_enabled && fsensor_enabled) { lcd_show_fullscreen_message_and_wait_P(MSG_AUTOLOADING_ENABLED); return; @@ -3294,6 +3298,15 @@ static void lcd_crash_mode_info2() lcd_show_fullscreen_message_and_wait_P(MSG_CRASH_DET_STEALTH_FORCE_OFF); } +static void lcd_filament_autoload_info() +{ + lcd_show_fullscreen_message_and_wait_P(MSG_AUTOLOADING_ONLY_IF_FSENS_ON); +} + +static void lcd_fsensor_fail() +{ + lcd_show_fullscreen_message_and_wait_P(MSG_FSENS_NOT_RESPONDING); +} static void lcd_silent_mode_set() { SilentModeMenu = !SilentModeMenu; @@ -3350,8 +3363,15 @@ static void lcd_fsensor_state_set() FSensorStateMenu = !FSensorStateMenu; //set also from fsensor_enable() and fsensor_disable() if (FSensorStateMenu==0) { fsensor_disable(); + if ((filament_autoload_enabled == true)){ + lcd_filament_autoload_info(); + } }else{ fsensor_enable(); + if (fsensor_not_responding) + { + lcd_fsensor_fail(); + } } if (IS_SD_PRINTING || is_usb_printing || (lcd_commands_type == LCD_COMMAND_V2_CAL)) lcd_goto_menu(lcd_tune_menu, 7); else lcd_goto_menu(lcd_settings_menu, 7); @@ -3745,7 +3765,7 @@ static void lcd_crash_menu() { } -extern bool fsensor_not_responding; + static void lcd_settings_menu() { @@ -3765,19 +3785,29 @@ static void lcd_settings_menu() } if (FSensorStateMenu == 0) { - if (fsensor_not_responding) - MENU_ITEM(function, MSG_FSENSOR_NA, lcd_fsensor_state_set); - else - MENU_ITEM(function, MSG_FSENSOR_OFF, lcd_fsensor_state_set); + if (fsensor_not_responding){ + // Filament sensor not working + MENU_ITEM(function, MSG_FSENSOR_NA, lcd_fsensor_state_set); + MENU_ITEM(function, MSG_FSENS_AUTOLOAD_NA, lcd_fsensor_fail); + } + else{ + // Filament sensor turned off, working, no problems + MENU_ITEM(function, MSG_FSENSOR_OFF, lcd_fsensor_state_set); + MENU_ITEM(function, MSG_FSENS_AUTOLOAD_NA, lcd_filament_autoload_info); + } } else { - MENU_ITEM(function, MSG_FSENSOR_ON, lcd_fsensor_state_set); - } - if (filament_autoload_enabled == true) { - MENU_ITEM(function, MSG_FSENS_AUTOLOAD_ON, lcd_set_filament_autoload); - } - else { - MENU_ITEM(function, MSG_FSENS_AUTOLOAD_OFF, lcd_set_filament_autoload); + // Filament sensor turned on, working, no problems + MENU_ITEM(function, MSG_FSENSOR_ON, lcd_fsensor_state_set); + + if ((filament_autoload_enabled == true)) { + MENU_ITEM(function, MSG_FSENS_AUTOLOAD_ON, lcd_set_filament_autoload); + } + else { + MENU_ITEM(function, MSG_FSENS_AUTOLOAD_OFF, lcd_set_filament_autoload); + } + } + if (fans_check_enabled == true) { MENU_ITEM(function, MSG_FANS_CHECK_ON, lcd_set_fan_check); } @@ -5041,10 +5071,10 @@ static void lcd_main_menu() else { #ifndef SNMM - if (!filament_autoload_enabled) - MENU_ITEM(function, MSG_LOAD_FILAMENT, lcd_LoadFilament); + if ( ((filament_autoload_enabled == true) && (fsensor_enabled == true))) + MENU_ITEM(function, MSG_AUTOLOAD_FILAMENT, lcd_LoadFilament); else - MENU_ITEM(function, MSG_AUTOLOAD_FILAMENT, lcd_LoadFilament); + MENU_ITEM(function, MSG_LOAD_FILAMENT, lcd_LoadFilament); MENU_ITEM(function, MSG_UNLOAD_FILAMENT, lcd_unLoadFilament); #endif #ifdef SNMM