autoload filament menu (PFW-95, PFW-96)

This commit is contained in:
Robert Pelnar 2017-12-27 21:57:51 +01:00
parent cbd7f033e8
commit 69d496e157
4 changed files with 16 additions and 3 deletions

View file

@ -34,6 +34,11 @@ const char * const MSG_AUTHOR_LANG_TABLE[1] PROGMEM = {
MSG_AUTHOR_EN
};
const char MSG_AUTOLOAD_FILAMENT_EN[] PROGMEM = "AUTOLoad filament";
const char * const MSG_AUTOLOAD_FILAMENT_LANG_TABLE[1] PROGMEM = {
MSG_AUTOLOAD_FILAMENT_EN
};
const char MSG_AUTO_HOME_EN[] PROGMEM = "Auto home";
const char * const MSG_AUTO_HOME_LANG_TABLE[1] PROGMEM = {
MSG_AUTO_HOME_EN

View file

@ -32,6 +32,8 @@ extern const char* const MSG_AMAX_LANG_TABLE[1];
#define MSG_AMAX LANG_TABLE_SELECT_EXPLICIT(MSG_AMAX_LANG_TABLE, 0)
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_AUTOLOAD_FILAMENT_LANG_TABLE[1];
#define MSG_AUTOLOAD_FILAMENT LANG_TABLE_SELECT_EXPLICIT(MSG_AUTOLOAD_FILAMENT_LANG_TABLE, 0)
extern const char* const MSG_AUTO_HOME_LANG_TABLE[1];
#define MSG_AUTO_HOME LANG_TABLE_SELECT_EXPLICIT(MSG_AUTO_HOME_LANG_TABLE, 0)
extern const char* const MSG_A_RETRACT_LANG_TABLE[1];

View file

@ -70,6 +70,7 @@
#define MSG_SETTINGS "Settings"
#define MSG_PREHEAT "Preheat"
#define(length=17) MSG_UNLOAD_FILAMENT "Unload filament"
#define(length=17) MSG_AUTOLOAD_FILAMENT "AUTOLoad filament"
#define(length=17) MSG_LOAD_FILAMENT "Load filament"
#define(length=17) MSG_LOAD_FILAMENT_1 "Load filament 1"
#define(length=17) MSG_LOAD_FILAMENT_2 "Load filament 2"

View file

@ -1930,11 +1930,16 @@ void lcd_LoadFilament()
{
if (degHotend0() > EXTRUDE_MINTEMP)
{
if (filament_autoload_enabled)
{
lcd_show_fullscreen_message_and_wait_P(PSTR("Autoloading filament is active, just insert filament..."));
return;
}
custom_message = true;
loading_flag = true;
enquecommand_P(PSTR("M701")); //load filament
SERIAL_ECHOLN("Loading filament");
}
}
else
{
@ -5034,9 +5039,9 @@ static void lcd_main_menu()
{
#ifndef SNMM
if (!filament_autoload_enabled)
{
MENU_ITEM(function, MSG_LOAD_FILAMENT, lcd_LoadFilament);
}
else
MENU_ITEM(function, MSG_AUTOLOAD_FILAMENT, lcd_LoadFilament);
MENU_ITEM(function, MSG_UNLOAD_FILAMENT, lcd_unLoadFilament);
#endif
#ifdef SNMM