Commit ba8f964e authored by MagoKimbra's avatar MagoKimbra

Fix Pause pin not defined.

parent 6fc9e2b9
...@@ -463,7 +463,7 @@ static uint8_t tmp_extruder; ...@@ -463,7 +463,7 @@ static uint8_t tmp_extruder;
#endif #endif
bool Stopped = false; bool Stopped = false;
#if defined(PAUSE_PIN) && PAUSE_PIN > -1 #ifdef FILAMENT_END_SWITCH
bool paused = false; bool paused = false;
bool printing = false; bool printing = false;
#endif #endif
...@@ -3923,7 +3923,7 @@ inline void gcode_M204() { ...@@ -3923,7 +3923,7 @@ inline void gcode_M204() {
else target[E_AXIS] -= FILAMENTCHANGE_FINALRETRACT; else target[E_AXIS] -= FILAMENTCHANGE_FINALRETRACT;
#endif #endif
#if defined(PAUSE_PIN) && PAUSE_PIN > -1 #ifdef FILAMENT_END_SWITCH
paused = false; paused = false;
#endif #endif
...@@ -4202,7 +4202,7 @@ void process_commands() ...@@ -4202,7 +4202,7 @@ void process_commands()
break; break;
#endif //LASERBEAM #endif //LASERBEAM
#if defined(PAUSE_PIN) && PAUSE_PIN > -1 #ifdef FILAMENT_END_SWITCH
case 11: //M11 - Start printing case 11: //M11 - Start printing
{ {
printing = true; printing = true;
...@@ -4765,7 +4765,7 @@ void process_commands() ...@@ -4765,7 +4765,7 @@ void process_commands()
SERIAL_PROTOCOLPGM(MSG_E_MIN); SERIAL_PROTOCOLPGM(MSG_E_MIN);
SERIAL_PROTOCOLLN(((READ(E_MIN_PIN)^E_MIN_ENDSTOP_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN)); SERIAL_PROTOCOLLN(((READ(E_MIN_PIN)^E_MIN_ENDSTOP_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif #endif
#if defined(PAUSE_PIN) && PAUSE_PIN > -1 #if defined(FILAMENT_END_SWITCH) && defined(PAUSE_PIN) && PAUSE_PIN > -1
SERIAL_PROTOCOLPGM(MSG_PAUSE_PIN); SERIAL_PROTOCOLPGM(MSG_PAUSE_PIN);
SERIAL_PROTOCOLLN(((READ(PAUSE_PIN)^PAUSE_PIN_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN)); SERIAL_PROTOCOLLN(((READ(PAUSE_PIN)^PAUSE_PIN_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif #endif
...@@ -6455,9 +6455,9 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s ...@@ -6455,9 +6455,9 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
} }
#endif #endif
#if defined(PAUSE_PIN) && PAUSE_PIN > -1 #if defined(FILAMENT_END_SWITCH) && defined(PAUSE_PIN) && PAUSE_PIN > -1
pause(); pause();
#endif //defined(PAUSE_PIN) && PAUSE_PIN > -1 #endif
#if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1 #if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1
controllerFan(); //Check if fan should be turned on to cool stepper drivers down controllerFan(); //Check if fan should be turned on to cool stepper drivers down
...@@ -6527,13 +6527,13 @@ void kill() ...@@ -6527,13 +6527,13 @@ void kill()
void pause() void pause()
{ {
#if defined(PAUSE_PIN) && PAUSE_PIN > -1 #if defined(FILAMENT_END_SWITCH) && defined(PAUSE_PIN) && PAUSE_PIN > -1
if ((READ(PAUSE_PIN)^PAUSE_PIN_INVERTING) && printing && !paused) if ((READ(PAUSE_PIN)^PAUSE_PIN_INVERTING) && printing && !paused)
{ {
paused = true; paused = true;
enquecommands_P(PSTR("M600\nG4 P0\nG4 P0\nG4 P0")); enquecommands_P(PSTR("M600\nG4 P0\nG4 P0\nG4 P0"));
} }
#endif // defined(PAUSE_PIN) && PAUSE_PIN > -1 #endif
} }
void Stop() void Stop()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment