Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethjiang committed Dec 21, 2024
1 parent 18ef2e3 commit 7da664a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion moonraker_obico/printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ def get_z_info(self):
current_layer = min(total_layers, current_layer) # Apparently the previous calculation can result in current_layer > total_layers in some cases...
current_layer = max(current_layer, 0) # Apparently the previous calculation can result in negative number in some cases...

if max_z and current_z > max_z: current_z = 0 # prevent buggy looking flicker on print start
if max_z is not None and current_z is not None and current_z > max_z:
current_z = 0 # prevent buggy looking flicker on print start
if current_layer is None or total_layers is None or is_not_busy or not has_print_duration: # edge case handling - if either are not available we show nothing / show nothing if paused state, transient, etc / show nothing if no print duration (prevents tracking z height during preheat & start bytes)
current_layer = None
total_layers = None
Expand Down

0 comments on commit 7da664a

Please sign in to comment.