Update Creality_DWIN.cpp
This commit is contained in:
@@ -1387,35 +1387,37 @@ SERIAL_ECHOLN(PSTR("BeginSwitch"));
|
||||
case No_Filement:
|
||||
SERIAL_ECHOLN("\n No Filament");
|
||||
|
||||
if (recdat.data[0] == 1) //Filament is out, resume / cancel selected on screen
|
||||
if (recdat.data[0] == 1) //Filament is out, resume / resume selected on screen
|
||||
{
|
||||
if (FilementStatus[0] == 2) // check filements status during printing
|
||||
{
|
||||
SERIAL_ECHOLN("Cancel during print");
|
||||
if(
|
||||
#if DISABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
true
|
||||
#elif NUM_RUNOUT_SENSORS > 1
|
||||
(getActiveTool() == E0 && READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_INVERTING) || (getActiveTool() == E1 && READ(FIL_RUNOUT2_PIN) != FIL_RUNOUT_INVERTING)
|
||||
#else
|
||||
getActiveTool() == E0 && READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_INVERTING
|
||||
#endif
|
||||
) {
|
||||
SERIAL_ECHOLN("Resume Yes during print");
|
||||
setHostResponse(1); //Send Resume host prompt command
|
||||
stopPrint();
|
||||
RTS_SndData(1 + CEIconGrap, IconPrintstatus);
|
||||
PrintStatue[1] = 0;
|
||||
PrinterStatusKey[1] = 3;
|
||||
RTS_SndData(ExchangePageBase + 53, ExchangepageAddr);
|
||||
FilementStatus[0] = 0; // recover the status waiting to check filements
|
||||
}
|
||||
}
|
||||
else if (FilementStatus[0] == 3)
|
||||
{
|
||||
SERIAL_ECHOLN("Cancel other");
|
||||
SERIAL_ECHOLN("Resume other");
|
||||
RTS_SndData(ExchangePageBase + 65, ExchangepageAddr);
|
||||
}
|
||||
}
|
||||
else if (recdat.data[0] == 0) // Filamet is out, Continue Selected
|
||||
else if (recdat.data[0] == 0) // Filamet is out, Cancel Selected
|
||||
{
|
||||
#if DISABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
if(true) {
|
||||
#elif NUM_RUNOUT_SENSORS > 1
|
||||
if( (getActiveTool() == E0 && READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_INVERTING) || (getActiveTool() == E1 && READ(FIL_RUNOUT2_PIN) != FIL_RUNOUT_INVERTING)) {
|
||||
#else
|
||||
if( getActiveTool() == E0 && READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_INVERTING) {
|
||||
#endif
|
||||
SERIAL_ECHOLN(" Filament Response Yes");
|
||||
SERIAL_ECHOLN(" Filament Response No");
|
||||
if (FilementStatus[0] == 1)
|
||||
{
|
||||
SERIAL_ECHOLN("Filament Stat 0 - 1");
|
||||
@@ -1435,16 +1437,11 @@ SERIAL_ECHOLN(PSTR("BeginSwitch"));
|
||||
RTS_SndData(ExchangePageBase + 65, ExchangepageAddr);
|
||||
}
|
||||
FilementStatus[0] = 0; // recover the status waiting to check filements
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
case PwrOffNoF:
|
||||
//SERIAL_ECHO("\n recdat.data[0] ==");
|
||||
//SERIAL_ECHO(recdat.data[0]);
|
||||
//SERIAL_ECHO("\n recdat.addr ==");
|
||||
//SERIAL_ECHO(recdat.addr);
|
||||
char cmd1[30];
|
||||
if (recdat.data[0] == 1) // Yes:continue to print the 3Dmode during power-off.
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user