gcode_apis: update "print start" API to use SDCARD_PRINT_FILE gcode
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
65d82a3fe8
commit
89fa9ba47e
|
@ -52,9 +52,9 @@ class GCodeAPIs:
|
|||
filename = args.get('filename')
|
||||
# XXX - validate that file is on disk
|
||||
|
||||
if filename[0] != '/':
|
||||
filename = '/' + filename
|
||||
script = "M23 " + filename + "\nM24"
|
||||
if filename[0] == '/':
|
||||
filename = filename[1:]
|
||||
script = "SDCARD_PRINT_FILE FILENAME=" + filename
|
||||
return await self._send_gcode(script)
|
||||
|
||||
async def gcode_restart(self, path, method, args):
|
||||
|
|
Loading…
Reference in New Issue