@ -91,21 +91,27 @@ void GcodeSuite::M203() {
* T = Travel ( non printing ) moves
* T = Travel ( non printing ) moves
*/
*/
void GcodeSuite : : M204 ( ) {
void GcodeSuite : : M204 ( ) {
if ( parser . seen ( ' S ' ) ) { // Kept for legacy compatibility. Should NOT BE USED for new developments.
bool report = true ;
if ( parser . seenval ( ' S ' ) ) { // Kept for legacy compatibility. Should NOT BE USED for new developments.
planner . travel_acceleration = planner . acceleration = parser . value_linear_units ( ) ;
planner . travel_acceleration = planner . acceleration = parser . value_linear_units ( ) ;
SERIAL_ECHOLNPAIR( " Setting Print and Travel Acceleration: " , planner . acceleration ) ;
report = false ;
}
}
if ( parser . seen ( ' P ' ) ) {
if ( parser . seen val ( ' P ' ) ) {
planner . acceleration = parser . value_linear_units ( ) ;
planner . acceleration = parser . value_linear_units ( ) ;
SERIAL_ECHOLNPAIR( " Setting Print Acceleration: " , planner . acceleration ) ;
report = false ;
}
}
if ( parser . seen ( ' R ' ) ) {
if ( parser . seen val ( ' R ' ) ) {
planner . retract_acceleration = parser . value_linear_units ( ) ;
planner . retract_acceleration = parser . value_linear_units ( ) ;
SERIAL_ECHOLNPAIR( " Setting Retract Acceleration: " , planner . retract_acceleration ) ;
report = false ;
}
}
if ( parser . seen ( ' T ' ) ) {
if ( parser . seen val ( ' T ' ) ) {
planner . travel_acceleration = parser . value_linear_units ( ) ;
planner . travel_acceleration = parser . value_linear_units ( ) ;
SERIAL_ECHOLNPAIR ( " Setting Travel Acceleration: " , planner . travel_acceleration ) ;
report = false ;
}
if ( report ) {
SERIAL_ECHOPAIR ( " Acceleration: P " , planner . acceleration ) ;
SERIAL_ECHOPAIR ( " R " , planner . retract_acceleration ) ;
SERIAL_ECHOLNPAIR ( " T " , planner . travel_acceleration ) ;
}
}
}
}