ソースを参照

Insert Debug DRYRUN Repetier Host compatible

MagoKimbra 10年前
コミット
76306f9073
4個のファイルの変更41行の追加2行の削除
  1. 20
    1
      Marlin/Marlin_main.cpp
  2. 14
    0
      Marlin/language_en.h
  3. 6
    0
      Marlin/language_it.h
  4. 1
    1
      Marlin/planner.cpp

+ 20
- 1
Marlin/Marlin_main.cpp ファイルの表示

@@ -3349,6 +3349,7 @@ inline void gcode_M42() {
3349 3349
  */
3350 3350
 inline void gcode_M104() {
3351 3351
   if (setTargetedHotend(104)) return;
3352
+  if (marlin_debug_flags & DEBUG_DRYRUN) return;
3352 3353
 
3353 3354
   if (code_seen('S')) {
3354 3355
     float temp = code_value();
@@ -3448,6 +3449,7 @@ inline void gcode_M105() {
3448 3449
  */
3449 3450
 inline void gcode_M109() {
3450 3451
   if (setTargetedHotend(109)) return;
3452
+  if (marlin_debug_flags & DEBUG_DRYRUN) return;
3451 3453
 
3452 3454
   LCD_MESSAGEPGM(MSG_HEATING);
3453 3455
 
@@ -3532,6 +3534,8 @@ inline void gcode_M109() {
3532 3534
    *       Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
3533 3535
    */
3534 3536
   inline void gcode_M190() {
3537
+    if (marlin_debug_flags & DEBUG_DRYRUN) return;
3538
+
3535 3539
     LCD_MESSAGEPGM(MSG_BED_HEATING);
3536 3540
     no_wait_for_cooling = code_seen('S');
3537 3541
     if (no_wait_for_cooling || code_seen('R'))
@@ -3567,7 +3571,20 @@ inline void gcode_M109() {
3567 3571
  * M111: Set the debug level
3568 3572
  */
3569 3573
 inline void gcode_M111() {
3570
-  marlin_debug_flags = code_seen('S') ? code_value_short() : DEBUG_INFO|DEBUG_ERRORS;
3574
+  marlin_debug_flags = code_seen('S') ? code_value_short() : DEBUG_INFO|DEBUG_COMMUNICATION;
3575
+  
3576
+  SERIAL_ECHO_START;
3577
+  if (marlin_debug_flags & DEBUG_ECHO) SERIAL_ECHOLNPGM(MSG_DEBUG_ECHO);
3578
+  // FOR MOMENT NOT ACTIVE
3579
+  //if (marlin_debug_flags & DEBUG_INFO) SERIAL_ECHOLNPGM(MSG_DEBUG_INFO);
3580
+  //if (marlin_debug_flags & DEBUG_ERRORS) SERIAL_ECHOLNPGM(MSG_DEBUG_ERRORS);
3581
+  if (marlin_debug_flags & DEBUG_DRYRUN) {
3582
+    SERIAL_ECHOLNPGM(MSG_DEBUG_DRYRUN);
3583
+    setTargetBed(0);
3584
+    for (int8_t cur_hotend = 0; cur_hotend < EXTRUDERS; ++cur_hotend) {
3585
+      setTargetHotend(0, cur_hotend);
3586
+    }
3587
+  }
3571 3588
 }
3572 3589
 
3573 3590
 /**
@@ -3605,6 +3622,7 @@ inline void gcode_M112() { kill(PSTR(MSG_KILLED)); }
3605 3622
  * M140: Set bed temperature
3606 3623
  */
3607 3624
 inline void gcode_M140() {
3625
+  if (marlin_debug_flags & DEBUG_DRYRUN) return;
3608 3626
   if (code_seen('S')) setTargetBed(code_value());
3609 3627
 }
3610 3628
 
@@ -5908,6 +5926,7 @@ void mesh_plan_buffer_line(float x, float y, float z, const float e, float feed_
5908 5926
 #ifdef PREVENT_DANGEROUS_EXTRUDE
5909 5927
 
5910 5928
   inline void prevent_dangerous_extrude(float &curr_e, float &dest_e) {
5929
+    if (marlin_debug_flags & DEBUG_DRYRUN) return;
5911 5930
     float de = dest_e - curr_e;
5912 5931
     if (de) {
5913 5932
       if (degHotend(active_extruder) < extrude_min_temp) {

+ 14
- 0
Marlin/language_en.h ファイルの表示

@@ -421,6 +421,20 @@
421 421
 #define MSG_END_MINUTE                      "minutes"
422 422
 #endif
423 423
 
424
+// Debug
425
+#ifndef MSG_DEBUG_ECHO
426
+#define MSG_DEBUG_ECHO                      "DEBUG ECHO ENABLED"
427
+#endif
428
+#ifndef MSG_DEBUG_INFO
429
+#define MSG_DEBUG_INFO                      "DEBUG INFO ENABLED"
430
+#endif
431
+#ifndef MSG_DEBUG_ERRORS
432
+#define MSG_DEBUG_ERRORS                    "DEBUG ERRORS ENABLED"
433
+#endif
434
+#ifndef MSG_DEBUG_DRYRUN
435
+#define MSG_DEBUG_DRYRUN                    "DEBUG DRYRUN ENABLED"
436
+#endif
437
+
424 438
 #ifdef DELTA_CALIBRATION_MENU
425 439
   #ifndef MSG_DELTA_CALIBRATE
426 440
   #define MSG_DELTA_CALIBRATE             "Delta Calibration"

+ 6
- 0
Marlin/language_it.h ファイルの表示

@@ -127,6 +127,12 @@
127 127
 #define MSG_END_HOUR                        "ore"
128 128
 #define MSG_END_MINUTE                      "minuti"
129 129
 
130
+// Debug
131
+#define MSG_DEBUG_ECHO                      "DEBUG RIPETI"
132
+#define MSG_DEBUG_INFO                      "DEBUG INFO"
133
+#define MSG_DEBUG_ERRORS                    "DEBUG ERRORI"
134
+#define MSG_DEBUG_DRYRUN                    "DEBUG STAMPA A VUOTO"
135
+
130 136
 #ifdef DELTA_CALIBRATION_MENU
131 137
     #define MSG_DELTA_CALIBRATE             "Calibraz. Delta"
132 138
     #define MSG_DELTA_CALIBRATE_X           "Calibra X"

+ 1
- 1
Marlin/planner.cpp ファイルの表示

@@ -502,7 +502,7 @@ float junction_deviation = 0.1;
502 502
 
503 503
   #ifdef PREVENT_DANGEROUS_EXTRUDE
504 504
     if (de) {
505
-      if (degHotend(extruder) < extrude_min_temp) {
505
+      if (degHotend(extruder) < extrude_min_temp && !(marlin_debug_flags & DEBUG_DRYRUN)) {
506 506
         position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
507 507
         de = 0; // no difference
508 508
         SERIAL_ECHO_START;

読み込み中…
キャンセル
保存