|
|
|
@ -32,9 +32,14 @@
|
|
|
|
|
* T<extruder> - Optional extruder number. Current extruder if omitted.
|
|
|
|
|
* D<linear> - Set filament diameter and enable. D0 disables volumetric.
|
|
|
|
|
* S<bool> - Turn volumetric ON or OFF.
|
|
|
|
|
*
|
|
|
|
|
* With VOLUMETRIC_EXTRUDER_LIMIT:
|
|
|
|
|
*
|
|
|
|
|
* L<float> - Volumetric extruder limit (in mm^3/sec). L0 disables the limit.
|
|
|
|
|
*/
|
|
|
|
|
void GcodeSuite::M200() {
|
|
|
|
|
if (!parser.seen("DST" TERN_(VOLUMETRIC_EXTRUDER_LIMIT, "L")))
|
|
|
|
|
return M200_report();
|
|
|
|
|
|
|
|
|
|
const int8_t target_extruder = get_target_extruder_from_command();
|
|
|
|
|
if (target_extruder < 0) return;
|
|
|
|
@ -69,6 +74,37 @@
|
|
|
|
|
planner.calculate_volumetric_multipliers();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GcodeSuite::M200_report(const bool forReplay/*=true*/) {
|
|
|
|
|
if (!forReplay) {
|
|
|
|
|
report_heading(forReplay, PSTR(STR_FILAMENT_SETTINGS), false);
|
|
|
|
|
if (!parser.volumetric_enabled) SERIAL_ECHOPGM(" (Disabled):");
|
|
|
|
|
SERIAL_EOL();
|
|
|
|
|
report_echo_start(forReplay);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if EXTRUDERS == 1
|
|
|
|
|
{
|
|
|
|
|
SERIAL_ECHOLNPAIR(
|
|
|
|
|
" M200 S", parser.volumetric_enabled, " D", LINEAR_UNIT(planner.filament_size[0])
|
|
|
|
|
#if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
|
|
|
|
|
, " L", LINEAR_UNIT(planner.volumetric_extruder_limit[0])
|
|
|
|
|
#endif
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
#else
|
|
|
|
|
SERIAL_ECHOLNPAIR(" M200 S", parser.volumetric_enabled);
|
|
|
|
|
LOOP_L_N(i, EXTRUDERS) {
|
|
|
|
|
report_echo_start(forReplay);
|
|
|
|
|
SERIAL_ECHOLNPAIR(
|
|
|
|
|
" M200 T", i, " D", LINEAR_UNIT(planner.filament_size[i])
|
|
|
|
|
#if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
|
|
|
|
|
, " L", LINEAR_UNIT(planner.volumetric_extruder_limit[i])
|
|
|
|
|
#endif
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif // !NO_VOLUMETRICS
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -77,6 +113,8 @@
|
|
|
|
|
* With multiple extruders use T to specify which one.
|
|
|
|
|
*/
|
|
|
|
|
void GcodeSuite::M201() {
|
|
|
|
|
if (!parser.seen("T" LOGICAL_AXES_STRING))
|
|
|
|
|
return M201_report();
|
|
|
|
|
|
|
|
|
|
const int8_t target_extruder = get_target_extruder_from_command();
|
|
|
|
|
if (target_extruder < 0) return;
|
|
|
|
@ -94,12 +132,40 @@ void GcodeSuite::M201() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GcodeSuite::M201_report(const bool forReplay/*=true*/) {
|
|
|
|
|
report_heading_etc(forReplay, PSTR(STR_MAX_ACCELERATION));
|
|
|
|
|
SERIAL_ECHOLNPAIR_P(
|
|
|
|
|
LIST_N(DOUBLE(LINEAR_AXES),
|
|
|
|
|
PSTR(" M201 X"), LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[X_AXIS]),
|
|
|
|
|
SP_Y_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Y_AXIS]),
|
|
|
|
|
SP_Z_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Z_AXIS]),
|
|
|
|
|
SP_I_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[I_AXIS]),
|
|
|
|
|
SP_J_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[J_AXIS]),
|
|
|
|
|
SP_K_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[K_AXIS])
|
|
|
|
|
)
|
|
|
|
|
#if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS)
|
|
|
|
|
, SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS])
|
|
|
|
|
#endif
|
|
|
|
|
);
|
|
|
|
|
#if ENABLED(DISTINCT_E_FACTORS)
|
|
|
|
|
LOOP_L_N(i, E_STEPPERS) {
|
|
|
|
|
report_echo_start(forReplay);
|
|
|
|
|
SERIAL_ECHOLNPAIR_P(
|
|
|
|
|
PSTR(" M201 T"), i
|
|
|
|
|
, SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(i)])
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* M203: Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in units/sec
|
|
|
|
|
*
|
|
|
|
|
* With multiple extruders use T to specify which one.
|
|
|
|
|
*/
|
|
|
|
|
void GcodeSuite::M203() {
|
|
|
|
|
if (!parser.seen("T" LOGICAL_AXES_STRING))
|
|
|
|
|
return M203_report();
|
|
|
|
|
|
|
|
|
|
const int8_t target_extruder = get_target_extruder_from_command();
|
|
|
|
|
if (target_extruder < 0) return;
|
|
|
|
@ -111,6 +177,32 @@ void GcodeSuite::M203() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
|
|
|
|
|
report_heading_etc(forReplay, PSTR(STR_MAX_FEEDRATES));
|
|
|
|
|
SERIAL_ECHOLNPAIR_P(
|
|
|
|
|
LIST_N(DOUBLE(LINEAR_AXES),
|
|
|
|
|
PSTR(" M203 X"), LINEAR_UNIT(planner.settings.max_feedrate_mm_s[X_AXIS]),
|
|
|
|
|
SP_Y_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Y_AXIS]),
|
|
|
|
|
SP_Z_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Z_AXIS]),
|
|
|
|
|
SP_I_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[I_AXIS]),
|
|
|
|
|
SP_J_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[J_AXIS]),
|
|
|
|
|
SP_K_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[K_AXIS])
|
|
|
|
|
)
|
|
|
|
|
#if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS)
|
|
|
|
|
, SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS])
|
|
|
|
|
#endif
|
|
|
|
|
);
|
|
|
|
|
#if ENABLED(DISTINCT_E_FACTORS)
|
|
|
|
|
LOOP_L_N(i, E_STEPPERS) {
|
|
|
|
|
SERIAL_ECHO_START();
|
|
|
|
|
SERIAL_ECHOLNPAIR_P(
|
|
|
|
|
PSTR(" M203 T"), i
|
|
|
|
|
, SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS_N(i)])
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* M204: Set Accelerations in units/sec^2 (M204 P1200 R3000 T3000)
|
|
|
|
|
*
|
|
|
|
@ -119,11 +211,8 @@ void GcodeSuite::M203() {
|
|
|
|
|
* T = Travel (non printing) moves
|
|
|
|
|
*/
|
|
|
|
|
void GcodeSuite::M204() {
|
|
|
|
|
if (!parser.seen("PRST")) {
|
|
|
|
|
SERIAL_ECHOPAIR("Acceleration: P", planner.settings.acceleration);
|
|
|
|
|
SERIAL_ECHOPAIR(" R", planner.settings.retract_acceleration);
|
|
|
|
|
SERIAL_ECHOLNPAIR_P(SP_T_STR, planner.settings.travel_acceleration);
|
|
|
|
|
}
|
|
|
|
|
if (!parser.seen("PRST"))
|
|
|
|
|
return M204_report();
|
|
|
|
|
else {
|
|
|
|
|
//planner.synchronize();
|
|
|
|
|
// 'S' for legacy compatibility. Should NOT BE USED for new development
|
|
|
|
@ -134,6 +223,15 @@ void GcodeSuite::M204() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GcodeSuite::M204_report(const bool forReplay/*=true*/) {
|
|
|
|
|
report_heading_etc(forReplay, PSTR(STR_ACCELERATION_P_R_T));
|
|
|
|
|
SERIAL_ECHOLNPAIR_P(
|
|
|
|
|
PSTR(" M204 P"), LINEAR_UNIT(planner.settings.acceleration)
|
|
|
|
|
, PSTR(" R"), LINEAR_UNIT(planner.settings.retract_acceleration)
|
|
|
|
|
, SP_T_STR, LINEAR_UNIT(planner.settings.travel_acceleration)
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* M205: Set Advanced Settings
|
|
|
|
|
*
|
|
|
|
@ -147,7 +245,8 @@ void GcodeSuite::M204() {
|
|
|
|
|
* J = Junction Deviation (mm) (If not using CLASSIC_JERK)
|
|
|
|
|
*/
|
|
|
|
|
void GcodeSuite::M205() {
|
|
|
|
|
if (!parser.seen("BST" TERN_(HAS_JUNCTION_DEVIATION, "J") TERN_(HAS_CLASSIC_JERK, "XYZE"))) return;
|
|
|
|
|
if (!parser.seen("BST" TERN_(HAS_JUNCTION_DEVIATION, "J") TERN_(HAS_CLASSIC_JERK, "XYZE")))
|
|
|
|
|
return M205_report();
|
|
|
|
|
|
|
|
|
|
//planner.synchronize();
|
|
|
|
|
if (parser.seenval('B')) planner.settings.min_segment_time_us = parser.value_ulong();
|
|
|
|
@ -184,3 +283,34 @@ void GcodeSuite::M205() {
|
|
|
|
|
#endif
|
|
|
|
|
#endif // HAS_CLASSIC_JERK
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
|
|
|
|
|
report_heading_etc(forReplay, PSTR(
|
|
|
|
|
"Advanced (B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate>"
|
|
|
|
|
TERN_(HAS_JUNCTION_DEVIATION, " J<junc_dev>")
|
|
|
|
|
TERN_(HAS_CLASSIC_JERK, " X<max_x_jerk> Y<max_y_jerk> Z<max_z_jerk>")
|
|
|
|
|
TERN_(HAS_CLASSIC_E_JERK, " E<max_e_jerk>")
|
|
|
|
|
")"
|
|
|
|
|
));
|
|
|
|
|
SERIAL_ECHOLNPAIR_P(
|
|
|
|
|
PSTR(" M205 B"), LINEAR_UNIT(planner.settings.min_segment_time_us)
|
|
|
|
|
, PSTR(" S"), LINEAR_UNIT(planner.settings.min_feedrate_mm_s)
|
|
|
|
|
, SP_T_STR, LINEAR_UNIT(planner.settings.min_travel_feedrate_mm_s)
|
|
|
|
|
#if HAS_JUNCTION_DEVIATION
|
|
|
|
|
, PSTR(" J"), LINEAR_UNIT(planner.junction_deviation_mm)
|
|
|
|
|
#endif
|
|
|
|
|
#if HAS_CLASSIC_JERK
|
|
|
|
|
, LIST_N(DOUBLE(LINEAR_AXES),
|
|
|
|
|
SP_X_STR, LINEAR_UNIT(planner.max_jerk.x),
|
|
|
|
|
SP_Y_STR, LINEAR_UNIT(planner.max_jerk.y),
|
|
|
|
|
SP_Z_STR, LINEAR_UNIT(planner.max_jerk.z),
|
|
|
|
|
SP_I_STR, LINEAR_UNIT(planner.max_jerk.i),
|
|
|
|
|
SP_J_STR, LINEAR_UNIT(planner.max_jerk.j),
|
|
|
|
|
SP_K_STR, LINEAR_UNIT(planner.max_jerk.k)
|
|
|
|
|
)
|
|
|
|
|
#if HAS_CLASSIC_E_JERK
|
|
|
|
|
, SP_E_STR, LINEAR_UNIT(planner.max_jerk.e)
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|