Replace M905 with unique code M900

This commit is contained in:
Scott Lahteine 2017-04-17 00:27:49 -05:00 committed by Scott Lahteine
parent 1286d9603d
commit a00ae4790a
23 changed files with 91 additions and 49 deletions

View file

@ -633,13 +633,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -8797,13 +8797,13 @@ inline void gcode_M503() {
#if ENABLED(LIN_ADVANCE)
/**
* M905: Set and/or Get advance K factor and WH/D ratio
* M900: Set and/or Get advance K factor and WH/D ratio
*
* K<factor> Set advance K factor
* R<ratio> Set ratio directly (overrides WH/D)
* W<width> H<height> D<diam> Set ratio from WH/D
*/
inline void gcode_M905() {
inline void gcode_M900() {
stepper.synchronize();
const float newK = code_seen('K') ? code_value_float() : -1;
@ -10264,8 +10264,8 @@ void process_next_command() {
#endif // DUAL_X_CARRIAGE
#if ENABLED(LIN_ADVANCE)
case 905: // M905: Set advance K factor.
gcode_M905();
case 900: // M900: Set advance K factor.
gcode_M900();
break;
#endif

View file

@ -150,8 +150,8 @@
* 576 M906 E4 stepperE4 current (uint16_t)
*
* LIN_ADVANCE: 8 bytes
* 580 M905 K extruder_advance_k (float)
* 584 M905 WHD advance_ed_ratio (float)
* 580 M900 K extruder_advance_k (float)
* 584 M900 WHD advance_ed_ratio (float)
*
* 588 Minimum end-point
* 1909 (588 + 36 + 9 + 288 + 988) Maximum end-point
@ -1665,7 +1665,7 @@ void MarlinSettings::reset() {
SERIAL_ECHOLNPGM("Linear Advance:");
}
CONFIG_ECHO_START;
SERIAL_ECHOPAIR(" M905 K", planner.get_extruder_advance_k());
SERIAL_ECHOPAIR(" M900 K", planner.get_extruder_advance_k());
SERIAL_ECHOLNPAIR(" R", planner.get_advance_ed_ratio());
#endif
}

View file

@ -630,13 +630,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -630,13 +630,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -630,13 +630,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -614,13 +614,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -643,13 +643,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -630,13 +630,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -630,13 +630,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -630,13 +630,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -638,13 +638,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -633,13 +633,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -630,13 +630,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -654,13 +654,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -654,13 +654,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -651,13 +651,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -651,13 +651,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -657,13 +657,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -651,13 +651,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -630,13 +630,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -630,13 +630,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.

View file

@ -633,13 +633,15 @@
* to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures
* if the slicer is using variable widths or layer heights within one print!
*
* This option sets the default E:D ratio at startup. Use `M905` to override this value.
* This option sets the default E:D ratio at startup. Use `M900` to override this value.
*
* Example: `M905 W0.4 H0.2 D1.75`, where:
* Example: `M900 W0.4 H0.2 D1.75`, where:
* - W is the extrusion width in mm
* - H is the layer height in mm
* - D is the filament diameter in mm
*
* Example: `M900 R0.0458` to set the ratio directly.
*
* Set to 0 to auto-detect the ratio based on given Gcode G1 print moves.
*
* Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode.