Minimum temperature cutoff is now 1 min

Solves core reason of #2213
This commit is contained in:
Gina Häußge committed 2017-12-14 18:10:41 +01:00
1 parent b079978384
commit bad3612ed2
2 files changed
+8 -2

No files matched your search

+7 -1
View File
@@ -408,7 +408,13 @@ def _saveSettings(data):
if "temperature" in data.keys():
if "profiles" in data["temperature"]: s.set(["temperature", "profiles"], data["temperature"]["profiles"])
if "cutoff" in data["temperature"]: s.setInt(["temperature", "cutoff"], data["temperature"]["cutoff"])
if "cutoff" in data["temperature"]:
try:
cutoff = int(data["temperature"]["cutoff"])
if cutoff > 1:
s.setInt(["temperature", "cutoff"], cutoff)
except ValueError:
pass
if "sendAutomatically" in data["temperature"]: s.setBoolean(["temperature", "sendAutomatically"], data["temperature"]["sendAutomatically"])
if "sendAutomaticallyAfter" in data["temperature"]: s.setInt(["temperature", "sendAutomaticallyAfter"], data["temperature"]["sendAutomaticallyAfter"], min=0, max=30)
@@ -4,7 +4,7 @@
<label class="control-label">{{ _('Graph cutoff') }}</label>
<div class="controls">
<div class="input-append">
<input type="number" class="input-mini text-right" data-bind="value: temperature_cutoff">
<input type="number" min="1" class="input-mini text-right" data-bind="value: temperature_cutoff">
<span class="add-on">min</span>
</div>
<span class="help-block">{{ _('Needs a restart of OctoPrint to become active.') }}</span>