Skip to content

Commit

Permalink
add auto step recovery setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ohmdelta committed Oct 27, 2024
1 parent d0e38db commit 3d079db
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bambulabs_api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,3 +515,13 @@ def set_chamber_fan_speed(self, speed: int | float) -> bool:
bool: success of setting the fan speed
"""
return self.__printerMQTTClient.set_chamber_fan_speed(speed)

def set_auto_step_recovery(self, auto_step_recovery: bool = True) -> bool:
"""
Set whether or not to set auto step recovery
Returns:
bool: success of the auto step recovery command command
"""
return self.__printerMQTTClient.set_auto_step_recovery(
auto_step_recovery)
11 changes: 11 additions & 0 deletions bambulabs_api/mqtt_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,17 @@ def auto_home(self) -> bool:
"""
return self.__send_gcode_line("G28\n")

def set_auto_step_recovery(self, auto_step_recovery: bool = True) -> bool:
"""
Set whether or not to set auto step recovery
Returns:
bool: success of the auto step recovery command command
"""
return self.__publish_command({"print": {
"command": "gcode_line", "auto_recovery": auto_step_recovery
}})

def set_print_speed_lvl(self, speed_lvl: int = 1) -> bool:
"""
Set the print speed
Expand Down

0 comments on commit 3d079db

Please sign in to comment.