diff --git a/src/octoprint/printer/standard.py b/src/octoprint/printer/standard.py index 68496930..1d8ebd1f 100644 --- a/src/octoprint/printer/standard.py +++ b/src/octoprint/printer/standard.py @@ -393,7 +393,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback): self._printAfterSelect = printAfterSelect self._posAfterSelect = pos - self._comm.selectFile("/" + path if sd and not settings().getBoolean(["feature", "sdRelativePath"]) else path, sd) + self._comm.selectFile("/" + path if sd else path, sd) self._setProgressData(completion=0) self._setCurrentZ(None) diff --git a/src/octoprint/server/api/settings.py b/src/octoprint/server/api/settings.py index 8ccc0e12..339a77a2 100644 --- a/src/octoprint/server/api/settings.py +++ b/src/octoprint/server/api/settings.py @@ -104,7 +104,8 @@ def getSettings(): "keyboardControl": s.getBoolean(["feature", "keyboardControl"]), "pollWatched": s.getBoolean(["feature", "pollWatched"]), "ignoreIdenticalResends": s.getBoolean(["feature", "ignoreIdenticalResends"]), - "modelSizeDetection": s.getBoolean(["feature", "modelSizeDetection"]) + "modelSizeDetection": s.getBoolean(["feature", "modelSizeDetection"]), + "firmwareDetection": s.getBoolean(["feature", "firmwareDetection"]) }, "serial": { "port": connectionOptions["portPreference"], @@ -274,6 +275,7 @@ def _saveSettings(data): if "pollWatched" in data["feature"]: s.setBoolean(["feature", "pollWatched"], data["feature"]["pollWatched"]) if "ignoreIdenticalResends" in data["feature"]: s.setBoolean(["feature", "ignoreIdenticalResends"], data["feature"]["ignoreIdenticalResends"]) if "modelSizeDetection" in data["feature"]: s.setBoolean(["feature", "modelSizeDetection"], data["feature"]["modelSizeDetection"]) + if "firmwareDetection" in data["feature"]: s.setBoolean(["feature", "firmwareDetection"], data["feature"]["firmwareDetection"]) if "serial" in data.keys(): if "autoconnect" in data["serial"].keys(): s.setBoolean(["serial", "autoconnect"], data["serial"]["autoconnect"]) diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index 20cb42b3..fdface85 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -197,7 +197,8 @@ default_settings = { "ignoreIdenticalResends": False, "identicalResendsCountdown": 7, "supportFAsCommand": False, - "modelSizeDetection": True + "modelSizeDetection": True, + "firmwareDetection": True }, "folder": { "uploads": None, diff --git a/src/octoprint/static/js/app/viewmodels/settings.js b/src/octoprint/static/js/app/viewmodels/settings.js index 96381f30..12e4703c 100644 --- a/src/octoprint/static/js/app/viewmodels/settings.js +++ b/src/octoprint/static/js/app/viewmodels/settings.js @@ -133,6 +133,7 @@ $(function() { self.feature_pollWatched = ko.observable(undefined); self.feature_ignoreIdenticalResends = ko.observable(undefined); self.feature_modelSizeDetection = ko.observable(undefined); + self.feature_firmwareDetection = ko.observable(undefined); self.serial_port = ko.observable(); self.serial_baudrate = ko.observable(); diff --git a/src/octoprint/templates/dialogs/settings/features.jinja2 b/src/octoprint/templates/dialogs/settings/features.jinja2 index ab7a8843..3d146167 100644 --- a/src/octoprint/templates/dialogs/settings/features.jinja2 +++ b/src/octoprint/templates/dialogs/settings/features.jinja2 @@ -34,53 +34,67 @@ +