浏览代码

Merge pull request #740 from whosawhatsis/M200

Change diameter code to 'D'
ErikZalm 10 年前
父节点
当前提交
430dcb65a7
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6
    5
      Marlin/Marlin_main.cpp

+ 6
- 5
Marlin/Marlin_main.cpp 查看文件

@@ -130,7 +130,7 @@
130 130
 // M150 - Set BlinkM Colour Output R: Red<0-255> U(!): Green<0-255> B: Blue<0-255> over i2c, G for green does not work.
131 131
 // M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
132 132
 //        Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
133
-// M200 - Set filament diameter
133
+// M200 D<millimeters>- set filament diameter and set E axis units to cubic millimeters (use S0 to set back to millimeters).
134 134
 // M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
135 135
 // M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
136 136
 // M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
@@ -2198,11 +2198,12 @@ void process_commands()
2198 2198
       }
2199 2199
       break;
2200 2200
     #endif //BLINKM
2201
-    case 200: // M200 S<millimeters> set filament diameter and set E axis units to cubic millimeters (use S0 to set back to millimeters).
2201
+    case 200: // M200 D<millimeters> set filament diameter and set E axis units to cubic millimeters (use S0 to set back to millimeters).
2202 2202
       {
2203
-        float area;
2204
-        if(code_seen('S')) {
2205
-          float radius = code_value() / 2;
2203
+        float area = .0;
2204
+        float radius = .0;
2205
+        if(code_seen('D')) {
2206
+          radius = (float)code_value() * .5;
2206 2207
           if(radius == 0) {
2207 2208
             area = 1;
2208 2209
           } else {

正在加载...
取消
保存