preHeat @ filament management

another funcionality III / autoLoad
This commit is contained in:
MRprusa3d 2019-02-26 17:33:37 +01:00
parent c0a8d87e9e
commit ff35119ef3
3 changed files with 16 additions and 9 deletions

View File

@ -7482,8 +7482,8 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
#ifdef FILAMENT_SENSOR #ifdef FILAMENT_SENSOR
if (mmu_enabled == false) if (mmu_enabled == false)
{ {
//-// if ((mcode_in_progress != 600) && (eFilamentAction != e_FILAMENT_ACTION_autoLoad)) //M600 not in progress, preHeat @ autoLoad menu not active //-// if (mcode_in_progress != 600) //M600 not in progress
if (mcode_in_progress != 600) //M600 not in progress if ((mcode_in_progress != 600) && (eFilamentAction != e_FILAMENT_ACTION_autoLoad)) //M600 not in progress, preHeat @ autoLoad menu not active
{ {
if (!moves_planned() && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LCD_COMMAND_V2_CAL) && !wizard_active) if (!moves_planned() && !IS_SD_PRINTING && !is_usb_printing && (lcd_commands_type != LCD_COMMAND_V2_CAL) && !wizard_active)
{ {
@ -7492,8 +7492,8 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
#ifdef PAT9125 #ifdef PAT9125
fsensor_autoload_check_stop(); fsensor_autoload_check_stop();
#endif //PAT9125 #endif //PAT9125
//-// //-// if (degHotend0() > EXTRUDE_MINTEMP)
if (degHotend0() > EXTRUDE_MINTEMP) if(0)
{ {
if ((eSoundMode == e_SOUND_MODE_LOUD) || (eSoundMode == e_SOUND_MODE_ONCE)) if ((eSoundMode == e_SOUND_MODE_LOUD) || (eSoundMode == e_SOUND_MODE_ONCE))
_tone(BEEPER, 1000); _tone(BEEPER, 1000);
@ -7504,23 +7504,24 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
} }
else else
{ {
/*
lcd_update_enable(false); lcd_update_enable(false);
show_preheat_nozzle_warning(); show_preheat_nozzle_warning();
lcd_update_enable(true); lcd_update_enable(true);
/* */
eFilamentAction=e_FILAMENT_ACTION_autoLoad; eFilamentAction=e_FILAMENT_ACTION_autoLoad;
bFilamentFirstRun=false; bFilamentFirstRun=false;
if(target_temperature[0]>=EXTRUDE_MINTEMP) if(target_temperature[0]>=EXTRUDE_MINTEMP)
{ {
bFilamentPreheatState=true; bFilamentPreheatState=true;
mFilamentItem(target_temperature[0],target_temperature_bed); // mFilamentItem(target_temperature[0],target_temperature_bed);
menu_submenu(mFilamentItemForce);
} }
else else
{ {
menu_submenu(mFilamentMenu); menu_submenu(mFilamentMenu);
lcd_timeoutToStatus.start(); lcd_timeoutToStatus.start();
} }
*/
} }
} }
} }

View File

@ -2499,12 +2499,12 @@ if(current_temperature[0]>(target_temperature[0]*0.95))
{ {
loading_flag=true; loading_flag=true;
enquecommand_P(PSTR("M701")); // load filament enquecommand_P(PSTR("M701")); // load filament
if(eFilamentAction==e_FILAMENT_ACTION_autoLoad)
eFilamentAction=e_FILAMENT_ACTION_none; // i.e. non-autoLoad
} }
if(eFilamentAction==e_FILAMENT_ACTION_unLoad) if(eFilamentAction==e_FILAMENT_ACTION_unLoad)
enquecommand_P(PSTR("M702")); // unload filament enquecommand_P(PSTR("M702")); // unload filament
} }
//./if(eFilamentAction==e_FILAMENT_ACTION_autoLoad)
//./ eFilamentAction=e_FILAMENT_ACTION_none; // i.e. non-autoLoad
break; break;
case e_FILAMENT_ACTION_mmuLoad: case e_FILAMENT_ACTION_mmuLoad:
nLevel=bFilamentPreheatState?1:2; nLevel=bFilamentPreheatState?1:2;
@ -2628,6 +2628,11 @@ MENU_ITEM_SUBMENU_P(PSTR("FLEX - " STRINGIFY(FLEX_PREHEAT_HOTEND_TEMP) "/" STRI
MENU_END(); MENU_END();
} }
void mFilamentItemForce()
{
mFilamentItem(target_temperature[0],target_temperature_bed);
}
void lcd_unLoadFilament() void lcd_unLoadFilament()
{ {

View File

@ -140,6 +140,7 @@ extern bool bFilamentFirstRun;
extern bool bFilamentPreheatState; extern bool bFilamentPreheatState;
extern bool bFilamentAction; extern bool bFilamentAction;
void mFilamentItem(uint16_t nTemp,uint16_t nTempBed); void mFilamentItem(uint16_t nTemp,uint16_t nTempBed);
void mFilamentItemForce();
void mFilamentMenu(); void mFilamentMenu();
void unload_filament(); void unload_filament();