From 40b800eecaf3fb005d5d59fcbc7f89a4d86a78ea Mon Sep 17 00:00:00 2001 From: "sarka.faloutova" Date: Wed, 2 Oct 2024 12:53:05 +0200 Subject: [PATCH] sl exposure time as float --- gcode_metadata/metadata.py | 8 ++++---- tests/test_metadata.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcode_metadata/metadata.py b/gcode_metadata/metadata.py index 164739b..8b5cc7f 100644 --- a/gcode_metadata/metadata.py +++ b/gcode_metadata/metadata.py @@ -848,12 +848,12 @@ class SLMetaData(MetaData): Attrs = { # to unify sl float with fdm int value "estimated_print_time": lambda x: int(float(x)), - "layer_height": float, + "layer_height": float, # mm "material": str, - "exposure_time": int, - "exposure_time_first": int, + "exposure_time": float, # s + "exposure_time_first": float, # s "total_layers": int, - "total_height": float, + "total_height": float, # mm # to unify with filament used [mm] rounded to 2 decimal places "resin_used_ml": lambda x: round(float(x), 2), "printer_model": str, diff --git a/tests/test_metadata.py b/tests/test_metadata.py index b317047..4a84a56 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -342,8 +342,8 @@ def test_sl(self): assert meta.data == { 'estimated_print_time': 2722, - 'exposure_time': 2, - 'exposure_time_first': 25, + 'exposure_time': 2.0, + 'exposure_time_first': 25.0, 'layer_height': 0.05, 'material': 'Prusament Resin Tough Prusa Orange @0.05 SL1S', 'printer_model': 'SL1S',