From 07cee7257af066cbcebe3b6c336e825bdeb563b7 Mon Sep 17 00:00:00 2001 From: PxT Date: Tue, 21 Jul 2015 13:16:56 -0700 Subject: [PATCH] Handle automatic extrusionWidth Fixes #3 --- wipe_towers_v01.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wipe_towers_v01.pl b/wipe_towers_v01.pl index 53dbab7..d5ec897 100755 --- a/wipe_towers_v01.pl +++ b/wipe_towers_v01.pl @@ -703,7 +703,11 @@ sub readParams{ # collecting params $filamentDiameter=$1*1.0; } if($_[0]=~/extrusionWidth=(\d*\.?\d*)/){ - $extrusionWidth=$1*1.0; + # Use the specified extrusion width, unless it is set to the "automatic" value of 0, + # in which case the pre-initialized value of $nozzleDiameter will be used + unless ( $1 eq "0" ) { + $extrusionWidth=$1*1.0; + } } if($_[0]=~/extrusionMultiplier=(\d*\.?\d*)/){ $extrusionMultiplier=$1*1.0;