It looks like there is only one routine that does the killing (look for: "curtime > maxInactiveTime" to see what I'm talking about).
You can modify your source to customize the "Killed" message to help point to where the problem is. To do this, go to the "Printer::kill" function and comment out the call to UI_STATUS_UPD. We'll call it from "Printer::defaultLoopActions" instead. Look for the two lines where I made the changes by searching for "<-----".
Finally, add
Code: Select all
#define UI_TEXT_KILLED_TEMP "Killed, Temp"
below where you find
.
Now, when the printer gets killed from "Printer::defaultLoopActions" you will get "Killed, Temp" instead of just "Killed". If it gets killed from somewhere else you will get the standard "Killed" message instead. For instance, you can kill your printer from the LCD screen, or kill it with a "M84" command.
Be sure to configure a fresh copy of Repetier and make your changes there (after backing up your current source code first).
It also looks like you can increase the timeout from the LCD. I'd try that first.
These routines are in Printer.cpp:
Code: Select all
/**
\brief Stop heater and stepper motors. Disable power,if possible.
*/
void Printer::kill(uint8_t only_steppers)
{
if(areAllSteppersDisabled() && only_steppers) return;
if(Printer::isAllKilled()) return;
setAllSteppersDiabled();
disableXStepper();
disableYStepper();
disableZStepper();
Extruder::disableAllExtruderMotors();
#if FAN_BOARD_PIN>-1
pwm_pos[NUM_EXTRUDER + 1] = 0;
#endif // FAN_BOARD_PIN
if(!only_steppers)
{
for(uint8_t i = 0; i < NUM_TEMPERATURE_LOOPS; i++)
Extruder::setTemperatureForExtruder(0, i);
Extruder::setHeatedBedTemperature(0);
//UI_STATUS_UPD(UI_TEXT_KILLED); <------------------ Comment this line out with leading "//"
#if defined(PS_ON_PIN) && PS_ON_PIN>-1
//pinMode(PS_ON_PIN,INPUT);
SET_OUTPUT(PS_ON_PIN); //GND
WRITE(PS_ON_PIN, (POWER_INVERTING ? LOW : HIGH));
Printer::setPowerOn(false);
#endif
Printer::setAllKilled(true);
}
else UI_STATUS_UPD(UI_TEXT_STEPPER_DISABLED);
}
Second routine (also in Printer.cpp):
Code: Select all
void Printer::defaultLoopActions()
{
Commands::checkForPeriodicalActions(true); //check heater every n milliseconds
UI_MEDIUM; // do check encoder
millis_t curtime = HAL::timeInMilliseconds();
if(PrintLine::hasLines() || isMenuMode(MENU_MODE_SD_PAUSED))
previousMillisCmd = curtime;
else
{
curtime -= previousMillisCmd;
if(maxInactiveTime != 0 && curtime > maxInactiveTime )
Printer::kill(false);
else
Printer::setAllKilled(false); // prevent repeated kills
if(stepperInactiveTime != 0 && curtime > stepperInactiveTime )
UI_STATUS_UPD(UI_TEXT_KILLED_TEMP); // <-------------------------Modify this line to use "UI_TEXT_KILLED_TEMP"
Printer::kill(true);
}
#if SDCARDDETECT>-1 && SDSUPPORT
sd.automount();
#endif
DEBUG_MEMORY;
}
Find this line (in about three places):
And add this line below it:
Code: Select all
#define UI_TEXT_KILLED_TEMP "Killed, Temp"