Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sl exposure time as float #53

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading