Merge branch 'master' into time_estimate

This commit is contained in:
bubnikv 2018-08-03 23:04:44 +02:00
commit ac2b20b54b
60 changed files with 2959 additions and 1548 deletions

View file

@ -1185,11 +1185,25 @@ namespace Slic3r {
{
PROFILE_FUNC();
float value;
if (line.has_value('S', value))
if (line.has_value('S', value)) {
// Legacy acceleration format. This format is used by the legacy Marlin, MK2 or MK3 firmware,
// and it is also generated by Slic3r to control acceleration per extrusion type
// (there is a separate acceleration settings in Slicer for perimeter, first layer etc).
set_acceleration(value);
if (line.has_value('T', value))
set_retract_acceleration(value);
if (line.has_value('T', value))
set_retract_acceleration(value);
} else {
// New acceleration format, compatible with the upstream Marlin.
if (line.has_value('P', value))
set_acceleration(value);
if (line.has_value('R', value))
set_retract_acceleration(value);
if (line.has_value('T', value)) {
// Interpret the T value as the travel acceleration in the new Marlin format.
//FIXME Prusa3D firmware currently does not support travel acceleration value independent from the extruding acceleration value.
// set_travel_acceleration(value);
}
}
}
void GCodeTimeEstimator::_processM205(const GCodeReader::GCodeLine& line)