From 773a3cf4c8ff48ef3a22def9180b7d76f42559f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0=C3=A1rka=20Faloutov=C3=A1?= <65911928+sarkafa@users.noreply.github.com> Date: Thu, 3 Oct 2024 08:22:52 +0200 Subject: [PATCH] sl exposure time as float (#53) --- 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 5920678..1317eea 100644 --- a/gcode_metadata/metadata.py +++ b/gcode_metadata/metadata.py @@ -849,12 +849,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 47d8b24..213b0e1 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -384,8 +384,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',