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:
Arksine 2020-07-31 15:35:07 -04:00
parent 65d82a3fe8
commit 89fa9ba47e
1 changed files with 3 additions and 3 deletions

View File

@ -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):