pull/294/head v1.0.338
openbuilds-engineer 2022-11-22 18:29:24 +02:00
rodzic 2f2d73f60a
commit d2b1452861
9 zmienionych plików z 143 dodań i 20 usunięć

Wyświetl plik

@ -1,3 +1,5 @@
v1.0.338: Beta testing alternative GPU blacklist switch config for older computers, Fixed a couple Grbl Settings bugs
v1.0.337: Improved WebGL Detection
v1.0.334/5/6: Dark Mode theme (based off /pull/#223), Added Fullscreen Mode button, Updated Dependencies (/pull/260), Fixed bug in ATmega Custom flash option (#268), Updated Wizard's Graphics
v1.0.333: BlackBox Support, 4th Axis support: A-Axis Jog and DRO, Updated firmware Flashing tool, Updated USB tool for Interface
v1.0.332: Updated SSL certificates

Wyświetl plik

@ -1865,6 +1865,7 @@
<script type="text/javascript" src="lib/threejs/TransformControls.js"></script>
<script type="text/javascript" src="lib/threejs/TweenMax.min.js"></script>
<script type="text/javascript" src="lib/threejs/STLLoader.js"></script>
<script type="text/javascript" src="js/viewer.js"></script>
<script type="text/javascript" src="js/viewer-ruler.js"></script>

Wyświetl plik

@ -150,12 +150,9 @@ var grblSettingsTemplate2 = {
},
22: {
key: `$22`,
title: `Homing cycle enable, boolean`,
title: `Homing cycle enable, boolean (Grbl) / mask (GrblHAL)`,
description: `The homing cycle is used to accurately and precisely locate a known and consistent position on a machine every time you start up your Grbl between sessions. In other words, you know exactly where you are at any given time, every time. Say you start machining something or are about to start the next step in a job and the power goes out, you re-start Grbl and Grbl has no idea where it is due to steppers being open-loop control. You're left with the task of figuring out where you are. If you have homing, you always have the machine zero reference point to locate from, so all you have to do is run the homing cycle and resume where you left off. To set up the homing cycle for Grbl, you need to have limit switches in a fixed position that won't get bumped or moved, or else your reference point gets messed up. Usually they are setup in the farthest point in +x, +y, +z of each axes. Wire your limit switches in with the limit pins, add a recommended RC-filter to help reduce electrical noise, and enable homing. If you're curious, you can use your limit switches for both hard limits AND homing. They play nice with each other. Prior to trying the homing cycle for the first time, make sure you have setup everything correctly, otherwise homing may behave strangely. First, ensure your machine axes are moving in the correct directions per Cartesian coordinates (right-hand rule). If not, fix it with the $3 direction invert setting. Second, ensure your limit switch pins are not showing as 'triggered' in Grbl's status reports. If are, check your wiring and settings. Finally, ensure your $13x max travel settings are somewhat accurate (within 20%), because Grbl uses these values to determine how far it should search for the homing switches. By default, Grbl's homing cycle moves the Z-axis positive first to clear the workspace and then moves both the X and Y-axes at the same time in the positive direction. To set up how your homing cycle behaves, there are more Grbl settings down the page describing what they do (and compile-time options as well.). Also, one more thing to note, when homing is enabled. Grbl will lock out all G-code commands until you perform a homing cycle. Meaning no axes motions, unless the lock is disabled ($X) but more on that later. Most, if not all CNC controllers, do something similar, as it is mostly a safety feature to prevent users from making a positioning mistake, which is very easy to do and be saddened when a mistake ruins a part. If you find this annoying or find any weird bugs, please let us know and we'll try to work on it so everyone is happy. :) NOTE: Check out config.h for more homing options for advanced users. You can disable the homing lockout at startup, configure which axes move first during a homing cycle and in what order, and more.`,
template: `<select id="val-22-input">
<option value="0">&#x2717; Disable</option>
<option value="1">&#x2713; Enable</option>
</select>`,
template: `<input id="val-22-input" data-role="input" data-clear-button="false" data-append="mask" type="text">`,
utils: ``
},
23: {
@ -573,7 +570,7 @@ var grblSettingsTemplate2 = {
utils: ``
},
63: {
key: `$`,
key: `$63`,
title: `Feed Hold Actions`,
description: `Disable Laser During Hold, Restore Spindle/Coolant on Resume (Mask)`,
template: `<input id="val-63-input" data-role="input" data-clear-button="false" data-append="mask" type="text" >`,
@ -711,5 +708,19 @@ var grblSettingsTemplate2 = {
description: ``,
template: `<input id="val-75-input" data-role="input" data-clear-button="false" data-append="psk" type="text" >`,
utils: ``
},
65: {
key: `$65`,
title: `Require homing sequence to be executed at startup`,
description: `Require homing sequence to be executed at startup(?). Replaces #define HOMING_INIT_LOCK.`,
template: `<input id="val-65-input" data-role="input" data-clear-button="false" data-append="" type="number" >`,
utils: ``
},
8: {
key: `$8`,
title: `Ganged axes direction invert as bitfield`,
description: `Ganged axes direction invert as bitfield`,
template: `<input id="val-8-input" data-role="input" data-clear-button="false" data-append="bitfield" type="number" >`,
utils: ``
}
}

Wyświetl plik

@ -342,8 +342,11 @@ function checkifchanged() {
if (newVal !== undefined) {
// Only send values that changed
if (parseFloat(newVal) != parseFloat(grblParams[key]) && newVal != grblParams[key]) {
if (newVal != grblParams[key]) {
hasChanged = true;
console.log("changed: " + key)
console.log("old: " + grblParams[key])
console.log("new: " + newVal)
if (!$("#val-" + j + "-input").parent().is('td')) {
$("#val-" + j + "-input").parent().addClass('alert')
} else if ($("#val-" + j + "-input").is('select')) {

Wyświetl plik

@ -371,6 +371,84 @@ function versionCompare(v1, v2, options) {
return 0;
}
function isWebGLAvailable() {
try {
const canvas = document.createElement('canvas');
return !!(window.WebGLRenderingContext && (canvas.getContext('webgl') || canvas.getContext('experimental-webgl')));
} catch (e) {
return false;
}
}
function isWebGL2Available() {
try {
const canvas = document.createElement('canvas');
return !!(window.WebGL2RenderingContext && canvas.getContext('webgl2'));
} catch (e) {
return false;
}
}
function getWebGLErrorMessage() {
return getErrorMessage(1);
}
function getWebGL2ErrorMessage() {
return getErrorMessage(2);
}
function getErrorMessage(version) {
const names = {
1: 'WebGL',
2: 'WebGL 2'
};
const contexts = {
1: window.WebGLRenderingContext,
2: window.WebGL2RenderingContext
};
let message = 'Your $0 does not seem to support $1: See http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation to learn more';
if (contexts[version]) {
message = message.replace('$0', 'graphics card');
} else {
message = message.replace('$0', 'browser');
}
message = message.replace('$1', names[version]);
return message;
}
var webgl = (function() {
if (disable3Dviewer) {
return false;
@ -380,7 +458,9 @@ var webgl = (function() {
} else {
// console.log("Testing WebGL")
try {
return !!window.WebGLRenderingContext && !!document.createElement('canvas').getContext('experimental-webgl');
if (isWebGLAvailable() || isWebGL2Available()) {
return true
};
} catch (e) {
return false;
}

Wyświetl plik

@ -370,6 +370,7 @@ function init3D() {
} else {
console.log('No WebGL Support found on this computer! Disabled 3D Viewer - Sorry!');
printLog("<span class='fg-darkRed'>[ ERROR ]</span> <span class='fg-darkRed'>No WebGL Support found on this computer! Disabled 3D Viewer - Sorry!</span>")
printLog("<span class='fg-darkRed'>[ ERROR ]</span> <span class='fg-darkRed'>" + getWebGLErrorMessage() + "</span>")
$('#gcodeviewertab').hide()
$('#consoletab').click()
return false;

Wyświetl plik

@ -49,7 +49,15 @@ var grblAlarmCodes = {
6: "Homing fail. Reset during active homing cycle.",
7: "Homing fail. Safety door was opened during active homing cycle.",
8: "Homing fail. Cycle failed to clear limit switch when pulling off. Try increasing pull-off setting or check wiring.",
9: "Homing fail. Could not find limit switch within search distance. Defined as 1.5 * max_travel on search and 5 * pulloff on locate phases."
9: "Homing fail. Could not find limit switch within search distance. Defined as 1.5 * max_travel on search and 5 * pulloff on locate phases.",
10: "EStop asserted. Clear and reset",
11: "Homing required. Execute homing command ($H) to continue.",
12: "Limit switch engaged. Clear before continuing.",
13: "Probe protection triggered. Clear before continuing.",
14: "Spindle at speed timeout. Clear before continuing.",
15: "Homing fail. Could not find second limit switch for auto squared axis within search distances. Try increasing max travel, decreasing pull-off distance, or check wiring.",
16: "Power on selftest (POS) failed.",
17: "Motor fault."
};
var grblSettingCodes = {
@ -133,7 +141,9 @@ var grblSettingCodes = {
307: "Websocket Port",
73: "Wifi Mode", // Off/Station
74: "SSID",
75: "PSK"
75: "PSK",
65: "Require homing sequence to be executed at startup"
};
exports.errors = function(id) {

Wyświetl plik

@ -120,19 +120,17 @@ var lastsentuploadprogress = 0;
// Electron app
const electron = require('electron');
const electronApp = electron.app;
const {
dialog
} = require('electron')
electronApp.commandLine.appendSwitch('ignore-gpu-blacklist')
electronApp.commandLine.appendSwitch('enable-gpu-rasterization')
electronApp.commandLine.appendSwitch('enable-zero-copy')
if (isElectron()) {
debug_log("Local User Data: " + electronApp.getPath('userData'))
electronApp.commandLine.appendSwitch('ignore-gpu-blacklist', 'true')
electronApp.commandLine.appendSwitch('enable-gpu-rasterization', 'true')
electronApp.commandLine.appendSwitch('enable-zero-copy', 'true')
electronApp.commandLine.appendSwitch('disable-software-rasterizer', 'true')
electronApp.commandLine.appendSwitch('enable-native-gpu-memory-buffers', 'true')
// Removing max-old-space-size switch (Introduced in 1.0.168 and removed in 1.0.169) due it causing High CPU load on some PCs.
//electronApp.commandLine.appendSwitch('js-flags', '--max-old-space-size=8192')
debug_log('Command Line Arguments for Electron: Set OK')
}
const BrowserWindow = electron.BrowserWindow;
const Tray = electron.Tray;
const nativeImage = require('electron').nativeImage
@ -660,6 +658,23 @@ io.on("connection", function(socket) {
scanForTelnetDevices(data)
})
socket.on("openFile", function(data) {
dialog.showOpenDialog(jogWindow, {
properties: ['openFile']
}).then(result => {
console.log(result.canceled)
console.log(result.filePaths)
var openFilePath = result.filePaths[0];
if (openFilePath !== "") {
debug_log("path" + openFilePath);
readFile(openFilePath);
}
}).catch(err => {
console.log(err)
})
})
socket.on("openbuilds", function(data) {
const {
shell

Wyświetl plik

@ -1,6 +1,6 @@
{
"name": "OpenBuildsCONTROL",
"version": "1.0.336",
"version": "1.0.338",
"license": "AGPL-3.0",
"description": "OpenBuildsCONTROL CNC Machine Host Software",
"author": "github.com/openbuilds <support@openbuilds.com>",