DisplayProgressOnLCD.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. import re
  8. import datetime
  9. from UM.Message import Message
  10. class DisplayProgressOnLCD(Script):
  11. def initialize(self) -> None:
  12. 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()
  13. def getSettingDataString(self):
  14. return """{
  15. "name": "Display Progress On LCD",
  16. "key": "DisplayProgressOnLCD",
  17. "metadata": {},
  18. "version": 2,
  19. "settings":
  20. {
  21. "enable_script":
  22. {
  23. "label": "Deprecated/Obsolete",
  24. "description": "This script is now included in 'Display Info on LCD'.",
  25. "type": "bool",
  26. "default_value": true
  27. }
  28. }
  29. }"""
  30. def execute(self, data):
  31. Message(title = "[Display Progress on LCD]", text = "This post is now included in 'Display Info on LCD'. This script will exit.").show()
  32. data[0] += "; [Display Progress on LCD] Did not run. It is now included in 'Display Info on LCD'.\n"
  33. return data