소스 검색

Merge pull request #740 from whosawhatsis/M200

Change diameter code to 'D'
ErikZalm 11 년 전
부모
커밋
430dcb65a7
1개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. 6
    5
      Marlin/Marlin_main.cpp

+ 6
- 5
Marlin/Marlin_main.cpp 파일 보기

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.
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
 // M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
131
 // M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
132
 //        Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
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
 // M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
134
 // M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
135
 // M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
135
 // M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
136
 // M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
136
 // M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
2198
       }
2198
       }
2199
       break;
2199
       break;
2200
     #endif //BLINKM
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
           if(radius == 0) {
2207
           if(radius == 0) {
2207
             area = 1;
2208
             area = 1;
2208
           } else {
2209
           } else {

Loading…
취소
저장