kopia lustrzana https://github.com/OpenBuilds/OpenBuilds-CONTROL
v1.0.152
rodzic
6a65086edc
commit
30a4a4bf63
|
@ -1,3 +1,5 @@
|
|||
v1.0.152: Updated backend to node-serialPort 7.1.3, Updated Backend to Electron 4.0.5.
|
||||
v1.0.151: Macros: Added customizable tooltip, Macros: Edit button hover color, Fix UI for USB Unplug while connected.
|
||||
v1.0.150: Improvements to the Feedrate Override and Tool/Spindle/Laser Override Sliders
|
||||
v1.0.149: Fixed Bugs in Multiline Macros
|
||||
v1.0.148: Multi-line Macros, Grbl Flashing tool: BlackBox added, Switch to Serial Console on-connect to help ease troubleshooting.
|
||||
|
|
|
@ -178,3 +178,7 @@ select{
|
|||
.macroedit:hover {
|
||||
color: #CE352C !important;
|
||||
}
|
||||
|
||||
.machineicon:hover {
|
||||
color: #CE352C !important;
|
||||
}
|
||||
|
|
|
@ -881,7 +881,7 @@
|
|||
</div>
|
||||
<div class="cell-3">
|
||||
<div>
|
||||
<span class="badge inline bg-grayBlue fg-white" id="gcodesent" style="width: 100%;">Queue: 0</span>
|
||||
<span class="badge inline bg-grayBlue fg-white" id="gcodesent" style="width: 100%;">Job Queue: 0</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -356,7 +356,7 @@
|
|||
</div>
|
||||
<div class="cell-3 p-1">
|
||||
<div>
|
||||
<span class="badge inline bg-grayBlue fg-white" id="gcodesent" style="width: 100%;">Queue: 0</span>
|
||||
<span class="badge inline bg-grayBlue fg-white" id="gcodesent" style="width: 100%;">Job Queue: 0</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -380,7 +380,7 @@
|
|||
</div>
|
||||
<div class="cell-3 p-1">
|
||||
<div>
|
||||
<span class="badge inline bg-grayBlue fg-white" id="gcodesent" style="width: 100%;">Queue: 0</span>
|
||||
<span class="badge inline bg-grayBlue fg-white" id="gcodesent" style="width: 100%;">Job Queue: 0</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -741,7 +741,7 @@ function setMachineButton(type) {
|
|||
template = `<img src="img/mch/sphinx55.png"/> Select Machine`
|
||||
}
|
||||
$('#context_toggle2').html(template);
|
||||
$('#overlayimg').html(`<img src="img/mch/` + type + `.png" style="max-width:100%; max-height:100%;"/><span onclick="$('#grblTab').click()" style="position: absolute; top: 3px; right:3px; z-index: 1;" class="fas fa-cogs" style="text-shadow: 2px 2px 4px #cccccc;"></span>`)
|
||||
$('#overlayimg').html(`<img src="img/mch/` + type + `.png" style="max-width:100%; max-height:100%;"/><span onclick="$('#grblTab').click()" style="position: absolute; top: 3px; right:3px; z-index: 1;" class="fas fa-cogs machineicon" style="text-shadow: 2px 2px 4px #cccccc;"></span>`)
|
||||
};
|
||||
|
||||
function flashGrblfromTroubleshooting() {
|
||||
|
|
|
@ -173,7 +173,7 @@ function initSocket() {
|
|||
editor.gotoLine(parseInt(data[1]) - parseInt(data[0]));
|
||||
}
|
||||
}
|
||||
$('#gcodesent').html("Queue: " + parseInt(data[0]));
|
||||
$('#gcodesent').html("Job Queue: " + parseInt(data[0]));
|
||||
|
||||
// calc percentage
|
||||
var left = parseInt(data[0])
|
||||
|
|
92
index.js
92
index.js
|
@ -1,3 +1,4 @@
|
|||
//v1.0.152
|
||||
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = '1';
|
||||
|
||||
console.log("Starting OpenBuilds CONTROL v" + require('./package').version)
|
||||
|
@ -43,6 +44,7 @@ io.attach(httpsserver);
|
|||
const grblStrings = require("./grblStrings.js");
|
||||
const serialport = require('serialport');
|
||||
var SerialPort = serialport;
|
||||
const Readline = SerialPort.parsers.Readline;
|
||||
var md5 = require('md5');
|
||||
var ip = require("ip");
|
||||
var _ = require('lodash');
|
||||
|
@ -684,10 +686,13 @@ io.on("connection", function(socket) {
|
|||
console.log("Connecting via " + data[0] + " to " + data[1] + " at baud " + data[2]);
|
||||
|
||||
port = new SerialPort(data[1], {
|
||||
parser: serialport.parsers.readline('\n'),
|
||||
baudRate: parseInt(data[2])
|
||||
});
|
||||
|
||||
parser = port.pipe(new Readline({
|
||||
delimiter: '\r\n'
|
||||
}));
|
||||
|
||||
port.on("error", function(err) {
|
||||
if (err.message != "Port is not open") {
|
||||
console.log("Error: ", err.message);
|
||||
|
@ -708,7 +713,7 @@ io.on("connection", function(socket) {
|
|||
|
||||
});
|
||||
port.on("open", function() {
|
||||
console.log("PORT INFO: Connected to " + port.path + " at " + port.options.baudRate);
|
||||
console.log("PORT INFO: Connected to " + port.path + " at " + port.baudRate);
|
||||
var output = {
|
||||
'command': 'connect',
|
||||
'response': "PORT INFO: Port is now open: " + port.path + " - Attempting to detect Firmware"
|
||||
|
@ -780,7 +785,7 @@ io.on("connection", function(socket) {
|
|||
|
||||
status.comms.connectionStatus = 2;
|
||||
status.comms.interfaces.activePort = port.path;
|
||||
status.comms.interfaces.activeBaud = port.options.baudRate;
|
||||
status.comms.interfaces.activeBaud = port.baudRate;
|
||||
}); // end port .onopen
|
||||
|
||||
port.on("close", function() { // open errors will be emitted as an error event
|
||||
|
@ -793,7 +798,7 @@ io.on("connection", function(socket) {
|
|||
status.comms.connectionStatus = 0;
|
||||
}); // end port.onclose
|
||||
|
||||
port.on("data", function(data) {
|
||||
parser.on("data", function(data) {
|
||||
var command = sentBuffer[0];
|
||||
|
||||
// console.log('data:', data)
|
||||
|
@ -2065,35 +2070,66 @@ function isElectron() {
|
|||
}
|
||||
|
||||
if (isElectron()) {
|
||||
const shouldQuit = electronApp.makeSingleInstance((commandLine, workingDirectory) => {
|
||||
// Someone tried to run a second instance, we should focus our window.
|
||||
if (jogWindow === null) {
|
||||
createJogWindow();
|
||||
jogWindow.show()
|
||||
jogWindow.setAlwaysOnTop(true);
|
||||
jogWindow.focus();
|
||||
jogWindow.setAlwaysOnTop(false);
|
||||
} else {
|
||||
jogWindow.show()
|
||||
jogWindow.setAlwaysOnTop(true);
|
||||
jogWindow.focus();
|
||||
jogWindow.setAlwaysOnTop(false);
|
||||
}
|
||||
// console.log('SingleInstance')
|
||||
// console.log(commandLine)
|
||||
var openFilePath = commandLine[1];
|
||||
if (openFilePath !== "") {
|
||||
// console.log(openFilePath);
|
||||
readFile(openFilePath);
|
||||
}
|
||||
});
|
||||
|
||||
if (shouldQuit) {
|
||||
const gotTheLock = electronApp.requestSingleInstanceLock()
|
||||
if (!gotTheLock) {
|
||||
console.log("Already running! Check the System Tray")
|
||||
electronApp.exit(0);
|
||||
electronApp.quit();
|
||||
} else {
|
||||
electronApp.on('second-instance', (event, commandLine, workingDirectory) => {
|
||||
//Someone tried to run a second instance, we should focus our window.
|
||||
if (jogWindow === null) {
|
||||
createJogWindow();
|
||||
jogWindow.show()
|
||||
jogWindow.setAlwaysOnTop(true);
|
||||
jogWindow.focus();
|
||||
jogWindow.setAlwaysOnTop(false);
|
||||
} else {
|
||||
jogWindow.show()
|
||||
jogWindow.setAlwaysOnTop(true);
|
||||
jogWindow.focus();
|
||||
jogWindow.setAlwaysOnTop(false);
|
||||
}
|
||||
// console.log('SingleInstance')
|
||||
// console.log(commandLine)
|
||||
var openFilePath = commandLine[1];
|
||||
if (openFilePath !== "") {
|
||||
// console.log(openFilePath);
|
||||
readFile(openFilePath);
|
||||
}
|
||||
})
|
||||
// Create myWindow, load the rest of the app, etc...
|
||||
app.on('ready', () => {})
|
||||
}
|
||||
|
||||
// Someone tried to run a second instance, we should focus our window.
|
||||
// if (jogWindow === null) {
|
||||
// createJogWindow();
|
||||
// jogWindow.show()
|
||||
// jogWindow.setAlwaysOnTop(true);
|
||||
// jogWindow.focus();
|
||||
// jogWindow.setAlwaysOnTop(false);
|
||||
// } else {
|
||||
// jogWindow.show()
|
||||
// jogWindow.setAlwaysOnTop(true);
|
||||
// jogWindow.focus();
|
||||
// jogWindow.setAlwaysOnTop(false);
|
||||
// }
|
||||
// // console.log('SingleInstance')
|
||||
// // console.log(commandLine)
|
||||
// var openFilePath = commandLine[1];
|
||||
// if (openFilePath !== "") {
|
||||
// // console.log(openFilePath);
|
||||
// readFile(openFilePath);
|
||||
// }
|
||||
|
||||
|
||||
// if (shouldQuit) {
|
||||
// console.log("Already running! Check the System Tray")
|
||||
// electronApp.exit(0);
|
||||
// electronApp.quit();
|
||||
// }
|
||||
|
||||
if (electronApp) {
|
||||
// Module to create native browser window.
|
||||
|
||||
|
|
Plik diff jest za duży
Load Diff
23
package.json
23
package.json
|
@ -1,28 +1,29 @@
|
|||
{
|
||||
"name": "OpenBuildsCONTROL",
|
||||
"version": "1.0.151",
|
||||
"version": "1.0.152",
|
||||
"license": "AGPL-3.0",
|
||||
"description": "Machine Interface Driver for OpenBuilds",
|
||||
"author": "github.com/openbuilds <webmaster@openbuilds.com>",
|
||||
"devDependencies": {
|
||||
"copyfiles": "^1.2.0",
|
||||
"electron": "^2.0.8",
|
||||
"electron-builder": "^20.22.0",
|
||||
"copyfiles": "^2.1.0",
|
||||
"electron": "^4.0.5",
|
||||
"electron-builder": "^20.38.5",
|
||||
"electron-rebuild": "^1.8.4",
|
||||
"ncp": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"avrgirl-arduino": "noopkat/avrgirl-arduino",
|
||||
"directory-tree": "^2.1.0",
|
||||
"electron-updater": "^2.23.3",
|
||||
"express": "^4.16.2",
|
||||
"avrgirl-arduino": "^3.0.0",
|
||||
"directory-tree": "^2.2.1",
|
||||
"electron-updater": "^4.0.6",
|
||||
"express": "^4.16.4",
|
||||
"formidable": "^1.2.1",
|
||||
"ip": "^1.1.5",
|
||||
"lodash": "^4.17.11",
|
||||
"md5": "^2.2.1",
|
||||
"mkdirp": "^0.5.1",
|
||||
"rimraf": "^2.6.2",
|
||||
"serialport": "^4.0.7",
|
||||
"socket.io": "^2.0.4"
|
||||
"rimraf": "^2.6.3",
|
||||
"serialport": "^7.1.4",
|
||||
"socket.io": "^2.2.0"
|
||||
},
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
|
Ładowanie…
Reference in New Issue