webui setting for gcodeAnalysis.runAt
This commit is contained in:
1 parent
46c527d24a
commit
6481f7cf6b
3 files changed
+23
No files matched your search
@@ -134,6 +134,9 @@ def getSettings():
|
||||
"g90InfluencesExtruder": s.getBoolean(["feature", "g90InfluencesExtruder"]),
|
||||
"autoUppercaseBlacklist": s.get(["feature", "autoUppercaseBlacklist"])
|
||||
},
|
||||
"gcodeAnalysis": {
|
||||
"runAt": s.get(["gcodeAnalysis", "runAt"])
|
||||
},
|
||||
"serial": {
|
||||
"port": connectionOptions["portPreference"],
|
||||
"baudrate": connectionOptions["baudratePreference"],
|
||||
@@ -428,6 +431,9 @@ def _saveSettings(data):
|
||||
if "g90InfluencesExtruder" in data["feature"]: s.setBoolean(["feature", "g90InfluencesExtruder"], data["feature"]["g90InfluencesExtruder"])
|
||||
if "autoUppercaseBlacklist" in data["feature"] and isinstance(data["feature"]["autoUppercaseBlacklist"], (list, tuple)): s.set(["feature", "autoUppercaseBlacklist"], data["feature"]["autoUppercaseBlacklist"])
|
||||
|
||||
if "gcodeAnalysis" in data:
|
||||
if "runAt" in data["gcodeAnalysis"]: s.set(["gcodeAnalysis", "runAt"], data["gcodeAnalysis"]["runAt"])
|
||||
|
||||
if "serial" in data:
|
||||
if "autoconnect" in data["serial"]: s.setBoolean(["serial", "autoconnect"], data["serial"]["autoconnect"])
|
||||
if "port" in data["serial"]: s.set(["serial", "port"], data["serial"]["port"])
|
||||
|
||||
@@ -154,6 +154,8 @@ $(function() {
|
||||
self.feature_g90InfluencesExtruder = ko.observable(undefined);
|
||||
self.feature_autoUppercaseBlacklist = ko.observable(undefined);
|
||||
|
||||
self.gcodeAnalysis_runAt = ko.observable(undefined);
|
||||
|
||||
self.serial_port = ko.observable();
|
||||
self.serial_baudrate = ko.observable();
|
||||
self.serial_exclusive = ko.observable();
|
||||
|
||||
@@ -56,4 +56,19 @@
|
||||
<span class="help-block">{{ _('Use this to specify the commands that should not have their parameters automatically uppercased in the terminal tab. Just the G or M code, comma separated.') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ _('Analyze gcode for print time estimates')}}</label>
|
||||
<div class="controls">
|
||||
<label class="radio">
|
||||
<input type="radio" name="analysisRunAtGroup" value="always" data-bind="checked: gcodeAnalysis_runAt" id="settings-gcodeAnalysis_runAtAlways"> {{ _('Always ') }}
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="analysisRunAtGroup" value="idle" data-bind="checked: gcodeAnalysis_runAt" id="settings-gcodeAnalysis_runAtIdle"> {{ _('Only when idle (not printing)') }}
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="analysisRunAtGroup" value="never" data-bind="checked: gcodeAnalysis_runAt" id="settings-gcodeAnalysis_runAtNever"> {{ _('Never') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
Reference in new issue
Block a user