Add a global machine state

This commit is contained in:
Scott Lahteine
2020-03-14 18:47:44 -05:00
parent 41ffe9851d
commit 095a1123c1
4 changed files with 21 additions and 9 deletions

View File

@ -765,7 +765,7 @@ int16_t Temperature::getHeaterPower(const heater_ind_t heater_id) {
//
inline void loud_kill(PGM_P const lcd_msg, const heater_ind_t heater) {
Running = false;
marlin_state = MF_KILLED;
#if USE_BEEPER
for (uint8_t i = 20; i--;) {
WRITE(BEEPER_PIN, HIGH); delay(25);
@ -2003,7 +2003,7 @@ void Temperature::init() {
/**
SERIAL_ECHO_START();
SERIAL_ECHOPGM("Thermal Thermal Runaway Running. Heater ID: ");
SERIAL_ECHOPGM("Thermal Runaway Running. Heater ID: ");
if (heater_id == H_CHAMBER) SERIAL_ECHOPGM("chamber");
if (heater_id < 0) SERIAL_ECHOPGM("bed"); else SERIAL_ECHO(heater_id);
SERIAL_ECHOPAIR(" ; State:", sm.state, " ; Timer:", sm.timer, " ; Temperature:", current, " ; Target Temp:", target);