Fixed t/vibrationlimit.t
This commit is contained in:
parent
473802ce8c
commit
092b1724ba
@ -15,7 +15,7 @@ my $config = Slic3r::Config->new_from_defaults;
|
|||||||
|
|
||||||
# tolerance, in minutes
|
# tolerance, in minutes
|
||||||
# (our time estimation differs from the internal one because of decimals truncation)
|
# (our time estimation differs from the internal one because of decimals truncation)
|
||||||
my $epsilon = 0.003;
|
my $epsilon = 0.002;
|
||||||
|
|
||||||
my $test = sub {
|
my $test = sub {
|
||||||
my ($conf) = @_;
|
my ($conf) = @_;
|
||||||
@ -57,8 +57,11 @@ my $test = sub {
|
|||||||
|
|
||||||
my $one_axis_would_trigger_limit_without_pause = 0;
|
my $one_axis_would_trigger_limit_without_pause = 0;
|
||||||
foreach my $axis (qw(X Y)) {
|
foreach my $axis (qw(X Y)) {
|
||||||
|
# get the direction by comparing the new $axis coordinate with the current one
|
||||||
|
# 1 = positive, 0 = no change, -1 = negative
|
||||||
|
my $dir = $info->{"new_$axis"} <=> $self->$axis;
|
||||||
|
|
||||||
# are we changing direction on this axis?
|
# are we changing direction on this axis?
|
||||||
my $dir = $info->{"dist_$axis"} <=> ($args->{$axis} // $self->$axis);
|
|
||||||
if ($dir != 0 && $dir{$axis} != $dir) {
|
if ($dir != 0 && $dir{$axis} != $dir) {
|
||||||
# this move changes direction on this axis
|
# this move changes direction on this axis
|
||||||
if ($dir{$axis} != 0) {
|
if ($dir{$axis} != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user