Skip to content

Commit

Permalink
fix skip objects none
Browse files Browse the repository at this point in the history
  • Loading branch information
ohmdelta committed Oct 17, 2024
1 parent 9908dcc commit 087aa8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bambulabs_api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def start_print(self, filename: str,
plate_number: int,
use_ams: bool = True,
ams_mapping: list[int] = [0],
skip_objects: list[int] = [],
skip_objects: list[int] | None = None,
) -> bool:
"""
Start printing a file.
Expand All @@ -211,8 +211,8 @@ def start_print(self, filename: str,
ams_mapping : list[int], optional
The mapping of the filament trays to the plate numbers,
by default [0].
skip_objects (list[int], optional): List of gcode objects to skip.
Defaults to [].
skip_objects (list[int] | None, optional): List of gcode objects to
skip. Defaults to None.
Returns
-------
Expand Down
9 changes: 6 additions & 3 deletions bambulabs_api/mqtt_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def start_print_3mf(self, filename: str,
plate_number: int,
use_ams: bool = True,
ams_mapping: list[int] = [0],
skip_objects: list[int] = []
skip_objects: list[int] | None = None
) -> bool:
"""
Start the print
Expand All @@ -208,12 +208,15 @@ def start_print_3mf(self, filename: str,
plate_number (int): The plate number to print to
use_ams (bool, optional): Use the AMS system. Defaults to True.
ams_mapping (list[int], optional): The AMS mapping. Defaults to [0].
skip_objects (list[int], optional): List of gcode objects to skip.
Defaults to [].
skip_objects (list[int] | None, optional): List of gcode objects to
skip. Defaults to [].
Returns:
str: print_status
"""
if skip_objects is not None and not skip_objects:
skip_objects = None

return self.__publish_command(
{
"print":
Expand Down

0 comments on commit 087aa8d

Please sign in to comment.