Bugfix: M73 was exceeding 100% when multiple objects were printed together. #1912

This commit is contained in:
Alessandro Ranellucci 2014-06-05 16:24:47 +02:00
parent 342513a4de
commit 64853d5661
3 changed files with 49 additions and 16 deletions

View file

@ -82,6 +82,7 @@ sub change_layer {
my $gcode = "";
if ($self->config->gcode_flavor =~ /^(?:makerware|sailfish)$/) {
# TODO: cap this to 99% and add an explicit M73 P100 in the end G-code
$gcode .= sprintf "M73 P%s%s\n",
int(99 * ($self->_layer_index / ($self->layer_count - 1))),
($self->config->gcode_comments ? ' ; update progress' : '');