Clean up GCode command short comments

This commit is contained in:
Scott Lahteine 2016-10-05 04:39:01 -05:00
parent 47bd142b29
commit e6164d254d
2 changed files with 103 additions and 111 deletions

View file

@ -5961,7 +5961,8 @@ inline void gcode_M206() {
/** /**
* M209: Enable automatic retract (M209 S1) * M209: Enable automatic retract (M209 S1)
* detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction. * For slicers that don't support G10/11, reversed extrude-only
* moves will be classified as retraction.
*/ */
inline void gcode_M209() { inline void gcode_M209() {
if (code_seen('S')) { if (code_seen('S')) {
@ -7597,90 +7598,83 @@ void process_next_command() {
case 'M': switch (codenum) { case 'M': switch (codenum) {
#if ENABLED(ULTIPANEL) || ENABLED(EMERGENCY_PARSER) #if ENABLED(ULTIPANEL) || ENABLED(EMERGENCY_PARSER)
case 0: // M0 - Unconditional stop - Wait for user button press on LCD case 0: // M0: Unconditional stop - Wait for user button press on LCD
case 1: // M1 - Conditional stop - Wait for user button press on LCD case 1: // M1: Conditional stop - Wait for user button press on LCD
gcode_M0_M1(); gcode_M0_M1();
break; break;
#endif // ULTIPANEL #endif // ULTIPANEL
case 17: case 17: // M17: Enable all stepper motors
gcode_M17(); gcode_M17();
break; break;
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
case 20: // M20 - list SD card case 20: // M20: list SD card
gcode_M20(); break; gcode_M20(); break;
case 21: // M21 - init SD card case 21: // M21: init SD card
gcode_M21(); break; gcode_M21(); break;
case 22: //M22 - release SD card case 22: // M22: release SD card
gcode_M22(); break; gcode_M22(); break;
case 23: //M23 - Select file case 23: // M23: Select file
gcode_M23(); break; gcode_M23(); break;
case 24: //M24 - Start SD print case 24: // M24: Start SD print
gcode_M24(); break; gcode_M24(); break;
case 25: //M25 - Pause SD print case 25: // M25: Pause SD print
gcode_M25(); break; gcode_M25(); break;
case 26: //M26 - Set SD index case 26: // M26: Set SD index
gcode_M26(); break; gcode_M26(); break;
case 27: //M27 - Get SD status case 27: // M27: Get SD status
gcode_M27(); break; gcode_M27(); break;
case 28: //M28 - Start SD write case 28: // M28: Start SD write
gcode_M28(); break; gcode_M28(); break;
case 29: //M29 - Stop SD write case 29: // M29: Stop SD write
gcode_M29(); break; gcode_M29(); break;
case 30: //M30 <filename> Delete File case 30: // M30 <filename> Delete File
gcode_M30(); break; gcode_M30(); break;
case 32: //M32 - Select file and start SD print case 32: // M32: Select file and start SD print
gcode_M32(); break; gcode_M32(); break;
#if ENABLED(LONG_FILENAME_HOST_SUPPORT) #if ENABLED(LONG_FILENAME_HOST_SUPPORT)
case 33: //M33 - Get the long full path to a file or folder case 33: // M33: Get the long full path to a file or folder
gcode_M33(); break; gcode_M33(); break;
#endif // LONG_FILENAME_HOST_SUPPORT #endif
case 928: //M928 - Start SD write case 928: // M928: Start SD write
gcode_M928(); break; gcode_M928(); break;
#endif //SDSUPPORT #endif //SDSUPPORT
case 31: //M31 take time since the start of the SD print or an M109 command case 31: // M31: Report time since the start of SD print or last M109
gcode_M31(); gcode_M31(); break;
break;
case 42: //M42 -Change pin status via gcode case 42: //M42 -Change pin status via gcode
gcode_M42(); gcode_M42();
break; break;
#if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST) #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST)
case 48: // M48 Z probe repeatability case 48: // M48: Z probe repeatability test
gcode_M48(); gcode_M48();
break; break;
#endif // Z_MIN_PROBE_REPEATABILITY_TEST #endif // Z_MIN_PROBE_REPEATABILITY_TEST
case 75: // Start print timer case 75: // M75: Start print timer
gcode_M75(); gcode_M75(); break;
break; case 76: // M76: Pause print timer
gcode_M76(); break;
case 76: // Pause print timer case 77: // M77: Stop print timer
gcode_M76(); gcode_M77(); break;
break;
case 77: // Stop print timer
gcode_M77();
break;
#if ENABLED(PRINTCOUNTER) #if ENABLED(PRINTCOUNTER)
case 78: // Show print statistics case 78: // M78: Show print statistics
gcode_M78(); gcode_M78(); break;
break;
#endif #endif
#if ENABLED(M100_FREE_MEMORY_WATCHER) #if ENABLED(M100_FREE_MEMORY_WATCHER)
case 100: case 100: // M100: Free Memory Report
gcode_M100(); gcode_M100();
break; break;
#endif #endif
case 104: // M104 case 104: // M104: Set hot end temperature
gcode_M104(); gcode_M104();
break; break;
@ -7714,21 +7708,21 @@ void process_next_command() {
break; break;
#endif #endif
case 140: // M140: Set bed temp case 140: // M140: Set bed temperature
gcode_M140(); gcode_M140();
break; break;
case 105: // M105: Read current temperature case 105: // M105: Report current temperature
gcode_M105(); gcode_M105();
KEEPALIVE_STATE(NOT_BUSY); KEEPALIVE_STATE(NOT_BUSY);
return; // "ok" already printed return; // "ok" already printed
case 109: // M109: Wait for temperature case 109: // M109: Wait for hotend temperature to reach target
gcode_M109(); gcode_M109();
break; break;
#if HAS_TEMP_BED #if HAS_TEMP_BED
case 190: // M190: Wait for bed heater to reach target case 190: // M190: Wait for bed temperature to reach target
gcode_M190(); gcode_M190();
break; break;
#endif // HAS_TEMP_BED #endif // HAS_TEMP_BED
@ -7776,17 +7770,17 @@ void process_next_command() {
gcode_M81(); gcode_M81();
break; break;
case 82: case 82: // M83: Set E axis normal mode (same as other axes)
gcode_M82(); gcode_M82();
break; break;
case 83: case 83: // M83: Set E axis relative mode
gcode_M83(); gcode_M83();
break; break;
case 18: // (for compatibility) case 18: // M18 => M84
case 84: // M84 case 84: // M84: Disable all steppers or set timeout
gcode_M18_M84(); gcode_M18_M84();
break; break;
case 85: // M85 case 85: // M85: Set inactivity stepper shutdown timeout
gcode_M85(); gcode_M85();
break; break;
case 92: // M92: Set the steps-per-unit for one or more axes case 92: // M92: Set the steps-per-unit for one or more axes
@ -7820,51 +7814,51 @@ void process_next_command() {
#endif #endif
#if ENABLED(TEMPERATURE_UNITS_SUPPORT) #if ENABLED(TEMPERATURE_UNITS_SUPPORT)
case 149: case 149: // M149: Set temperature units
gcode_M149(); gcode_M149();
break; break;
#endif #endif
#if ENABLED(BLINKM) #if ENABLED(BLINKM)
case 150: // M150 case 150: // M150: Set the BlinkM LCD color
gcode_M150(); gcode_M150();
break; break;
#endif //BLINKM #endif // BLINKM
#if ENABLED(EXPERIMENTAL_I2CBUS) #if ENABLED(EXPERIMENTAL_I2CBUS)
case 155: case 155: // M155: Send data to an i2c slave
gcode_M155(); gcode_M155();
break; break;
case 156: case 156: // M156: Request data from an i2c slave
gcode_M156(); gcode_M156();
break; break;
#endif //EXPERIMENTAL_I2CBUS #endif //EXPERIMENTAL_I2CBUS
#if ENABLED(MIXING_EXTRUDER) #if ENABLED(MIXING_EXTRUDER)
case 163: // M163 S<int> P<float> set weight for a mixing extruder case 163: // M163: Set a component weight for mixing extruder
gcode_M163(); gcode_M163();
break; break;
#if MIXING_VIRTUAL_TOOLS > 1 #if MIXING_VIRTUAL_TOOLS > 1
case 164: // M164 S<int> save current mix as a virtual extruder case 164: // M164: Save current mix as a virtual extruder
gcode_M164(); gcode_M164();
break; break;
#endif #endif
#if ENABLED(DIRECT_MIXING_IN_G1) #if ENABLED(DIRECT_MIXING_IN_G1)
case 165: // M165 [ABCDHI]<float> set multiple mix weights case 165: // M165: Set multiple mix weights
gcode_M165(); gcode_M165();
break; break;
#endif #endif
#endif #endif
case 200: // M200 D<diameter> Set filament diameter and set E axis units to cubic. (Use S0 to revert to linear units.) case 200: // M200: Set filament diameter, E to cubic units
gcode_M200(); gcode_M200();
break; break;
case 201: // M201 case 201: // M201: Set max acceleration for print moves (units/s^2)
gcode_M201(); gcode_M201();
break; break;
#if 0 // Not used for Sprinter/grbl gen6 #if 0 // Not used for Sprinter/grbl gen6
@ -7872,180 +7866,180 @@ void process_next_command() {
gcode_M202(); gcode_M202();
break; break;
#endif #endif
case 203: // M203 max feedrate units/sec case 203: // M203: Set max feedrate (units/sec)
gcode_M203(); gcode_M203();
break; break;
case 204: // M204 acclereration S normal moves T filmanent only moves case 204: // M204: Set acceleration
gcode_M204(); gcode_M204();
break; break;
case 205: //M205 advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk case 205: //M205: Set advanced settings
gcode_M205(); gcode_M205();
break; break;
case 206: // M206 additional homing offset case 206: // M206: Set home offsets
gcode_M206(); gcode_M206();
break; break;
#if ENABLED(DELTA) #if ENABLED(DELTA)
case 665: // M665 set delta configurations L<diagonal_rod> R<delta_radius> S<segments_per_sec> case 665: // M665: Set delta configurations
gcode_M665(); gcode_M665();
break; break;
#endif #endif
#if ENABLED(DELTA) || ENABLED(Z_DUAL_ENDSTOPS) #if ENABLED(DELTA) || ENABLED(Z_DUAL_ENDSTOPS)
case 666: // M666 set delta / dual endstop adjustment case 666: // M666: Set delta or dual endstop adjustment
gcode_M666(); gcode_M666();
break; break;
#endif #endif
#if ENABLED(FWRETRACT) #if ENABLED(FWRETRACT)
case 207: // M207 - Set Retract Length: S<length>, Feedrate: F<units/min>, and Z lift: Z<distance> case 207: // M207: Set Retract Length, Feedrate, and Z lift
gcode_M207(); gcode_M207();
break; break;
case 208: // M208 - Set Recover (unretract) Additional (!) Length: S<length> and Feedrate: F<units/min> case 208: // M208: Set Recover (unretract) Additional Length and Feedrate
gcode_M208(); gcode_M208();
break; break;
case 209: // M209 - Turn Automatic Retract Detection on/off: S<bool> (For slicers that don't support G10/11). Every normal extrude-only move will be classified as retract depending on the direction. case 209: // M209: Turn Automatic Retract Detection on/off
gcode_M209(); gcode_M209();
break; break;
#endif // FWRETRACT #endif // FWRETRACT
case 211: // M211 - Enable, Disable, and/or Report software endstops case 211: // M211: Enable, Disable, and/or Report software endstops
gcode_M211(); gcode_M211();
break; break;
#if HOTENDS > 1 #if HOTENDS > 1
case 218: // M218 - Set a tool offset: T<index> X<offset> Y<offset> case 218: // M218: Set a tool offset
gcode_M218(); gcode_M218();
break; break;
#endif #endif
case 220: // M220 - Set Feedrate Percentage: S<percent> ("FR" on your LCD) case 220: // M220: Set Feedrate Percentage: S<percent> ("FR" on your LCD)
gcode_M220(); gcode_M220();
break; break;
case 221: // M221 - Set Flow Percentage: S<percent> case 221: // M221: Set Flow Percentage
gcode_M221(); gcode_M221();
break; break;
case 226: // M226 P<pin number> S<pin state>- Wait until the specified pin reaches the state required case 226: // M226: Wait until a pin reaches a state
gcode_M226(); gcode_M226();
break; break;
#if HAS_SERVOS #if HAS_SERVOS
case 280: // M280 - set servo position absolute. P: servo index, S: angle or microseconds case 280: // M280: Set servo position absolute
gcode_M280(); gcode_M280();
break; break;
#endif // HAS_SERVOS #endif // HAS_SERVOS
#if HAS_BUZZER #if HAS_BUZZER
case 300: // M300 - Play beep tone case 300: // M300: Play beep tone
gcode_M300(); gcode_M300();
break; break;
#endif // HAS_BUZZER #endif // HAS_BUZZER
#if ENABLED(PIDTEMP) #if ENABLED(PIDTEMP)
case 301: // M301 case 301: // M301: Set hotend PID parameters
gcode_M301(); gcode_M301();
break; break;
#endif // PIDTEMP #endif // PIDTEMP
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)
case 304: // M304 case 304: // M304: Set bed PID parameters
gcode_M304(); gcode_M304();
break; break;
#endif // PIDTEMPBED #endif // PIDTEMPBED
#if defined(CHDK) || HAS_PHOTOGRAPH #if defined(CHDK) || HAS_PHOTOGRAPH
case 240: // M240 Triggers a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/ case 240: // M240: Trigger a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/
gcode_M240(); gcode_M240();
break; break;
#endif // CHDK || PHOTOGRAPH_PIN #endif // CHDK || PHOTOGRAPH_PIN
#if HAS_LCD_CONTRAST #if HAS_LCD_CONTRAST
case 250: // M250 Set LCD contrast value: C<value> (value 0..63) case 250: // M250: Set LCD contrast
gcode_M250(); gcode_M250();
break; break;
#endif // HAS_LCD_CONTRAST #endif // HAS_LCD_CONTRAST
#if ENABLED(PREVENT_COLD_EXTRUSION) #if ENABLED(PREVENT_COLD_EXTRUSION)
case 302: // allow cold extrudes, or set the minimum extrude temperature case 302: // M302: Allow cold extrudes (set the minimum extrude temperature)
gcode_M302(); gcode_M302();
break; break;
#endif // PREVENT_COLD_EXTRUSION #endif // PREVENT_COLD_EXTRUSION
case 303: // M303 PID autotune case 303: // M303: PID autotune
gcode_M303(); gcode_M303();
break; break;
#if ENABLED(MORGAN_SCARA) #if ENABLED(MORGAN_SCARA)
case 360: // M360 SCARA Theta pos1 case 360: // M360: SCARA Theta pos1
if (gcode_M360()) return; if (gcode_M360()) return;
break; break;
case 361: // M361 SCARA Theta pos2 case 361: // M361: SCARA Theta pos2
if (gcode_M361()) return; if (gcode_M361()) return;
break; break;
case 362: // M362 SCARA Psi pos1 case 362: // M362: SCARA Psi pos1
if (gcode_M362()) return; if (gcode_M362()) return;
break; break;
case 363: // M363 SCARA Psi pos2 case 363: // M363: SCARA Psi pos2
if (gcode_M363()) return; if (gcode_M363()) return;
break; break;
case 364: // M364 SCARA Psi pos3 (90 deg to Theta) case 364: // M364: SCARA Psi pos3 (90 deg to Theta)
if (gcode_M364()) return; if (gcode_M364()) return;
break; break;
#endif // SCARA #endif // SCARA
case 400: // M400 finish all moves case 400: // M400: Finish all moves
gcode_M400(); gcode_M400();
break; break;
#if HAS_BED_PROBE #if HAS_BED_PROBE
case 401: case 401: // M401: Deploy probe
gcode_M401(); gcode_M401();
break; break;
case 402: case 402: // M402: Stow probe
gcode_M402(); gcode_M402();
break; break;
#endif // HAS_BED_PROBE #endif // HAS_BED_PROBE
#if ENABLED(FILAMENT_WIDTH_SENSOR) #if ENABLED(FILAMENT_WIDTH_SENSOR)
case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width case 404: // M404: Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width
gcode_M404(); gcode_M404();
break; break;
case 405: //M405 Turn on filament sensor for control case 405: // M405: Turn on filament sensor for control
gcode_M405(); gcode_M405();
break; break;
case 406: //M406 Turn off filament sensor for control case 406: // M406: Turn off filament sensor for control
gcode_M406(); gcode_M406();
break; break;
case 407: //M407 Display measured filament diameter case 407: // M407: Display measured filament diameter
gcode_M407(); gcode_M407();
break; break;
#endif // ENABLED(FILAMENT_WIDTH_SENSOR) #endif // ENABLED(FILAMENT_WIDTH_SENSOR)
#if ENABLED(MESH_BED_LEVELING) #if ENABLED(MESH_BED_LEVELING)
case 420: // M420 Enable/Disable Mesh Bed Leveling case 420: // M420: Enable/Disable Mesh Bed Leveling
gcode_M420(); gcode_M420();
break; break;
case 421: // M421 Set a Mesh Bed Leveling Z coordinate case 421: // M421: Set a Mesh Bed Leveling Z coordinate
gcode_M421(); gcode_M421();
break; break;
#endif #endif
case 428: // M428 Apply current_position to home_offset case 428: // M428: Apply current_position to home_offset
gcode_M428(); gcode_M428();
break; break;
case 500: // M500 Store settings in EEPROM case 500: // M500: Store settings in EEPROM
gcode_M500(); gcode_M500();
break; break;
case 501: // M501 Read settings from EEPROM case 501: // M501: Read settings from EEPROM
gcode_M501(); gcode_M501();
break; break;
case 502: // M502 Revert to default settings case 502: // M502: Revert to default settings
gcode_M502(); gcode_M502();
break; break;
case 503: // M503 print settings currently in memory case 503: // M503: print settings currently in memory
gcode_M503(); gcode_M503();
break; break;
@ -8056,46 +8050,46 @@ void process_next_command() {
#endif #endif
#if HAS_BED_PROBE #if HAS_BED_PROBE
case 851: // Set Z Probe Z Offset case 851: // M851: Set Z Probe Z Offset
gcode_M851(); gcode_M851();
break; break;
#endif // HAS_BED_PROBE #endif // HAS_BED_PROBE
#if ENABLED(FILAMENT_CHANGE_FEATURE) #if ENABLED(FILAMENT_CHANGE_FEATURE)
case 600: //Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal] case 600: // M600: Pause for filament change
gcode_M600(); gcode_M600();
break; break;
#endif // FILAMENT_CHANGE_FEATURE #endif // FILAMENT_CHANGE_FEATURE
#if ENABLED(DUAL_X_CARRIAGE) #if ENABLED(DUAL_X_CARRIAGE)
case 605: case 605: // M605: Set Dual X Carriage movement mode
gcode_M605(); gcode_M605();
break; break;
#endif // DUAL_X_CARRIAGE #endif // DUAL_X_CARRIAGE
#if ENABLED(LIN_ADVANCE) #if ENABLED(LIN_ADVANCE)
case 905: // M905 Set advance factor. case 905: // M905: Set advance K factor.
gcode_M905(); gcode_M905();
break; break;
#endif #endif
case 907: // M907 Set digital trimpot motor current using axis codes. case 907: // M907: Set digital trimpot motor current using axis codes.
gcode_M907(); gcode_M907();
break; break;
#if HAS_DIGIPOTSS || ENABLED(DAC_STEPPER_CURRENT) #if HAS_DIGIPOTSS || ENABLED(DAC_STEPPER_CURRENT)
case 908: // M908 Control digital trimpot directly. case 908: // M908: Control digital trimpot directly.
gcode_M908(); gcode_M908();
break; break;
#if ENABLED(DAC_STEPPER_CURRENT) // As with Printrbot RevF #if ENABLED(DAC_STEPPER_CURRENT) // As with Printrbot RevF
case 909: // M909 Print digipot/DAC current value case 909: // M909: Print digipot/DAC current value
gcode_M909(); gcode_M909();
break; break;
case 910: // M910 Commit digipot/DAC value to external EEPROM case 910: // M910: Commit digipot/DAC value to external EEPROM
gcode_M910(); gcode_M910();
break; break;
@ -8105,11 +8099,11 @@ void process_next_command() {
#if HAS_MICROSTEPS #if HAS_MICROSTEPS
case 350: // M350 Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers. case 350: // M350: Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers.
gcode_M350(); gcode_M350();
break; break;
case 351: // M351 Toggle MS1 MS2 pins directly, S# determines MS1 or MS2, X# sets the pin high/low. case 351: // M351: Toggle MS1 MS2 pins directly, S# determines MS1 or MS2, X# sets the pin high/low.
gcode_M351(); gcode_M351();
break; break;

View file

@ -275,8 +275,6 @@
#define DIO21_DDR DDRC #define DIO21_DDR DDRC
#define DIO21_PWM NULL #define DIO21_PWM NULL
#undef PB0 #undef PB0
#define PB0_PIN PINB0 #define PB0_PIN PINB0
#define PB0_RPORT PINB #define PB0_RPORT PINB