From f9a0cb94f7a5e7c4b6077d9c4f1d32de7016d7ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 24 Aug 2015 14:28:42 +0200 Subject: [PATCH] Moved new resend setting into feature section That's where all other protocol specific settings are currently located. Will be migrated at a later date into the printer profile instead (that makes way more sense). (cherry picked from commit d0f61e5) --- src/octoprint/settings.py | 8 ++++---- src/octoprint/util/comm.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index c6f5f6dc..4cb519af 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -83,9 +83,7 @@ default_settings = { "sdStatus": 1 }, "additionalPorts": [], - "longRunningCommands": ["G4", "G28", "G29", "G30", "G32"], - "ignoreIdenticalResends": False, - "identicalResendsCountdown": 7 + "longRunningCommands": ["G4", "G28", "G29", "G30", "G32"] }, "server": { "host": "0.0.0.0", @@ -145,7 +143,9 @@ default_settings = { "externalHeatupDetection": True, "supportWait": True, "keyboardControl": True, - "pollWatched": False + "pollWatched": False, + "ignoreIdenticalResends": False, + "identicalResendsCountdown": 7 }, "folder": { "uploads": None, diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index 883fe58a..1dfbfb54 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -238,7 +238,7 @@ class MachineCom(object): self._lastResendNumber = None self._currentResendCount = 0 self._resendSwallowNextOk = False - self._resendSwallowRepetitions = settings().getBoolean(["serial", "ignoreIdenticalResends"]) + self._resendSwallowRepetitions = settings().getBoolean(["feature", "ignoreIdenticalResends"]) self._resendSwallowRepetitionsCounter = 0 self._clear_to_send = CountedEvent(max=10, name="comm.clear_to_send") @@ -1435,7 +1435,7 @@ class MachineCom(object): self._resendDelta = resendDelta self._lastResendNumber = lineToResend self._currentResendCount = 0 - self._resendSwallowRepetitionsCounter = settings().getInt(["serial", "identicalResendsCountdown"]) + self._resendSwallowRepetitionsCounter = settings().getInt(["feature", "identicalResendsCountdown"]) if self._resendDelta > len(self._lastLines) or len(self._lastLines) == 0 or self._resendDelta < 0: self._errorValue = "Printer requested line %d but no sufficient history is available, can't resend" % lineToResend