diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2020-04-24 15:54:18 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2020-04-24 15:54:18 -0400 |
commit | 64031ab3d7c5a857d5bdaa975752112f2da38a49 (patch) | |
tree | 9b2133ae16967a6464f44779c98120c38c99dd0d /klippy/extras/virtual_sdcard.py | |
parent | 61524542d20e50c4866836d6ed23ca03521ffb15 (diff) | |
download | kutter-64031ab3d7c5a857d5bdaa975752112f2da38a49.tar.gz kutter-64031ab3d7c5a857d5bdaa975752112f2da38a49.tar.xz kutter-64031ab3d7c5a857d5bdaa975752112f2da38a49.zip |
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 <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/virtual_sdcard.py')
-rw-r--r-- | klippy/extras/virtual_sdcard.py | 18 |
1 files changed, 9 insertions, 9 deletions
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] |