Merge pull request #7726 from Bostwickenator/master

Add PostProcessingPlugin script DisplayProgressOnLCD
This commit is contained in:
Konstantinos Karmas 2020-07-08 17:30:05 +02:00 committed by GitHub
commit 79a816db6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 141 additions and 94 deletions

View file

@ -152,6 +152,17 @@ class VersionUpgrade462to47(VersionUpgrade):
if "redo_layers" in script_parser["PauseAtHeight"]:
script_parser["PauseAtHeight"]["redo_layer"] = str(int(script_parser["PauseAtHeight"]["redo_layers"]) > 0)
del script_parser["PauseAtHeight"]["redo_layers"] # Has been renamed to without the S.
# Migrate DisplayCompleteOnLCD to DisplayProgressOnLCD
if script_id == "DisplayRemainingTimeOnLCD":
was_enabled = parseBool(script_parser[script_id]["TurnOn"]) if "TurnOn" in script_parser[script_id] else False
script_parser.remove_section(script_id)
script_id = "DisplayProgressOnLCD"
script_parser.add_section(script_id)
if was_enabled:
script_parser.set(script_id, "time_remaining", "True")
script_io = io.StringIO()
script_parser.write(script_io)
script_str = script_io.getvalue()