Kaynağa Gözat

Marlin: Patch G33, allow M111 to give status

Scott Lahteine 6 yıl önce
ebeveyn
işleme
8a184a526a
1 değiştirilmiş dosya ile 12 ekleme ve 11 silme
  1. 12
    11
      Marlin/Marlin_main.cpp

+ 12
- 11
Marlin/Marlin_main.cpp Dosyayı Görüntüle

@@ -5559,7 +5559,7 @@ void home_all_axes() { gcode_G28(true); }
5559 5559
             N++;
5560 5560
           }
5561 5561
         zero_std_dev_old = zero_std_dev;
5562
-        zero_std_dev = round(sqrt(S2 / N) * 1000.0) / 1000.0 + 0.00001;
5562
+        zero_std_dev = round(SQRT(S2 / N) * 1000.0) / 1000.0 + 0.00001;
5563 5563
 
5564 5564
         // Solve matrices
5565 5565
 
@@ -7745,16 +7745,17 @@ inline void gcode_M110() {
7745 7745
  * M111: Set the debug level
7746 7746
  */
7747 7747
 inline void gcode_M111() {
7748
-  marlin_debug_flags = parser.byteval('S', (uint8_t)DEBUG_NONE);
7749
-
7750
-  const static char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO;
7751
-  const static char str_debug_2[] PROGMEM = MSG_DEBUG_INFO;
7752
-  const static char str_debug_4[] PROGMEM = MSG_DEBUG_ERRORS;
7753
-  const static char str_debug_8[] PROGMEM = MSG_DEBUG_DRYRUN;
7754
-  const static char str_debug_16[] PROGMEM = MSG_DEBUG_COMMUNICATION;
7755
-  #if ENABLED(DEBUG_LEVELING_FEATURE)
7756
-    const static char str_debug_32[] PROGMEM = MSG_DEBUG_LEVELING;
7757
-  #endif
7748
+  if (parser.seen('S')) marlin_debug_flags = parser.byteval('S');
7749
+
7750
+  const static char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO,
7751
+                    str_debug_2[] PROGMEM = MSG_DEBUG_INFO,
7752
+                    str_debug_4[] PROGMEM = MSG_DEBUG_ERRORS,
7753
+                    str_debug_8[] PROGMEM = MSG_DEBUG_DRYRUN,
7754
+                    str_debug_16[] PROGMEM = MSG_DEBUG_COMMUNICATION
7755
+                    #if ENABLED(DEBUG_LEVELING_FEATURE)
7756
+                      , str_debug_32[] PROGMEM = MSG_DEBUG_LEVELING
7757
+                    #endif
7758
+                    ;
7758 7759
 
7759 7760
   const static char* const debug_strings[] PROGMEM = {
7760 7761
     str_debug_1, str_debug_2, str_debug_4, str_debug_8, str_debug_16

Loading…
İptal
Kaydet