0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-23 01:58:59 +00:00

🩹 Use 'M205 D' when 'B' is an axis

This commit is contained in:
Scott Lahteine 2023-02-08 19:39:21 -06:00
parent 98c9ecd5c5
commit 87d7449952

View file

@ -221,9 +221,9 @@ void GcodeSuite::M203_report(const bool forReplay/*=true*/) {
/** /**
* M204: Set Accelerations in units/sec^2 (M204 P1200 R3000 T3000) * M204: Set Accelerations in units/sec^2 (M204 P1200 R3000 T3000)
* *
* P = Printing moves * P<accel> Printing moves
* R = Retract only (no X, Y, Z) moves * R<accel> Retract only (no X, Y, Z) moves
* T = Travel (non printing) moves * T<accel> Travel (non printing) moves
*/ */
void GcodeSuite::M204() { void GcodeSuite::M204() {
if (!parser.seen("PRST")) if (!parser.seen("PRST"))
@ -247,24 +247,37 @@ void GcodeSuite::M204_report(const bool forReplay/*=true*/) {
); );
} }
#if AXIS_COLLISION('B')
#define M205_MIN_SEG_TIME_PARAM 'D'
#define M205_MIN_SEG_TIME_STR "D"
#warning "Use 'M205 D' for Minimum Segment Time."
#else
#define M205_MIN_SEG_TIME_PARAM 'B'
#define M205_MIN_SEG_TIME_STR "B"
#endif
/** /**
* M205: Set Advanced Settings * M205: Set Advanced Settings
* *
* B = Min Segment Time (µs) * B<µs> : Min Segment Time
* S = Min Feed Rate (units/s) * S<units/s> : Min Feed Rate
* T = Min Travel Feed Rate (units/s) * T<units/s> : Min Travel Feed Rate
* X = Max X Jerk (units/sec^2) *
* Y = Max Y Jerk (units/sec^2) * With CLASSIC_JERK:
* Z = Max Z Jerk (units/sec^2) * X<units/sec^2> : Max X Jerk
* E = Max E Jerk (units/sec^2) * Y<units/sec^2> : Max Y Jerk
* J = Junction Deviation (mm) (If not using CLASSIC_JERK) * Z<units/sec^2> : Max Z Jerk
* ... : etc
* E<units/sec^2> : Max E Jerk
*
* Without CLASSIC_JERK:
* J(mm) : Junction Deviation
*/ */
void GcodeSuite::M205() { void GcodeSuite::M205() {
if (!parser.seen("BST" TERN_(HAS_JUNCTION_DEVIATION, "J") TERN_(HAS_CLASSIC_JERK, "XYZE"))) if (!parser.seen_any()) return M205_report();
return M205_report();
//planner.synchronize(); //planner.synchronize();
if (parser.seenval('B')) planner.settings.min_segment_time_us = parser.value_ulong(); if (parser.seenval(M205_MIN_SEG_TIME_PARAM)) planner.settings.min_segment_time_us = parser.value_ulong();
if (parser.seenval('S')) planner.settings.min_feedrate_mm_s = parser.value_linear_units(); if (parser.seenval('S')) planner.settings.min_feedrate_mm_s = parser.value_linear_units();
if (parser.seenval('T')) planner.settings.min_travel_feedrate_mm_s = parser.value_linear_units(); if (parser.seenval('T')) planner.settings.min_travel_feedrate_mm_s = parser.value_linear_units();
#if HAS_JUNCTION_DEVIATION #if HAS_JUNCTION_DEVIATION
@ -304,7 +317,7 @@ void GcodeSuite::M205() {
void GcodeSuite::M205_report(const bool forReplay/*=true*/) { void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, F( report_heading_etc(forReplay, F(
"Advanced (B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate>" "Advanced (" M205_MIN_SEG_TIME_STR "<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate>"
TERN_(HAS_JUNCTION_DEVIATION, " J<junc_dev>") TERN_(HAS_JUNCTION_DEVIATION, " J<junc_dev>")
#if HAS_CLASSIC_JERK #if HAS_CLASSIC_JERK
NUM_AXIS_GANG( NUM_AXIS_GANG(
@ -317,7 +330,7 @@ void GcodeSuite::M205_report(const bool forReplay/*=true*/) {
")" ")"
)); ));
SERIAL_ECHOLNPGM_P( SERIAL_ECHOLNPGM_P(
PSTR(" M205 B"), LINEAR_UNIT(planner.settings.min_segment_time_us) PSTR(" M205 " M205_MIN_SEG_TIME_STR), LINEAR_UNIT(planner.settings.min_segment_time_us)
, PSTR(" S"), LINEAR_UNIT(planner.settings.min_feedrate_mm_s) , PSTR(" S"), LINEAR_UNIT(planner.settings.min_feedrate_mm_s)
, SP_T_STR, LINEAR_UNIT(planner.settings.min_travel_feedrate_mm_s) , SP_T_STR, LINEAR_UNIT(planner.settings.min_travel_feedrate_mm_s)
#if HAS_JUNCTION_DEVIATION #if HAS_JUNCTION_DEVIATION