DisplayProgressOnLCD.py 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Cura PostProcessingPlugin
  2. # Author: Mathias Lyngklip Kjeldgaard, Alexander Gee, Kimmo Toivanen, Inigo Martinez
  3. # Date: July 31, 2019
  4. # Modified: Nov 30, 2021
  5. # Description: This plugin displays progress on the LCD. It can output the estimated time remaining and the completion percentage.
  6. from ..Script import Script
  7. from UM.Message import Message
  8. class DisplayProgressOnLCD(Script):
  9. def initialize(self) -> None:
  10. Message(title = "[Display Progress on LCD]", text = "This script is now an option in 'Display Info on LCD'. This post processor no longer works.").show()
  11. def getSettingDataString(self):
  12. return """{
  13. "name": "Display Progress On LCD",
  14. "key": "DisplayProgressOnLCD",
  15. "metadata": {},
  16. "version": 2,
  17. "settings":
  18. {
  19. "enable_script":
  20. {
  21. "label": "Deprecated/Obsolete",
  22. "description": "This script is now included in 'Display Info on LCD'.",
  23. "type": "bool",
  24. "default_value": true
  25. }
  26. }
  27. }"""
  28. def execute(self, data):
  29. Message(title = "[Display Progress on LCD]", text = "This post is now included in 'Display Info on LCD'. This script will exit.").show()
  30. data[0] += "; [Display Progress on LCD] Did not run. It is now included in 'Display Info on LCD'.\n"
  31. return data