Merge pull request #2221 from MagoKimbra/Dryrun
Insert Debug DRYRUN Repetier Host compatible
This commit is contained in:
commit
e400fce271
@ -3351,6 +3351,7 @@ inline void gcode_M42() {
|
||||
*/
|
||||
inline void gcode_M104() {
|
||||
if (setTargetedHotend(104)) return;
|
||||
if (marlin_debug_flags & DEBUG_DRYRUN) return;
|
||||
|
||||
if (code_seen('S')) {
|
||||
float temp = code_value();
|
||||
@ -3450,6 +3451,7 @@ inline void gcode_M105() {
|
||||
*/
|
||||
inline void gcode_M109() {
|
||||
if (setTargetedHotend(109)) return;
|
||||
if (marlin_debug_flags & DEBUG_DRYRUN) return;
|
||||
|
||||
LCD_MESSAGEPGM(MSG_HEATING);
|
||||
|
||||
@ -3534,6 +3536,8 @@ inline void gcode_M109() {
|
||||
* Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
|
||||
*/
|
||||
inline void gcode_M190() {
|
||||
if (marlin_debug_flags & DEBUG_DRYRUN) return;
|
||||
|
||||
LCD_MESSAGEPGM(MSG_BED_HEATING);
|
||||
no_wait_for_cooling = code_seen('S');
|
||||
if (no_wait_for_cooling || code_seen('R'))
|
||||
@ -3569,7 +3573,20 @@ inline void gcode_M109() {
|
||||
* M111: Set the debug level
|
||||
*/
|
||||
inline void gcode_M111() {
|
||||
marlin_debug_flags = code_seen('S') ? code_value_short() : DEBUG_INFO|DEBUG_ERRORS;
|
||||
marlin_debug_flags = code_seen('S') ? code_value_short() : DEBUG_INFO|DEBUG_COMMUNICATION;
|
||||
|
||||
SERIAL_ECHO_START;
|
||||
if (marlin_debug_flags & DEBUG_ECHO) SERIAL_ECHOLNPGM(MSG_DEBUG_ECHO);
|
||||
// FOR MOMENT NOT ACTIVE
|
||||
//if (marlin_debug_flags & DEBUG_INFO) SERIAL_ECHOLNPGM(MSG_DEBUG_INFO);
|
||||
//if (marlin_debug_flags & DEBUG_ERRORS) SERIAL_ECHOLNPGM(MSG_DEBUG_ERRORS);
|
||||
if (marlin_debug_flags & DEBUG_DRYRUN) {
|
||||
SERIAL_ECHOLNPGM(MSG_DEBUG_DRYRUN);
|
||||
setTargetBed(0);
|
||||
for (int8_t cur_hotend = 0; cur_hotend < EXTRUDERS; ++cur_hotend) {
|
||||
setTargetHotend(0, cur_hotend);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3607,6 +3624,7 @@ inline void gcode_M112() { kill(PSTR(MSG_KILLED)); }
|
||||
* M140: Set bed temperature
|
||||
*/
|
||||
inline void gcode_M140() {
|
||||
if (marlin_debug_flags & DEBUG_DRYRUN) return;
|
||||
if (code_seen('S')) setTargetBed(code_value());
|
||||
}
|
||||
|
||||
@ -5910,6 +5928,7 @@ void mesh_plan_buffer_line(float x, float y, float z, const float e, float feed_
|
||||
#ifdef PREVENT_DANGEROUS_EXTRUDE
|
||||
|
||||
inline void prevent_dangerous_extrude(float &curr_e, float &dest_e) {
|
||||
if (marlin_debug_flags & DEBUG_DRYRUN) return;
|
||||
float de = dest_e - curr_e;
|
||||
if (de) {
|
||||
if (degHotend(active_extruder) < extrude_min_temp) {
|
||||
|
@ -215,6 +215,11 @@
|
||||
#define MSG_T_MAXTEMP "MAXTEMP triggered"
|
||||
#define MSG_T_MINTEMP "MINTEMP triggered"
|
||||
|
||||
// Debug
|
||||
#define MSG_DEBUG_ECHO "DEBUG ECHO ENABLED"
|
||||
#define MSG_DEBUG_INFO "DEBUG INFO ENABLED"
|
||||
#define MSG_DEBUG_ERRORS "DEBUG ERRORS ENABLED"
|
||||
#define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED"
|
||||
|
||||
// LCD Menu Messages
|
||||
|
||||
|
@ -502,7 +502,7 @@ float junction_deviation = 0.1;
|
||||
|
||||
#ifdef PREVENT_DANGEROUS_EXTRUDE
|
||||
if (de) {
|
||||
if (degHotend(extruder) < extrude_min_temp) {
|
||||
if (degHotend(extruder) < extrude_min_temp && !(marlin_debug_flags & DEBUG_DRYRUN)) {
|
||||
position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
|
||||
de = 0; // no difference
|
||||
SERIAL_ECHO_START;
|
||||
|
Loading…
Reference in New Issue
Block a user