Fix formatting.
This commit is contained in:
parent
51d01ddd6f
commit
b9b0d6049e
1 changed files with 109 additions and 108 deletions
|
@ -2360,118 +2360,119 @@ else {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void mFilamentItem(uint16_t nTemp,uint16_t nTempBed)
|
void mFilamentItem(uint16_t nTemp, uint16_t nTempBed)
|
||||||
{
|
{
|
||||||
static int nTargetOld,nTargetBedOld;
|
static int nTargetOld;
|
||||||
uint8_t nLevel;
|
static int nTargetBedOld;
|
||||||
|
uint8_t nLevel;
|
||||||
|
|
||||||
//if(bPreheatState) // not necessary
|
nTargetOld = target_temperature[0];
|
||||||
nTargetOld=target_temperature[0];
|
nTargetBedOld = target_temperature_bed;
|
||||||
nTargetBedOld=target_temperature_bed;
|
setTargetHotend0((float )nTemp);
|
||||||
setTargetHotend0((float)nTemp);
|
setTargetBed((float) nTempBed);
|
||||||
setTargetBed((float)nTempBed);
|
|
||||||
lcd_timeoutToStatus.stop();
|
lcd_timeoutToStatus.stop();
|
||||||
if(current_temperature[0]>(target_temperature[0]*0.95))
|
|
||||||
{
|
if (current_temperature[0] > (target_temperature[0] * 0.95))
|
||||||
switch(eFilamentAction)
|
{
|
||||||
{
|
switch (eFilamentAction)
|
||||||
case FilamentAction::Load:
|
{
|
||||||
case FilamentAction::AutoLoad:
|
case FilamentAction::Load:
|
||||||
case FilamentAction::UnLoad:
|
case FilamentAction::AutoLoad:
|
||||||
if(bFilamentWaitingFlag)
|
case FilamentAction::UnLoad:
|
||||||
menu_submenu(mFilamentPrompt);
|
if (bFilamentWaitingFlag) menu_submenu(mFilamentPrompt);
|
||||||
else {
|
else
|
||||||
nLevel=bFilamentPreheatState?1:2;
|
{
|
||||||
menu_back(nLevel);
|
nLevel = bFilamentPreheatState ? 1 : 2;
|
||||||
if((eFilamentAction==FilamentAction::Load)||(eFilamentAction==FilamentAction::AutoLoad))
|
menu_back(nLevel);
|
||||||
{
|
if ((eFilamentAction == FilamentAction::Load) || (eFilamentAction == FilamentAction::AutoLoad))
|
||||||
loading_flag=true;
|
{
|
||||||
enquecommand_P(PSTR("M701")); // load filament
|
loading_flag = true;
|
||||||
if(eFilamentAction==FilamentAction::AutoLoad)
|
enquecommand_P(PSTR("M701")); // load filament
|
||||||
eFilamentAction=FilamentAction::None; // i.e. non-autoLoad
|
if (eFilamentAction == FilamentAction::AutoLoad) eFilamentAction = FilamentAction::None; // i.e. non-autoLoad
|
||||||
}
|
}
|
||||||
if(eFilamentAction==FilamentAction::UnLoad)
|
if (eFilamentAction == FilamentAction::UnLoad)
|
||||||
enquecommand_P(PSTR("M702")); // unload filament
|
enquecommand_P(PSTR("M702")); // unload filament
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FilamentAction::MmuLoad:
|
case FilamentAction::MmuLoad:
|
||||||
nLevel=bFilamentPreheatState?1:2;
|
nLevel = bFilamentPreheatState ? 1 : 2;
|
||||||
bFilamentAction=true;
|
bFilamentAction = true;
|
||||||
menu_back(nLevel);
|
menu_back(nLevel);
|
||||||
menu_submenu(mmu_load_to_nozzle_menu);
|
menu_submenu(mmu_load_to_nozzle_menu);
|
||||||
break;
|
break;
|
||||||
case FilamentAction::MmuUnLoad:
|
case FilamentAction::MmuUnLoad:
|
||||||
nLevel=bFilamentPreheatState?1:2;
|
nLevel = bFilamentPreheatState ? 1 : 2;
|
||||||
bFilamentAction=true;
|
bFilamentAction = true;
|
||||||
menu_back(nLevel);
|
menu_back(nLevel);
|
||||||
extr_unload();
|
extr_unload();
|
||||||
break;
|
break;
|
||||||
case FilamentAction::MmuEject:
|
case FilamentAction::MmuEject:
|
||||||
nLevel=bFilamentPreheatState?1:2;
|
nLevel = bFilamentPreheatState ? 1 : 2;
|
||||||
bFilamentAction=true;
|
bFilamentAction = true;
|
||||||
menu_back(nLevel);
|
menu_back(nLevel);
|
||||||
menu_submenu(mmu_fil_eject_menu);
|
menu_submenu(mmu_fil_eject_menu);
|
||||||
break;
|
break;
|
||||||
case FilamentAction::MmuCut:
|
case FilamentAction::MmuCut:
|
||||||
#ifdef MMU_HAS_CUTTER
|
#ifdef MMU_HAS_CUTTER
|
||||||
nLevel=bFilamentPreheatState?1:2;
|
nLevel=bFilamentPreheatState?1:2;
|
||||||
bFilamentAction=true;
|
bFilamentAction=true;
|
||||||
menu_back(nLevel);
|
menu_back(nLevel);
|
||||||
menu_submenu(mmu_cut_filament_menu);
|
menu_submenu(mmu_cut_filament_menu);
|
||||||
#endif //MMU_HAS_CUTTER
|
#endif //MMU_HAS_CUTTER
|
||||||
break;
|
break;
|
||||||
case FilamentAction::None:
|
case FilamentAction::None:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(bFilamentWaitingFlag)
|
if (bFilamentWaitingFlag) Sound_MakeSound(e_SOUND_TYPE_StandardPrompt);
|
||||||
Sound_MakeSound(e_SOUND_TYPE_StandardPrompt);
|
bFilamentWaitingFlag = false;
|
||||||
bFilamentWaitingFlag=false;
|
}
|
||||||
}
|
else
|
||||||
else {
|
{
|
||||||
bFilamentWaitingFlag=true;
|
bFilamentWaitingFlag = true;
|
||||||
lcd_set_cursor(0,0);
|
lcd_set_cursor(0, 0);
|
||||||
lcdui_print_temp(LCD_STR_THERMOMETER[0],(int)degHotend(0),(int)degTargetHotend(0));
|
lcdui_print_temp(LCD_STR_THERMOMETER[0], (int) degHotend(0), (int) degTargetHotend(0));
|
||||||
lcd_set_cursor(0,1);
|
lcd_set_cursor(0, 1);
|
||||||
switch(eFilamentAction)
|
switch (eFilamentAction)
|
||||||
{
|
{
|
||||||
case FilamentAction::Load:
|
case FilamentAction::Load:
|
||||||
case FilamentAction::AutoLoad:
|
case FilamentAction::AutoLoad:
|
||||||
case FilamentAction::MmuLoad:
|
case FilamentAction::MmuLoad:
|
||||||
lcd_puts_P(_i("Preheating to load")); ////MSG_ c=20 r=1
|
lcd_puts_P(_i("Preheating to load")); ////MSG_ c=20 r=1
|
||||||
break;
|
break;
|
||||||
case FilamentAction::UnLoad:
|
case FilamentAction::UnLoad:
|
||||||
case FilamentAction::MmuUnLoad:
|
case FilamentAction::MmuUnLoad:
|
||||||
lcd_puts_P(_i("Preheating to unload")); ////MSG_ c=20 r=1
|
lcd_puts_P(_i("Preheating to unload")); ////MSG_ c=20 r=1
|
||||||
break;
|
break;
|
||||||
case FilamentAction::MmuEject:
|
case FilamentAction::MmuEject:
|
||||||
lcd_puts_P(_i("Preheating to eject")); ////MSG_ c=20 r=1
|
lcd_puts_P(_i("Preheating to eject")); ////MSG_ c=20 r=1
|
||||||
break;
|
break;
|
||||||
case FilamentAction::MmuCut:
|
case FilamentAction::MmuCut:
|
||||||
lcd_puts_P(_i("Preheating to cut")); ////MSG_ c=20 r=1
|
lcd_puts_P(_i("Preheating to cut")); ////MSG_ c=20 r=1
|
||||||
break;
|
break;
|
||||||
case FilamentAction::None:
|
case FilamentAction::None:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
lcd_set_cursor(0,3);
|
lcd_set_cursor(0, 3);
|
||||||
lcd_puts_P(_i(">Cancel")); ////MSG_ c=20 r=1
|
lcd_puts_P(_i(">Cancel")); ////MSG_ c=20 r=1
|
||||||
if(lcd_clicked())
|
if (lcd_clicked())
|
||||||
{
|
{
|
||||||
bFilamentWaitingFlag=false;
|
bFilamentWaitingFlag = false;
|
||||||
if(!bFilamentPreheatState)
|
if (!bFilamentPreheatState)
|
||||||
{
|
{
|
||||||
setTargetHotend0(0.0);
|
setTargetHotend0(0.0);
|
||||||
setTargetBed(0.0);
|
setTargetBed(0.0);
|
||||||
menu_back();
|
menu_back();
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
setTargetHotend0((float)nTargetOld);
|
{
|
||||||
setTargetBed((float)nTargetBedOld);
|
setTargetHotend0((float )nTargetOld);
|
||||||
}
|
setTargetBed((float) nTargetBedOld);
|
||||||
menu_back();
|
}
|
||||||
if(eFilamentAction==FilamentAction::AutoLoad)
|
menu_back();
|
||||||
eFilamentAction=FilamentAction::None; // i.e. non-autoLoad
|
if (eFilamentAction == FilamentAction::AutoLoad) eFilamentAction = FilamentAction::None; // i.e. non-autoLoad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mFilamentItem_PLA()
|
static void mFilamentItem_PLA()
|
||||||
|
|
Loading…
Reference in a new issue