Skip to content

Commit

Permalink
Fix zhop detection issue related to issue #195.
Browse files Browse the repository at this point in the history
  • Loading branch information
FormerLurker committed Jul 17, 2018
1 parent cb949a0 commit 1be64c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions octoprint_octolapse/position.py
Original file line number Diff line number Diff line change
Expand Up @@ -1210,11 +1210,11 @@ def update(self, gcode, cmd, parameters):
if pos.LastExtrusionHeight is not None:
# calculate lift, taking into account floating point
# rounding
lift = pos.distance_to_zlift(self.Printer.z_hop)
distance_to_lift = pos.distance_to_zlift(self.Printer.z_hop)

# todo: replace rounding with a call to is close or greater than utility function
lift = utility.round_to(lift, self.PrinterTolerance)
is_lifted = lift >= self.Printer.z_hop and not (
distance_to_lift = utility.round_to(distance_to_lift, self.PrinterTolerance)
is_lifted = distance_to_lift <= 0.0 and not (
self.Extruder.is_extruding() or self.Extruder.is_extruding_start()
)

Expand Down

0 comments on commit 1be64c1

Please sign in to comment.