kopia lustrzana https://github.com/OpenBuilds/OpenBuilds-CONTROL
v1.0.259
rodzic
ffb3d59b80
commit
95488e4345
|
@ -73,7 +73,8 @@ function flashFirmwarefromWizard() {
|
|||
var data = {
|
||||
port: $("#portUSB2").val(),
|
||||
file: "grbl-" + $("#grblAxesCount").val() + "-" + $("#grblDoorEnable").val() + ".hex",
|
||||
board: $("#flashController").val()
|
||||
board: $("#flashController").val(),
|
||||
customImg: false
|
||||
}
|
||||
|
||||
if ($("#grblAxesCount").val() == "custom") {
|
||||
|
@ -85,6 +86,7 @@ function flashFirmwarefromWizard() {
|
|||
xhr.onload = function() {
|
||||
if (xhr.status == 200) {
|
||||
$("#customFirmwareSet").html(xhr.response);
|
||||
data.customImg = true;
|
||||
data.file = $("#firmwareBin").val();
|
||||
socket.emit('flashGrbl', data);
|
||||
}
|
||||
|
|
9
index.js
9
index.js
|
@ -667,6 +667,13 @@ io.on("connection", function(socket) {
|
|||
var port = data.port;
|
||||
var file = data.file;
|
||||
var board = data.board
|
||||
var customImg = data.customImg
|
||||
if (customImg) {
|
||||
var firmwarePath = firmwareImagePath
|
||||
} else {
|
||||
var firmwarePath = path.join(__dirname, file)
|
||||
}
|
||||
|
||||
const Avrgirl = require('avrgirl-arduino');
|
||||
|
||||
if (status.comms.connectionStatus > 0) {
|
||||
|
@ -698,7 +705,7 @@ io.on("connection", function(socket) {
|
|||
debug_log(JSON.stringify(avrgirl));
|
||||
|
||||
status.comms.connectionStatus = 6;
|
||||
avrgirl.flash(path.join(__dirname, file), function(error) {
|
||||
avrgirl.flash(firmwarePath, function(error) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
io.sockets.emit("progStatus", 'Flashing FAILED!');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "OpenBuildsCONTROL",
|
||||
"version": "1.0.258",
|
||||
"version": "1.0.259",
|
||||
"license": "AGPL-3.0",
|
||||
"description": "OpenBuildsCONTROL CNC Machine Interface Software",
|
||||
"author": "github.com/openbuilds <webmaster@openbuilds.com>",
|
||||
|
|
Ładowanie…
Reference in New Issue