添加开始打印的宏命令

This commit is contained in:
张开科 2024-10-18 16:40:42 +08:00
parent caed3a1659
commit 9f32f0704a

View File

@ -143,6 +143,7 @@ class KlippyAPI(APITransport):
script = f'SDCARD_PRINT_FILE FILENAME="{filename}"' script = f'SDCARD_PRINT_FILE FILENAME="{filename}"'
if wait_klippy_started: if wait_klippy_started:
await self.klippy.wait_started() await self.klippy.wait_started()
await self.run_gcode("_START_PRINT_BASE")
logging.info(f"Requesting Job Start, filename = {filename}") logging.info(f"Requesting Job Start, filename = {filename}")
ret = await self.run_gcode(script) ret = await self.run_gcode(script)
self.server.send_event("klippy_apis:job_start_complete", user) self.server.send_event("klippy_apis:job_start_complete", user)