Skip to content

Commit

Permalink
sl exposure time as float
Browse files Browse the repository at this point in the history
  • Loading branch information
sarkafa committed Oct 2, 2024
1 parent c72c210 commit 40b800e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions gcode_metadata/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 40b800e

Please sign in to comment.