Commit 36b5c768 authored by MagoKimbra's avatar MagoKimbra

Update Pause Pin

parent 41d26978
......@@ -683,6 +683,9 @@ your extruder heater takes 2 minutes to hit the target on heating.
// Setting firmware for filament end switch
//#define FILAMENT_END_SWITCH
#ifdef FILAMENT_END_SWITCH
const bool PAUSE_PIN_INVERTING = false; // set to true to invert the logic of the pause pin.
#endif
// define laser beam support
//#define LASERBEAM
......
......@@ -4643,6 +4643,10 @@ void process_commands()
SERIAL_PROTOCOLPGM(MSG_E_MIN);
SERIAL_PROTOCOLLN(((READ(E_MIN_PIN)^E_MIN_ENDSTOP_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif
#if defined(PAUSE_PIN) && PAUSE_PIN > -1
SERIAL_PROTOCOLPGM(MSG_PAUSE_PIN);
SERIAL_PROTOCOLLN(((READ(PAUSE_PIN)^PAUSE_PIN_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif
}
break;
case 120: //M120 - Disable Endstop
......@@ -6398,7 +6402,7 @@ void kill()
void pause()
{
#if defined(PAUSE_PIN) && PAUSE_PIN > -1
if (READ(PAUSE_PIN) == 0 && printing && !paused)
if ((READ(PAUSE_PIN)^PAUSE_PIN_INVERTING) && printing && !paused)
{
paused = true;
enquecommand("M600");
......
......@@ -116,6 +116,7 @@
#define MSG_Z_MIN "z_min: "
#define MSG_Z_MAX "z_max: "
#define MSG_E_MIN "e_min: "
#define MSG_PAUSE_PIN "pause pin: "
#define MSG_M119_REPORT "Reporting endstop status"
#define MSG_ENDSTOP_HIT "TRIGGERED"
#define MSG_ENDSTOP_OPEN "open"
......
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