diff options
author | Alexander Gee <bostwickenator@gmail.com> | 2020-05-24 00:42:01 +0300 |
---|---|---|
committer | Alexander Gee <bostwickenator@gmail.com> | 2020-05-24 00:42:01 +0300 |
commit | e807a086b4c1db930972ad6125f398b9703e4973 (patch) | |
tree | ee5075c560c6ef430cef5bfb8fcaaae304df5c0f /plugins/VersionUpgrade/VersionUpgrade462to47 | |
parent | 91199c8501228929424d04e6ad9b7f0c83da2047 (diff) |
Refactor setting names for consistancy, migration script
Diffstat (limited to 'plugins/VersionUpgrade/VersionUpgrade462to47')
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py b/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py index 7b328e10e6..9f99eeec79 100644 --- a/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py +++ b/plugins/VersionUpgrade/VersionUpgrade462to47/VersionUpgrade462to47.py @@ -120,6 +120,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 == "DisplayPercentCompleteOnLCD": + script_settings = script_parser.items(script_id) + script_parser.remove_section(script_id) + + script_id = "DisplayProgressOnLCD" + script_parser.add_section(script_id) + if (script_settings["TurnOn"] == "true"): + script_parser.set(script_id, "time_remaining", "true") + script_io = io.StringIO() script_parser.write(script_io) script_str = script_io.getvalue() |