Skip to content

Commit

Permalink
Fix issue MarlinFirmware#1 where M600 did not work. Also implemented …
Browse files Browse the repository at this point in the history
…advanced pause and parging feature and fixed bug, which prevents resuming from pared nozzle.
  • Loading branch information
knutwurst authored and stklcode committed Jun 21, 2020
1 parent 38b6209 commit 5cd4084
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1870,7 +1870,7 @@
* Requires NOZZLE_PARK_FEATURE.
* This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
*/
//#define ADVANCED_PAUSE_FEATURE
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
#define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
Expand Down
9 changes: 6 additions & 3 deletions Marlin/src/lcd/anycubic_touchscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ void AnycubicTouchscreenClass::StartPrint()
SERIAL_ECHOLNPGM("DEBUG: M24 Resume from regular pause");
#endif
IsParked = false; // remove parked flag
wait_for_heatup = false;
wait_for_user = false;
starttime = millis();
card.startFileprint(); // resume regularly
TFTstate = ANYCUBIC_TFT_STATE_SDPRINT;
Expand Down Expand Up @@ -213,6 +215,7 @@ void AnycubicTouchscreenClass::StartPrint()
SERIAL_ECHOLNPGM("DEBUG: M24 Resume from Filament Runout");
#endif
IsParked = false; // clear flags
wait_for_user = false;
ai3m_pause_state = 0;
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: Filament Pause Flag cleared");
Expand Down Expand Up @@ -325,15 +328,15 @@ void AnycubicTouchscreenClass::StopPrint()

void AnycubicTouchscreenClass::FilamentChangeResume()
{
wait_for_user = false; //must be done twice, since we have a bug in marlin
wait_for_heatup = false;
// call M108 to break out of M600 pause
queue.inject_P(PSTR("M108"));
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: M108 Resume called");
#endif

wait_for_heatup = false;
wait_for_user = false;

wait_for_heatup = false;
// resume with proper progress state
card.startFileprint();
#ifdef ANYCUBIC_TFT_DEBUG
Expand Down

0 comments on commit 5cd4084

Please sign in to comment.