Scott Lahteine
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
16 additions and
29 deletions
-
Marlin/src/gcode/feature/pause/M125.cpp
-
Marlin/src/sd/cardreader.h
|
|
@ -28,10 +28,8 @@ |
|
|
|
#include "../../parser.h" |
|
|
|
#include "../../../feature/pause.h" |
|
|
|
#include "../../../module/motion.h" |
|
|
|
|
|
|
|
#if DISABLED(SDSUPPORT) |
|
|
|
#include "../../../sd/cardreader.h" |
|
|
|
#include "../../../module/printcounter.h" |
|
|
|
#endif |
|
|
|
|
|
|
|
/**
|
|
|
|
* M125: Store current position and move to filament change position. |
|
|
@ -70,21 +68,14 @@ void GcodeSuite::M125() { |
|
|
|
park_point.y += (active_extruder ? hotend_offset[Y_AXIS][active_extruder] : 0); |
|
|
|
#endif |
|
|
|
|
|
|
|
#if DISABLED(SDSUPPORT) |
|
|
|
const bool job_running = print_job_timer.isRunning(); |
|
|
|
#endif |
|
|
|
|
|
|
|
if (pause_print(retract, park_point)) { |
|
|
|
#if DISABLED(SDSUPPORT) |
|
|
|
// Wait for lcd click or M108
|
|
|
|
wait_for_filament_reload(); |
|
|
|
|
|
|
|
// Return to print position and continue
|
|
|
|
resume_print(); |
|
|
|
if (pause_print(retract, park_point) && !IS_SD_PRINTING()) { |
|
|
|
wait_for_filament_reload(); // Wait for lcd click or M108
|
|
|
|
resume_print(); // Return to print position and continue
|
|
|
|
} |
|
|
|
|
|
|
|
if (job_running) print_job_timer.start(); |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif // PARK_HEAD_ON_PAUSE
|
|
|
|
|
|
@ -19,9 +19,7 @@ |
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
* |
|
|
|
*/ |
|
|
|
|
|
|
|
#ifndef _CARDREADER_H_ |
|
|
|
#define _CARDREADER_H_ |
|
|
|
#pragma once |
|
|
|
|
|
|
|
#include "../inc/MarlinConfig.h" |
|
|
|
|
|
|
@ -265,16 +263,14 @@ private: |
|
|
|
#define IS_SD_INSERTED() true |
|
|
|
#endif |
|
|
|
|
|
|
|
#define IS_SD_PRINTING() card.sdprinting |
|
|
|
#define IS_SD_FILE_OPEN() card.isFileOpen() |
|
|
|
|
|
|
|
extern CardReader card; |
|
|
|
|
|
|
|
#endif // SDSUPPORT
|
|
|
|
#else // !SDSUPPORT
|
|
|
|
|
|
|
|
#if ENABLED(SDSUPPORT) |
|
|
|
#define IS_SD_PRINTING() card.sdprinting |
|
|
|
#define IS_SD_FILE_OPEN() card.isFileOpen() |
|
|
|
#else |
|
|
|
#define IS_SD_PRINTING() false |
|
|
|
#define IS_SD_FILE_OPEN() false |
|
|
|
#endif |
|
|
|
|
|
|
|
#endif // _CARDREADER_H_
|
|
|
|
#endif // !SDSUPPORT
|
|
|
|