kopia lustrzana https://github.com/OpenBuilds/OpenBuilds-CONTROL
rodzic
95488e4345
commit
deb9df8d39
|
@ -1,4 +1,3 @@
|
|||
v1.0.258: Remove placeholders from surfacing wizard inputs fields.
|
||||
v1.0.257: Maintenance: Updated SSL Certs for OB CAM integration, Updated to latest build of Font Awesome, New Features: Added keyboard shortcuts for Feed/Speed Overrides #156, Save jog feedrate between sessions #158, Sync error/alarm close event between multiple windows #136, Updated calibration Wizard to support larger moves #154
|
||||
v1.0.256: Enhanced Continuous Jog to prevent runaway - should fix #73
|
||||
v1.0.255: Fixed a cosmetic typo in Probe wizard, test of Soft Limits calculation Changes
|
||||
|
|
128
app/index.html
128
app/index.html
|
@ -321,7 +321,7 @@
|
|||
<li class="divider fg-lightGray"></li>
|
||||
<li onclick="keyboardShortcutsEditor();"><a href="#"><i class="far fa-edit fa-fw"></i> Customize Shortcut Key Assignments</a></li>
|
||||
<li class="divider fg-lightGray"></li>
|
||||
<li onclick="populateGrblBuilderToolForm();"><a href="#"><i class="fas fa-microchip fa-fw"></i> Firmware Flashing Tool</a></li>
|
||||
<li onclick="populateGrblBuilderToolForm();"><a href="#"><img src="img/grbl.png" /> Flashing Tool</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -1120,91 +1120,61 @@
|
|||
<div id="hiddendivs" style="display:none;">
|
||||
|
||||
<div class="dialog dark" data-role="dialog" id="grblFlashDialog" data-width="60%" data-actions-align="right" data-overlay-click-close="true">
|
||||
<div class="dialog-title"><i class="fas fa-microchip fa-fw"></i> Firmware Flashing Tool</div>
|
||||
<div class="dialog-title"><img src="img/grbltop.png" /> Custom Grbl Flashing Tool</div>
|
||||
<div class="dialog-content" style="height: calc(100% - 100px);">
|
||||
<p class="text-small mb-4">You can use this wizard to flash Firmware onto compatible controllers<br>Only use with care, or when instructed by Support</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell-md-4 mb-1">
|
||||
Controller Type
|
||||
<p class="text-small mb-4">You can use this wizard to flash customized instances of Grbl Firmware onto a compatible controller<br>Only use with care, or when instructed by Support</p>
|
||||
<form>
|
||||
<div class="row">
|
||||
<div class="cell-md-4 mb-1">
|
||||
Machine Style
|
||||
</div>
|
||||
<div class="cell-md-8 mb-1">
|
||||
<select data-prepend=" <i class='fas fa-cube'></i>" data-role="select" data-filter="false" id="grblAxesCount" data-editable="true">
|
||||
<option value=3axes>3 Axes</option>
|
||||
<option value=2axes>2 Axes</option>
|
||||
<option value=servo>2 Axes + RC Servo</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell-md-8 mb-1">
|
||||
<select data-prepend=" <i class='fas fa-microchip'></i>" data-role="select" data-filter="false" id="flashController" data-editable="true">
|
||||
<option value="interface">OpenBuilds Interface</option>
|
||||
<option value="uno" selected>OpenBuilds BlackBox 4X</option>
|
||||
<option value="xprov4">Spark Concepts xPro v3/4</option>
|
||||
<option value="uno">Arduino Uno</option>
|
||||
<option value="nano">Arduino Nano</option>
|
||||
</select>
|
||||
<div class="row">
|
||||
<div class="cell-md-4 mb-1">
|
||||
Door Interlock
|
||||
</div>
|
||||
<div class="cell-md-8 mb-1">
|
||||
<select data-role="select" data-prepend=" <i class='fas fa-door-open'></i>" data-role="select" data-filter="false" id="grblDoorEnable" data-editable="true">
|
||||
<option value="nodoor">Disable Door Interlock</option>
|
||||
<option value="opendoor">Door Interlock (Normally Open Switch)</option>
|
||||
<option value="closeddoor">Door Interlock (Normally Closed Switch)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="flash-tool-interface-fw-row" style="display: none;">
|
||||
<div class="cell-md-4 mb-1">
|
||||
Firmware Version
|
||||
<div class="row">
|
||||
<div class="cell-md-4 mb-1">
|
||||
Controller Type
|
||||
</div>
|
||||
<div class="cell-md-8 mb-1">
|
||||
<select data-prepend=" <i class='fas fa-microchip'></i>" data-role="select" data-filter="false" id="flashGrblController" data-editable="true">
|
||||
<option value="uno">OpenBuilds BlackBox 4X</option>
|
||||
<option value="xprov4">Spark Concepts xPro v3/4</option>
|
||||
<option value="uno">Arduino Uno</option>
|
||||
<option value="nano">Arduino Nano</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell-md-8 mb-1">
|
||||
<select data-prepend=" <i class='fas fa-cube'></i>" data-role="select" data-filter="false" id="interfaceFirmwareVer" data-editable="true">
|
||||
<option value="online">Latest available version</option>
|
||||
<option value="custom">Custom: firmware binary file</option>
|
||||
</select>
|
||||
<div class="row">
|
||||
<div class="cell-md-4 mb-1">
|
||||
Port
|
||||
</div>
|
||||
<div class="cell-md-8 mb-1">
|
||||
<select data-prepend=" <i class='fab fa-usb'></i>" data-role="select" data-filter="false" id="portUSB2" disabled data-editable="true">
|
||||
<option value="">Waiting for USB</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="flash-tool-machine-row">
|
||||
<div class="cell-md-4 mb-1">
|
||||
Machine Style
|
||||
</div>
|
||||
<div class="cell-md-8 mb-1">
|
||||
<select data-prepend=" <i class='fas fa-cube'></i>" data-role="select" data-filter="false" id="grblAxesCount" data-editable="true">
|
||||
<option value="3axes">3 Axes</option>
|
||||
<option value="2axes">2 Axes</option>
|
||||
<option value="servo">2 Axes + RC Servo</option>
|
||||
<option value="custom">Custom: firmware hex file</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="flash-tool-door-row">
|
||||
<div class="cell-md-4 mb-1">
|
||||
Door Interlock
|
||||
</div>
|
||||
<div class="cell-md-8 mb-1">
|
||||
<select data-role="select" data-prepend=" <i class='fas fa-door-open'></i>" data-role="select" data-filter="false" id="grblDoorEnable" data-editable="true">
|
||||
<option value="nodoor">Disable Door Interlock</option>
|
||||
<option value="opendoor">Door Interlock (Normally Open Switch)</option>
|
||||
<option value="closeddoor">Door Interlock (Normally Closed Switch)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="cell-md-4 mb-1">
|
||||
Port
|
||||
</div>
|
||||
<div class="cell-md-8 mb-1">
|
||||
<select data-prepend=" <i class='fab fa-usb'></i>" data-role="select" data-filter="false" id="portUSB2" disabled data-editable="true">
|
||||
<option value="">Waiting for USB</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="flash-tool-custom-row" style="display: none;">
|
||||
<div class="cell-md-4 mb-1">
|
||||
Firmware Image
|
||||
</div>
|
||||
<div class="cell-md-8 mb-1">
|
||||
<form id="customFirmwareForm" enctype="multipart/form-data">
|
||||
<button class="button alert shadow btn-file" action="#"><input class="btn-file" id="firmwareBin" type="file" accept=".bin, .hex" name="firmwareBin" /><i class="far fa-folder-open fa-fw"></i> Use custom firmware image</button>
|
||||
<br>
|
||||
<small id="customFirmwareSet"></small>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="dialog-actions">
|
||||
<button class="button success js-dialog-close" onclick="flashFirmwarefromWizard()">Flash</button>
|
||||
<button class="button success js-dialog-close" onclick="flashGrblfromWizard()">Flash</button>
|
||||
<button class="button js-dialog-close">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -301,18 +301,6 @@ function initSocket() {
|
|||
string = string.replace('[31mflash complete.[39m', "<span class='fg-red'><i class='fas fa-times fa-fw fg-red fa-fw'> </i> FLASH FAILED!</span> ");
|
||||
string = string.replace('[32m', "<span class='fg-green'><i class='fas fa-check fa-fw fg-green fa-fw'></i> ");
|
||||
string = string.replace('[39m', "</span>");
|
||||
if (string.indexOf("Hash of data verified") != -1) {
|
||||
string = "<span class='fg-green'><i class='fas fa-check fa-fw fg-green fa-fw'></i>" + string + "</span>"
|
||||
}
|
||||
if (string.indexOf("could not open port") != -1) {
|
||||
string = "<span class='fg-red'><i class='fas fa-times fa-fw fg-red fa-fw'></i>" + string + "</span>"
|
||||
}
|
||||
if (string.indexOf("something went wrong") != -1) {
|
||||
string = "<span class='fg-red'><i class='fas fa-times fa-fw fg-red fa-fw'></i>" + string + "</span>"
|
||||
}
|
||||
if (string.indexOf("fatal error occurred") != -1) {
|
||||
string = "<span class='fg-red'><i class='fas fa-times fa-fw fg-red fa-fw'></i>" + string + "</span>"
|
||||
}
|
||||
printLog("<span class='fg-red'>[ Firmware Upgrade ] </span>" + string)
|
||||
|
||||
// $('#sendCommand').click();
|
||||
|
|
|
@ -1,154 +1,37 @@
|
|||
$(document).ready(function() {
|
||||
|
||||
$("#flashController").on("change", function() {
|
||||
if (this.value == "interface") {
|
||||
$("#flash-tool-machine-row").hide();
|
||||
$("#flash-tool-door-row").hide();
|
||||
$("#flash-tool-interface-fw-row").show();
|
||||
if ($("#interfaceFirmwareVer").val() == "custom") {
|
||||
$("#flash-tool-custom-row").show();
|
||||
} else {
|
||||
$("#flash-tool-custom-row").hide();
|
||||
}
|
||||
$("#customFirmwareSet").html("Please select the Interface Firmware binary file you want to flash");
|
||||
} else {
|
||||
$("#flash-tool-machine-row").show();
|
||||
$("#flash-tool-door-row").show();
|
||||
$("#flash-tool-interface-fw-row").hide();
|
||||
$("#flash-tool-custom-row").hide();
|
||||
$("#customFirmwareSet").html("Please select the Grbl Firmware hex file you want to flash");
|
||||
}
|
||||
});
|
||||
|
||||
$("#grblAxesCount").on("change", function() {
|
||||
if (this.value == "custom") {
|
||||
$("#flash-tool-door-row").hide();
|
||||
$("#flash-tool-custom-row").show();
|
||||
$("#customFirmwareSet").html("Please select the Grbl Firmware hex file you want to flash");
|
||||
} else {
|
||||
$("#flash-tool-door-row").show();
|
||||
$("#flash-tool-custom-row").hide();
|
||||
}
|
||||
});
|
||||
|
||||
$("#interfaceFirmwareVer").on("change", function() {
|
||||
if (this.value == "custom") {
|
||||
$("#flash-tool-custom-row").show();
|
||||
$("#customFirmwareSet").html("Please select the Interface Firmware binary file you want to flash");
|
||||
} else {
|
||||
$("#flash-tool-custom-row").hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// var fileOpen = document.getElementById('firmwareBin');
|
||||
// if (fileOpen) {
|
||||
// fileOpen.addEventListener('change', readEspFirmwareFile, false);
|
||||
// }
|
||||
|
||||
function readEspFirmwareFile() {
|
||||
console.log("Sending")
|
||||
var form = document.getElementById('customFirmwareForm');
|
||||
var formData = new FormData(form);
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onload = function() {
|
||||
if (xhr.status == 200) {
|
||||
$("#customFirmwareSet").html(xhr.response)
|
||||
}
|
||||
};
|
||||
// Add any event handlers here...
|
||||
xhr.open('POST', '/uploadCustomFirmware', true);
|
||||
xhr.send(formData);
|
||||
function flashGrblfromTroubleshooting() {
|
||||
var data = {
|
||||
port: $("#portUSB").val(),
|
||||
file: $("#flashGrblHex").val(),
|
||||
board: $("#flashGrblController").val()
|
||||
}
|
||||
|
||||
});
|
||||
socket.emit('flashGrbl', data)
|
||||
}
|
||||
|
||||
function populateGrblBuilderToolForm() {
|
||||
//$("#filetoflash").empty();
|
||||
Metro.dialog.open("#grblFlashDialog");
|
||||
}
|
||||
|
||||
function flashFirmwarefromWizard() {
|
||||
if ($("#flashController").val() != "interface") {
|
||||
var data = {
|
||||
port: $("#portUSB2").val(),
|
||||
file: "grbl-" + $("#grblAxesCount").val() + "-" + $("#grblDoorEnable").val() + ".hex",
|
||||
board: $("#flashController").val(),
|
||||
customImg: false
|
||||
}
|
||||
function flashGrblfromWizard() {
|
||||
var formdata = {
|
||||
axesCount: $("#grblAxesCount").val(),
|
||||
door: $("#grblDoorEnable").val(),
|
||||
flashGrblController: $("#flashGrblController").val(),
|
||||
port: $("#portUSB2").val()
|
||||
};
|
||||
|
||||
if ($("#grblAxesCount").val() == "custom") {
|
||||
// Custom Firmware
|
||||
if ($("#firmwareBin").val().length > 0) {
|
||||
var form = document.getElementById('customFirmwareForm');
|
||||
var formData = new FormData(form);
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onload = function() {
|
||||
if (xhr.status == 200) {
|
||||
$("#customFirmwareSet").html(xhr.response);
|
||||
data.customImg = true;
|
||||
data.file = $("#firmwareBin").val();
|
||||
socket.emit('flashGrbl', data);
|
||||
}
|
||||
};
|
||||
// Add any event handlers here...
|
||||
xhr.open('POST', '/uploadCustomFirmware', true);
|
||||
xhr.send(formData);
|
||||
} else {
|
||||
$('#controlTab').click();
|
||||
$('#consoletab').click();
|
||||
printLog("<span class='fg-red'>[ Firmware Upgrade ] </span><span class='fg-red'><i class='fas fa-times fa-fw fg-red fa-fw'></i>You selected the option to use a custom firmware file, but failed to select a file to use for the operation. Please try again</span>")
|
||||
}
|
||||
$("#filetoflash").html('run file: ' + JSON.stringify(formdata));
|
||||
$("#filetoflash").append("<hr>grbl-" + formdata.axesCount + "-" + formdata.door + ".hex");
|
||||
|
||||
|
||||
} else {
|
||||
// Precompiled Firmwares
|
||||
socket.emit('flashGrbl', data)
|
||||
|
||||
}
|
||||
|
||||
} else if ($("#flashController").val() == "interface") {
|
||||
var data = {
|
||||
port: $("#portUSB2").val(),
|
||||
file: "firmware.bin", // version that ships with Interface
|
||||
board: $("#flashController").val()
|
||||
}
|
||||
|
||||
if ($("#interfaceFirmwareVer").val() == "custom") {
|
||||
// custom image
|
||||
if ($("#firmwareBin").val().length > 0) {
|
||||
var form = document.getElementById('customFirmwareForm');
|
||||
var formData = new FormData(form);
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onload = function() {
|
||||
if (xhr.status == 200) {
|
||||
$("#customFirmwareSet").html(xhr.response);
|
||||
data.file = $("#firmwareBin").val();
|
||||
socket.emit('flashInterface', data);
|
||||
}
|
||||
};
|
||||
// Add any event handlers here...
|
||||
xhr.open('POST', '/uploadCustomFirmware', true);
|
||||
xhr.send(formData);
|
||||
} else {
|
||||
$('#controlTab').click();
|
||||
$('#consoletab').click();
|
||||
printLog("<span class='fg-red'>[ Firmware Upgrade ] </span><span class='fg-red'><i class='fas fa-times fa-fw fg-red fa-fw'></i>You selected the option to use a custom firmware file, but failed to select a file to use for the operation. Please try again</span>")
|
||||
}
|
||||
|
||||
} else {
|
||||
// latest included firmware
|
||||
socket.emit('flashInterface', data)
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
console.log("no controller selected")
|
||||
var data = {
|
||||
port: $("#portUSB").val(),
|
||||
file: "grbl-" + formdata.axesCount + "-" + formdata.door + ".hex",
|
||||
board: $("#flashGrblController").val()
|
||||
}
|
||||
socket.emit('flashGrbl', data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// grbl-3axes-nodoor.hex
|
||||
// grbl-3axes-opendoor.hex
|
||||
// grbl-3axes-closeddoor.hex
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "OpenBuildsCONTROL",
|
||||
"version": "1.0.259",
|
||||
"version": "1.0.258",
|
||||
"license": "AGPL-3.0",
|
||||
"description": "OpenBuildsCONTROL CNC Machine Interface Software",
|
||||
"author": "github.com/openbuilds <webmaster@openbuilds.com>",
|
||||
|
@ -19,15 +19,14 @@
|
|||
"formidable": "^1.2.2",
|
||||
"https": "^1.0.0",
|
||||
"ip": "^1.1.5",
|
||||
"jscs-loader": "^0.3.0",
|
||||
"lodash": "^4.17.19",
|
||||
"md5": "^2.3.0",
|
||||
"mkdirp": "^1.0.4",
|
||||
"multer": "^1.4.2",
|
||||
"node-abi": "^2.18.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"serialport": "^9.0.1",
|
||||
"socket.io": "^2.3.0"
|
||||
"socket.io": "^2.3.0",
|
||||
"jscs-loader": "^0.3.0"
|
||||
},
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
Ładowanie…
Reference in New Issue