aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/virtual_sdcard.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-02-20 20:50:06 -0500
committerKevin O'Connor <kevin@koconnor.net>2018-03-06 11:30:46 -0500
commit08a5f8a5ffbc4a3aed825f8e9840702faab482d7 (patch)
tree97b469d56bfb04577187df0398f460f7165e3bbb /klippy/extras/virtual_sdcard.py
parent43ac56766e39d9a85372cdf7c1926ffa049f9342 (diff)
downloadkutter-08a5f8a5ffbc4a3aed825f8e9840702faab482d7.tar.gz
kutter-08a5f8a5ffbc4a3aed825f8e9840702faab482d7.tar.xz
kutter-08a5f8a5ffbc4a3aed825f8e9840702faab482d7.zip
display: Add initial support for LCD screens attached to an MCU
Add support for displaying basic status information on ST7920 and HD44780 based LCDs that are attached directly to a micro-controller. Signed-off-by: Marcio Teixeira <marcio@alephobjects.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/virtual_sdcard.py')
-rw-r--r--klippy/extras/virtual_sdcard.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/klippy/extras/virtual_sdcard.py b/klippy/extras/virtual_sdcard.py
index ad435786..79e57c13 100644
--- a/klippy/extras/virtual_sdcard.py
+++ b/klippy/extras/virtual_sdcard.py
@@ -35,6 +35,11 @@ class VirtualSD:
except:
logging.exception("virtual_sdcard get_file_list")
raise self.gcode.error("Unable to get file list")
+ def get_status(self, eventtime):
+ progress = 0.
+ if self.work_timer is not None and self.file_size:
+ progress = float(self.file_position) / self.file_size
+ return {'progress': progress}
# G-Code commands
def cmd_error(self, params):
raise self.gcode.error("SD write not supported")