ソースを参照

Merge pull request #7591 from thinkyhead/bf1_misc_patches

M111: no args reports current flags
Scott Lahteine 6年前
コミット
367e1b54ba
2個のファイルの変更23行の追加15行の削除
  1. 11
    4
      Marlin/Conditionals_post.h
  2. 12
    11
      Marlin/Marlin_main.cpp

+ 11
- 4
Marlin/Conditionals_post.h ファイルの表示

28
 #ifndef CONDITIONALS_POST_H
28
 #ifndef CONDITIONALS_POST_H
29
 #define CONDITIONALS_POST_H
29
 #define CONDITIONALS_POST_H
30
 
30
 
31
+  #define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA))
32
+  #define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
33
+  #define IS_CARTESIAN !IS_KINEMATIC
34
+
31
   /**
35
   /**
32
    * Axis lengths and center
36
    * Axis lengths and center
33
    */
37
    */
43
     #define Y_BED_SIZE Y_MAX_LENGTH
47
     #define Y_BED_SIZE Y_MAX_LENGTH
44
   #endif
48
   #endif
45
 
49
 
50
+  // Require 0,0 bed center for Delta and SCARA
51
+  #if IS_KINEMATIC
52
+    #define BED_CENTER_AT_0_0
53
+  #endif
54
+
55
+  // Define center values for future use
46
   #if ENABLED(BED_CENTER_AT_0_0)
56
   #if ENABLED(BED_CENTER_AT_0_0)
47
     #define X_CENTER 0
57
     #define X_CENTER 0
48
     #define Y_CENTER 0
58
     #define Y_CENTER 0
52
   #endif
62
   #endif
53
   #define Z_CENTER ((Z_MIN_POS + Z_MAX_POS) / 2)
63
   #define Z_CENTER ((Z_MIN_POS + Z_MAX_POS) / 2)
54
 
64
 
65
+  // Get the linear boundaries of the bed
55
   #define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2)
66
   #define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2)
56
   #define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2)
67
   #define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2)
57
   #define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2)
68
   #define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2)
85
     #endif
96
     #endif
86
   #endif
97
   #endif
87
 
98
 
88
-  #define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA))
89
-  #define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
90
-  #define IS_CARTESIAN !IS_KINEMATIC
91
-
92
   /**
99
   /**
93
    * No adjustable bed on non-cartesians
100
    * No adjustable bed on non-cartesians
94
    */
101
    */

+ 12
- 11
Marlin/Marlin_main.cpp ファイルの表示

5567
             N++;
5567
             N++;
5568
           }
5568
           }
5569
         zero_std_dev_old = zero_std_dev;
5569
         zero_std_dev_old = zero_std_dev;
5570
-        zero_std_dev = round(sqrt(S2 / N) * 1000.0) / 1000.0 + 0.00001;
5570
+        zero_std_dev = round(SQRT(S2 / N) * 1000.0) / 1000.0 + 0.00001;
5571
 
5571
 
5572
         // Solve matrices
5572
         // Solve matrices
5573
 
5573
 
7753
  * M111: Set the debug level
7753
  * M111: Set the debug level
7754
  */
7754
  */
7755
 inline void gcode_M111() {
7755
 inline void gcode_M111() {
7756
-  marlin_debug_flags = parser.byteval('S', (uint8_t)DEBUG_NONE);
7757
-
7758
-  const static char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO;
7759
-  const static char str_debug_2[] PROGMEM = MSG_DEBUG_INFO;
7760
-  const static char str_debug_4[] PROGMEM = MSG_DEBUG_ERRORS;
7761
-  const static char str_debug_8[] PROGMEM = MSG_DEBUG_DRYRUN;
7762
-  const static char str_debug_16[] PROGMEM = MSG_DEBUG_COMMUNICATION;
7763
-  #if ENABLED(DEBUG_LEVELING_FEATURE)
7764
-    const static char str_debug_32[] PROGMEM = MSG_DEBUG_LEVELING;
7765
-  #endif
7756
+  if (parser.seen('S')) marlin_debug_flags = parser.byteval('S');
7757
+
7758
+  const static char str_debug_1[] PROGMEM = MSG_DEBUG_ECHO,
7759
+                    str_debug_2[] PROGMEM = MSG_DEBUG_INFO,
7760
+                    str_debug_4[] PROGMEM = MSG_DEBUG_ERRORS,
7761
+                    str_debug_8[] PROGMEM = MSG_DEBUG_DRYRUN,
7762
+                    str_debug_16[] PROGMEM = MSG_DEBUG_COMMUNICATION
7763
+                    #if ENABLED(DEBUG_LEVELING_FEATURE)
7764
+                      , str_debug_32[] PROGMEM = MSG_DEBUG_LEVELING
7765
+                    #endif
7766
+                    ;
7766
 
7767
 
7767
   const static char* const debug_strings[] PROGMEM = {
7768
   const static char* const debug_strings[] PROGMEM = {
7768
     str_debug_1, str_debug_2, str_debug_4, str_debug_8, str_debug_16
7769
     str_debug_1, str_debug_2, str_debug_4, str_debug_8, str_debug_16

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