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:
Eric Callahan 2023-06-17 13:57:22 -04:00 committed by KevinOConnor
parent d32a833455
commit b9247810b9
1 changed files with 2 additions and 2 deletions

View File

@ -119,7 +119,7 @@ class VirtualSD:
self.current_file.close()
self.current_file = None
self.print_stats.note_cancel()
self.file_position = self.file_size = 0.
self.file_position = self.file_size = 0
# G-Code commands
def cmd_error(self, gcmd):
raise gcmd.error("SD write not supported")
@ -128,7 +128,7 @@ class VirtualSD:
self.do_pause()
self.current_file.close()
self.current_file = None
self.file_position = self.file_size = 0.
self.file_position = self.file_size = 0
self.print_stats.reset()
self.printer.send_event("virtual_sdcard:reset_file")
cmd_SDCARD_RESET_FILE_help = "Clears a loaded SD File. Stops the print "\