Bugfix in flowrate.pl: negative coordinates were not parsed

This commit is contained in:
Alessandro Ranellucci 2017-03-31 17:04:35 +02:00
parent ff42ad5512
commit 1ee70c33d5

View File

@ -16,7 +16,7 @@ while (<>) {
if (/^G1.*? F([0-9.]+)/) {
$F = $1;
}
if (/^G1 X([0-9.]+) Y([0-9.]+).*? E([0-9.]+)/) {
if (/^G1 X([0-9.-]+) Y([0-9.-]+).*? E([0-9.-]+)/) {
my ($x, $y, $e) = ($1, $2, $3);
my $e_length = $e - $E;
if ($e_length > 0 && defined $X && defined $Y) {