Change presentation of serial error handling config
A set of radio controls is less confusing than two distinct checkboxes.
This commit is contained in:
1 parent
de0660f678
commit
c84f49e852
2 files changed
+17
-13
No files matched your search
@@ -162,8 +162,7 @@ $(function() {
|
||||
self.serial_longRunningCommands = ko.observable(undefined);
|
||||
self.serial_checksumRequiringCommands = ko.observable(undefined);
|
||||
self.serial_helloCommand = ko.observable(undefined);
|
||||
self.serial_ignoreErrorsFromFirmware = ko.observable(undefined);
|
||||
self.serial_disconnectOnErrors = ko.observable(undefined);
|
||||
self.serial_serialErrorBehaviour = ko.observable(undefined);
|
||||
self.serial_triggerOkForM29 = ko.observable(undefined);
|
||||
self.serial_waitForStart = ko.observable(undefined);
|
||||
self.serial_sendChecksum = ko.observable("print");
|
||||
@@ -694,8 +693,10 @@ $(function() {
|
||||
longRunningCommands: function() { return splitTextToArray(self.serial_longRunningCommands(), ",", true) },
|
||||
checksumRequiringCommands: function() { return splitTextToArray(self.serial_checksumRequiringCommands(), ",", true) },
|
||||
externalHeatupDetection: function() { return !self.serial_disableExternalHeatupDetection()},
|
||||
alwaysSendChecksum: function() { return self.serial_sendChecksum() == "always"},
|
||||
neverSendChecksum: function() { return self.serial_sendChecksum() == "never"}
|
||||
alwaysSendChecksum: function() { return self.serial_sendChecksum() === "always"},
|
||||
neverSendChecksum: function() { return self.serial_sendChecksum() === "never"},
|
||||
ignoreErrorsFromFirmware: function() { return self.serial_serialErrorBehaviour() === "ignore"},
|
||||
disconnectOnErrors: function() { return self.serial_serialErrorBehaviour() === "disconnect" }
|
||||
},
|
||||
scripts: {
|
||||
gcode: function() {
|
||||
@@ -812,7 +813,9 @@ $(function() {
|
||||
checksumRequiringCommands: function(value) { self.serial_checksumRequiringCommands(value.join(", "))},
|
||||
externalHeatupDetection: function(value) { self.serial_disableExternalHeatupDetection(!value) },
|
||||
alwaysSendChecksum: function(value) { if (value) { self.serial_sendChecksum("always")}},
|
||||
neverSendChecksum: function(value) { if (value) { self.serial_sendChecksum("never")}}
|
||||
neverSendChecksum: function(value) { if (value) { self.serial_sendChecksum("never")}},
|
||||
ignoreErrorsFromFirmware: function(value) { if (value) {self.serial_serialErrorBehaviour("ignore")}},
|
||||
disconnectOnErrors: function(value) { if (value) {self.serial_serialErrorBehaviour("disconnect")}}
|
||||
},
|
||||
terminalFilters: function(value) { self.terminalFilters($.extend(true, [], value)) },
|
||||
temperature: {
|
||||
|
||||
@@ -318,16 +318,17 @@
|
||||
<fieldset>
|
||||
<legend>{{ _('Error handling') }}</legend>
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ _('What to do on a firmware error (<code>Error:</code> or <code>!!</code>)') }}</label>
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: serial_disconnectOnErrors" id="settings-serialDisconnectOnErrors"> {{ _('Not only cancel ongoing prints but also disconnect on unhandled errors from the firmware.') }}
|
||||
<label class="radio">
|
||||
<input type="radio" name="errorHandlingGroup" value="disconnect" data-bind="checked: serial_serialErrorBehaviour" id="settings-serialErrorBehaviourDisconnect"> {{ _('Disconnect from the printer') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: serial_ignoreErrorsFromFirmware" id="settings-serialIgnoreErrorsFromFirmware"> {{ _('Ignore any unhandled errors from the firmware. Only use this if your firmware sends stuff prefixed with "Error" that is not an actual error. Might mask printer issues, be careful!') }} <span class="label label-important">{{ _('Warning') }}</span>
|
||||
<label class="radio">
|
||||
<input type="radio" name="errorHandlingGroup" value="cancel" data-bind="checked: serial_serialErrorBehaviour" id="settings-serialErrorBehaviourCancel"> {{ _('Cancel any ongoing prints but stay connected to the printer') }}
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="errorHandlingGroup" value="ignore" data-bind="checked: serial_serialErrorBehaviour" id="settings-serialErrorBehaviourIgnore"> {{ _('Ignore') }} <span class="label label-important">{{ _('Warning') }}</span>
|
||||
<span class="help-block">{{ _('Only choose this if your firmware sends error messages that are not actual errors. Might mask printer issues, be careful!') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user