Insert Debug DRYRUN Repetier Host compatible

This commit is contained in:
MagoKimbra 2015-06-01 18:34:45 +02:00
parent 881146bc22
commit 76306f9073
4 changed files with 41 additions and 2 deletions

View File

@ -3349,6 +3349,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();
@ -3448,6 +3449,7 @@ inline void gcode_M105() {
*/
inline void gcode_M109() {
if (setTargetedHotend(109)) return;
if (marlin_debug_flags & DEBUG_DRYRUN) return;
LCD_MESSAGEPGM(MSG_HEATING);
@ -3532,6 +3534,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'))
@ -3567,7 +3571,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);
}
}
}
/**
@ -3605,6 +3622,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());
}
@ -5908,6 +5926,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) {

View File

@ -421,6 +421,20 @@
#define MSG_END_MINUTE "minutes"
#endif
// Debug
#ifndef MSG_DEBUG_ECHO
#define MSG_DEBUG_ECHO "DEBUG ECHO ENABLED"
#endif
#ifndef MSG_DEBUG_INFO
#define MSG_DEBUG_INFO "DEBUG INFO ENABLED"
#endif
#ifndef MSG_DEBUG_ERRORS
#define MSG_DEBUG_ERRORS "DEBUG ERRORS ENABLED"
#endif
#ifndef MSG_DEBUG_DRYRUN
#define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED"
#endif
#ifdef DELTA_CALIBRATION_MENU
#ifndef MSG_DELTA_CALIBRATE
#define MSG_DELTA_CALIBRATE "Delta Calibration"

View File

@ -127,6 +127,12 @@
#define MSG_END_HOUR "ore"
#define MSG_END_MINUTE "minuti"
// Debug
#define MSG_DEBUG_ECHO "DEBUG RIPETI"
#define MSG_DEBUG_INFO "DEBUG INFO"
#define MSG_DEBUG_ERRORS "DEBUG ERRORI"
#define MSG_DEBUG_DRYRUN "DEBUG STAMPA A VUOTO"
#ifdef DELTA_CALIBRATION_MENU
#define MSG_DELTA_CALIBRATE "Calibraz. Delta"
#define MSG_DELTA_CALIBRATE_X "Calibra X"

View File

@ -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;