From 64031ab3d7c5a857d5bdaa975752112f2da38a49 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 24 Apr 2020 15:54:18 -0400 Subject: gcode: Rename respond() to respond_raw() Rename the method to make it more clear that it is a low-level call that should be rarely used. Also, change gcode_button.py, hall_filament_width_sensor.py, and tsl1401cl_filament_width_sensor.py to use respond_info() instead of respond_raw(). Signed-off-by: Kevin O'Connor --- klippy/extras/virtual_sdcard.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'klippy/extras/virtual_sdcard.py') diff --git a/klippy/extras/virtual_sdcard.py b/klippy/extras/virtual_sdcard.py index a73d3d12..9b08842c 100644 --- a/klippy/extras/virtual_sdcard.py +++ b/klippy/extras/virtual_sdcard.py @@ -72,13 +72,13 @@ class VirtualSD: def cmd_M20(self, params): # List SD card files = self.get_file_list() - self.gcode.respond("Begin file list") + self.gcode.respond_raw("Begin file list") for fname, fsize in files: - self.gcode.respond("%s %d" % (fname, fsize)) - self.gcode.respond("End file list") + self.gcode.respond_raw("%s %d" % (fname, fsize)) + self.gcode.respond_raw("End file list") def cmd_M21(self, params): # Initialize SD card - self.gcode.respond("SD card ok") + self.gcode.respond_raw("SD card ok") def cmd_M23(self, params): # Select SD file if self.work_timer is not None: @@ -108,8 +108,8 @@ class VirtualSD: except: logging.exception("virtual_sdcard file open") raise self.gcode.error("Unable to open file") - self.gcode.respond("File opened:%s Size:%d" % (filename, fsize)) - self.gcode.respond("File selected") + self.gcode.respond_raw("File opened:%s Size:%d" % (filename, fsize)) + self.gcode.respond_raw("File selected") self.current_file = f self.file_position = 0 self.file_size = fsize @@ -132,9 +132,9 @@ class VirtualSD: def cmd_M27(self, params): # Report SD print status if self.current_file is None: - self.gcode.respond("Not SD printing.") + self.gcode.respond_raw("Not SD printing.") return - self.gcode.respond("SD printing byte %d/%d" % ( + self.gcode.respond_raw("SD printing byte %d/%d" % ( self.file_position, self.file_size)) # Background work timer def work_handler(self, eventtime): @@ -162,7 +162,7 @@ class VirtualSD: self.current_file.close() self.current_file = None logging.info("Finished SD card print") - self.gcode.respond("Done printing file") + self.gcode.respond_raw("Done printing file") break lines = data.split('\n') lines[0] = partial_input + lines[0] -- cgit v1.2.3-70-g09d2