klippy_apis: send events on pause, resume, and cancel requests
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
7c1d6a8f24
commit
071a430159
|
@ -62,12 +62,15 @@ class KlippyAPI(Subscribable):
|
|||
"/printer/firmware_restart", ['POST'], self._gcode_firmware_restart)
|
||||
|
||||
async def _gcode_pause(self, web_request: WebRequest) -> str:
|
||||
self.server.send_event("klippy_apis:pause_requested")
|
||||
return await self._send_klippy_request("pause_resume/pause", {})
|
||||
|
||||
async def _gcode_resume(self, web_request: WebRequest) -> str:
|
||||
self.server.send_event("klippy_apis:resume_requested")
|
||||
return await self._send_klippy_request("pause_resume/resume", {})
|
||||
|
||||
async def _gcode_cancel(self, web_request: WebRequest) -> str:
|
||||
self.server.send_event("klippy_apis:cancel_requested")
|
||||
return await self._send_klippy_request("pause_resume/cancel", {})
|
||||
|
||||
async def _gcode_start_print(self, web_request: WebRequest) -> str:
|
||||
|
|
Loading…
Reference in New Issue