Skip to content

Commit

Permalink
unify sl estimated_print_time to int with fdm
Browse files Browse the repository at this point in the history
  • Loading branch information
sarkafa committed Aug 27, 2024
1 parent d2c1c3a commit 2a7b559
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion gcode_metadata/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,8 @@ class SLMetaData(MetaData):
# thumbnails!

Attrs = {
"estimated_print_time": float,
# to unify sl float with fdm int value
"estimated_print_time": lambda x: int(float(x)),
"layer_height": float,
"material": str,
"exposure_time": int,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def test_sl(self):
meta = get_metadata(fname, False)

assert meta.data == {
'estimated_print_time': 2722.16,
'estimated_print_time': 2722,
'exposure_time': 2,
'exposure_time_first': 25,
'layer_height': 0.05,
Expand Down

0 comments on commit 2a7b559

Please sign in to comment.