change name from start_new_print to start_resume_print

This commit is contained in:
jneilliii 2024-07-27 17:01:22 -04:00
parent f42d3167c5
commit 16dc138e9f
3 changed files with 4 additions and 4 deletions

View File

@ -478,7 +478,7 @@ class BambuVirtualPrinter:
@gcode_executor.register_no_data("M24")
def _start_print(self):
self._current_state.start_new_print()
self._current_state.start_resume_print()
return True
@gcode_executor.register_no_data("M25")

View File

@ -6,13 +6,13 @@ from octoprint_bambu_printer.printer.states.a_printer_state import APrinterState
class IdleState(APrinterState):
def start_new_print(self):
def start_resume_print(self):
selected_file = self._printer.selected_file
if selected_file is None:
self._log.warn("Cannot start print job if file was not selected")
return
print_command = self._get_print_command_for_file(selected_file)
print_command = self._get_print_command_for_file(selected_file.file_name)
if self._printer.bambu_client.publish(print_command):
self._log.info(f"Started print for {selected_file.file_name}")
self._printer.change_state(self._printer._state_printing)

View File

@ -44,7 +44,7 @@ class PausedState(APrinterState):
)
paused_timer.start()
def resume_print(self):
def start_resume_print(self):
if self._printer.bambu_client.connected:
if self._printer.bambu_client.publish(pybambu.commands.RESUME):
self._log.info("print resumed")