virtual_sdcard: reset file position and size to integer zero
This resolves an issue with API server clients that always expect these values be be integers. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
d32a833455
commit
b9247810b9
|
@ -119,7 +119,7 @@ class VirtualSD:
|
||||||
self.current_file.close()
|
self.current_file.close()
|
||||||
self.current_file = None
|
self.current_file = None
|
||||||
self.print_stats.note_cancel()
|
self.print_stats.note_cancel()
|
||||||
self.file_position = self.file_size = 0.
|
self.file_position = self.file_size = 0
|
||||||
# G-Code commands
|
# G-Code commands
|
||||||
def cmd_error(self, gcmd):
|
def cmd_error(self, gcmd):
|
||||||
raise gcmd.error("SD write not supported")
|
raise gcmd.error("SD write not supported")
|
||||||
|
@ -128,7 +128,7 @@ class VirtualSD:
|
||||||
self.do_pause()
|
self.do_pause()
|
||||||
self.current_file.close()
|
self.current_file.close()
|
||||||
self.current_file = None
|
self.current_file = None
|
||||||
self.file_position = self.file_size = 0.
|
self.file_position = self.file_size = 0
|
||||||
self.print_stats.reset()
|
self.print_stats.reset()
|
||||||
self.printer.send_event("virtual_sdcard:reset_file")
|
self.printer.send_event("virtual_sdcard:reset_file")
|
||||||
cmd_SDCARD_RESET_FILE_help = "Clears a loaded SD File. Stops the print "\
|
cmd_SDCARD_RESET_FILE_help = "Clears a loaded SD File. Stops the print "\
|
||||||
|
|
Loading…
Reference in New Issue