T1 and M702 C are now evaluated by the time estimator to add the new

"filament_load_time" and "filament_unload_time" values to match
the MK3 MMU2 behavior.

Emitting of the remaining times into the output G-code was made optional
through a new "remaining_times" configuration value, so the firmware
flavors and versions, which do not know the M73 code, will not complain.

Configuration changes:

The wipe tower default position was shifted inwards after the wipe tower
coordinate reference point was changed from the center to the left front
corner.

Added the "filament_load_time" and "filament_unload_time" values
to the MK3 MMU filament profiles.

Enabled "remaining_times" for the MK2.5, MK3 and MK3MMU2 printers.
This commit is contained in:
bubnikv 2018-08-04 17:38:25 +02:00
parent ac2b20b54b
commit 71b1e09af9
11 changed files with 133 additions and 10 deletions

View file

@ -114,6 +114,28 @@ void GCodeReader::parse_file(const std::string &file, callback_t callback)
this->parse_line(line, callback);
}
bool GCodeReader::GCodeLine::has(char axis) const
{
const char *c = m_raw.c_str();
// Skip the whitespaces.
c = skip_whitespaces(c);
// Skip the command.
c = skip_word(c);
// Up to the end of line or comment.
while (! is_end_of_gcode_line(*c)) {
// Skip whitespaces.
c = skip_whitespaces(c);
if (is_end_of_gcode_line(*c))
break;
// Check the name of the axis.
if (*c == axis)
return true;
// Skip the rest of the word.
c = skip_word(c);
}
return false;
}
bool GCodeReader::GCodeLine::has_value(char axis, float &value) const
{
const char *c = m_raw.c_str();