Skip to content

Commit

Permalink
Version 1.22.5
Browse files Browse the repository at this point in the history
Added new Upload button to Display Editor
Updated README
Minor OEM improvements
Bug fix: Macros on the Control page were not properly sorted
  • Loading branch information
chrishamm committed Nov 14, 2018
1 parent 91c5c22 commit 5e5269a
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 15 deletions.
Binary file not shown.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DuetWebControl
# Duet Web Control

Duet Web Control is a fully-responsive HTML5-based web interface for RepRapFirmware which utilizes the Bootstrap framework, JQuery and a few other libraries to allow easy control of Duet-based 3D printer electronics.

Expand All @@ -17,7 +17,7 @@ At this time the following platforms are supported:

## Communication to the firmware

Since RepRapFirmware can only process one HTTP request at a time (excluding rr_fileinfo and rr_upload on certain platforms), DuetWebControl should attempt to avoid parallel requests. In general, the communication between the web interface and RepRapFirmware looks like this:
Since RepRapFirmware can only process one HTTP request at a time (excluding rr_fileinfo and rr_upload on certain platforms), Duet Web Control should attempt to avoid parallel requests. In general, the communication between the web interface and RepRapFirmware looks like this:

- Establish a connection (via rr_connect)
- Send an extended status request (rr_status?type=2) and start status update loop
Expand Down
4 changes: 4 additions & 0 deletions core/css/defaults.css
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,10 @@ label[for="dropdown_language"] {
margin-bottom: 0px;
}

#page_display button.btn-upload {
margin-bottom: 15px;
}

#page_settings {
padding-bottom: 15px;
}
Expand Down
6 changes: 4 additions & 2 deletions core/js/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -915,8 +915,10 @@ function macroFilesLoaded() {
if (currentMacroDirectory == "0:/macros") {
var listitems = $("#panel_macro_buttons > div > div.btn-group-vertical").children("div.btn-group").get();
listitems.sort(function(a, b) {
var result = $(a).children("button").text().toUpperCase().localeCompare($(b).children("button").text().toUpperCase());
return ($(a).children("button").data("directory") != null) ? result - 1 : result;
var filename1 = $(a).children("button").data("macro") || $(a).children("button").data("directory");
var filename2 = $(b).children("button").data("macro") || $(b).children("button").data("directory");
var result = filename1.toUpperCase().localeCompare(filename2.toUpperCase());
return ($(a).children("button").data("directory") != undefined) ? result - 1 : result;
})
$.each(listitems, function(idx, itm) { $("#panel_macro_buttons > div > div.btn-group-vertical").append(itm); });
}
Expand Down
20 changes: 11 additions & 9 deletions core/js/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -933,8 +933,8 @@ $("#table_calibration_tools").on("click", ".tool-offset-up", function(e) {
var changeTriggerHeight = (axis == "Z" && $(this).parents("tr").prop("rowIndex") == 1);
if (changeTriggerHeight)
{
zTriggerHeight -= 0.01;
sendGCode("G31 Z" + zTriggerHeight + "\nM290 S-0.01\nM500 P31");
zTriggerHeight = Math.round((zTriggerHeight - 0.01) * 100) / 100;
sendGCode("G31 Z" + zTriggerHeight.toFixed(2) + "\nM290 S-0.01\nM500 P31");
$(this).parents("td").children("span").text(T("{0} mm", zTriggerHeight.toFixed(2)));
}
else
Expand All @@ -957,7 +957,7 @@ $("#table_calibration_tools").on("click", ".tool-offset-down", function(e) {
var changeTriggerHeight = (axis == "Z" && $(this).parents("tr").prop("rowIndex") == 1);
if (changeTriggerHeight)
{
zTriggerHeight += 0.01;
zTriggerHeight = Math.round((zTriggerHeight + 0.01) * 100) / 100;
sendGCode("G31 Z" + zTriggerHeight + "\nM290 S0.01\nM500 P31");
$(this).parents("td").children("span").text(T("{0} mm", zTriggerHeight.toFixed(2)));
}
Expand All @@ -976,12 +976,14 @@ $("#table_calibration_tools").on("click", ".tool-offset-down", function(e) {
});

$("#table_calibration_tools").on("click", ".tool-calibrate", function(e) {
var toolNumber = $(this).parents("tr").data("tool");
showConfirmationDialog(T("Calibrate Tool"), T("Before you proceed please make sure that the calibration tool is installed. Continue?"),
function() {
sendGCode('M98 P"tcalibrate' + toolNumber + '.g"');
}
);
if (!$(this).hasClass("disabled")) {
var toolNumber = $(this).parents("tr").data("tool");
showConfirmationDialog(T("Calibrate Tool"), T("Before you proceed please make sure that the calibration tool is installed. Continue?"),
function() {
sendGCode('M98 P"tcalibrate' + toolNumber + '.g"');
}
);
}
});

$("#table_calibration_tools").on("click", ".tool-set-offset", function(e) {
Expand Down
12 changes: 12 additions & 0 deletions core/js/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,3 +518,15 @@ $("#modal_define_mesh form").submit(function(e) {
e.preventDefault();
});

/* Probe Cylinder (OEM) */

$("#a_probe_cylinder").click(function(e) {
$("#modal_cylinder").modal("show");
e.preventDefault();
});

$("#modal_cylinder form").submit(function(e) {
sendGCode("G28 Z\nG92 Z" + ($("#input_cylinder_diameter").val() / 2));
$("#modal_cylinder").modal("hide");
e.preventDefault();
});
6 changes: 6 additions & 0 deletions core/js/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ function uploadNextFile() {
targetPath = "0:/filaments/" + uploadFileName;
break;

case "menu": // Upload Display items
targetPath = "0:/menu/" + uploadFileName;
break;

default: // Generic Upload (on the Settings page)
var fileExts = uploadFileName.split('.');
var fileExt = fileExts.pop().toLowerCase();
Expand Down Expand Up @@ -516,6 +520,8 @@ function uploadHasFinished(success) {
if (currentPage == "filaments") {
updateFilaments();
}
} else if (uploadType == "menu") {
updateDisplayFiles();
} else if (refreshSysFiles) {
updateSysFiles();
}
Expand Down
36 changes: 34 additions & 2 deletions core/reprap.htm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<!-- Duet Web Control v1.22.4
<!-- Duet Web Control v1.22.5
written by Christian Hammacher
Expand Down Expand Up @@ -902,6 +902,8 @@ <h4 class="text-muted">App</h4>
<li title="Show the probe point heightmap as generated by G29"><a id="a_show_heightmap" href="#"><span class="glyphicon glyphicon-modal-window"></span> Show Mesh Grid Heightmap</a></li>
<li title="Load the saved heightmap from /sys/heightmap.csv and enable it (G29 S1)"><a data-gcode="G29 S1" href="#"><span class="glyphicon glyphicon-folder-open"></span> Load Heightmap from SD Card</a></li>
<li title="Clear the automatic mesh-based compensation parameters (G29 S2)"><a data-gcode="G29 S2" href="#"><span class="glyphicon glyphicon-erase"></span> Disable Mesh Grid Compensation</a></li>
<li class="divider diabase hidden"></li>
<li class="diabase hidden"><a href="#" id="a_probe_cylinder"><span class="glyphicon glyphicon-repeat"></span> Probe Cylinder for Rotary Printing</a></li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -2236,7 +2238,7 @@ <h1 class="text-center text-muted">Connect to your Duet to display Filaments</h1
</tr>
<tr>
<th>Web Interface Version:</th>
<td id="dwc_version">1.22.4</td>
<td id="dwc_version">1.22.5</td>
</tr>
</table>
<span id="span_copyright">Web Interface by Christian Hammacher<br/>Licensed under the terms of the <a href="https://www.gnu.org/licenses/gpl-3.0" target="blank">GPL v3</a></span>
Expand Down Expand Up @@ -2763,6 +2765,12 @@ <h1 class="text-center text-muted">Connect to your Duet to show Display items</h
<!-- see JS -->
</tbody>
</table>

<div class="row">
<div class="col-md-12 text-center hidden online-control">
<button class="btn btn-info btn-upload" title="Upload one or more files to the /menu directory (drag&amp;drop is supported as well)" data-type="menu" data-style="btn-info"><span class="glyphicon glyphicon-cloud-upload"></span> Upload File(s)</button>
</div>
</div>
</div>

<!-- Machine Properties -->
Expand Down Expand Up @@ -3853,6 +3861,30 @@ <h4 class="modal-title">Define Area for Mesh Grid Compensation</h4>
</div>
</div>

<div id="modal_cylinder" class="modal fade">
<div class="modal-dialog modal-md">
<div class="modal-content">
<form>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
<h4 class="modal-title">Probe Cylinder for Rotary Printing</h4>
</div>
<div class="modal-body">
<label for="input_cylinder_diameter">Please enter the diameter of the cylinder to probe:</label>
<div class="input-group">
<input id="input_cylinder_diameter" required="required" min="1" value="25" class="form-control">
<span class="input-group-addon">mm</span>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> Cancel</button>
<button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-ok"></span> OK</button>
</div>
</form>
</div>
</div>
</div>

<ul id="ul_file_contextmenu" class="dropdown-menu">
<li class="gcode-action single file"><a tabindex="-1" href="#" id="a_context_start"><span class="glyphicon glyphicon-play"></span> Start File</a></li>
<li class="gcode-action single file"><a tabindex="-1" href="#" id="a_context_simulate"><span class="glyphicon glyphicon-forward"></span> Simulate File</a></li>
Expand Down

0 comments on commit 5e5269a

Please sign in to comment.