simplyprint: fix layer detect divide by zero
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
a3e4dac5fb
commit
99b97afc7d
|
@ -1289,9 +1289,9 @@ class LayerDetect:
|
||||||
|
|
||||||
def start(self, metadata: Dict[str, Any]) -> None:
|
def start(self, metadata: Dict[str, Any]) -> None:
|
||||||
self.reset()
|
self.reset()
|
||||||
lh: Optional[float] = metadata.get("layer_height")
|
lh: float = metadata.get("layer_height", 0)
|
||||||
flh: Optional[float] = metadata.get("first_layer_height", lh)
|
flh: float = metadata.get("first_layer_height", lh)
|
||||||
if lh is not None and flh is not None:
|
if lh > 0.000001 and flh > 0.000001:
|
||||||
self._active = True
|
self._active = True
|
||||||
self._layer_height = lh
|
self._layer_height = lh
|
||||||
self._fl_height = flh
|
self._fl_height = flh
|
||||||
|
|
Loading…
Reference in New Issue