Adds filamentUsed and longestPrint stats to PrintCounter

This commit is contained in:
João Brázio
2016-07-14 02:18:59 +01:00
parent 7202383695
commit 2f26bc2153
4 changed files with 87 additions and 20 deletions

View File

@@ -2564,8 +2564,14 @@ void gcode_get_destination() {
else
destination[i] = current_position[i];
}
if (code_seen('F') && code_value_linear_units() > 0.0)
feedrate = code_value_linear_units();
#if ENABLED(PRINTCOUNTER)
if(!DEBUGGING(DRYRUN))
print_job_timer.incFilamentUsed(destination[E_AXIS] - current_position[E_AXIS]);
#endif
}
void unknown_command_error() {