kopia lustrzana https://github.com/OpenBuilds/OpenBuilds-CONTROL
rodzic
b51715a536
commit
8cc9796248
|
@ -1,3 +1,4 @@
|
|||
v1.0.246: Made AutoProbe the default for button on Main Toolbar, cleaned up codebase, minor changes to autoprobe sequence
|
||||
v1.0.245: Updates for Pi4 Buster support
|
||||
v1.0.244: Fix for Custom XYZ Probe Values bug #144, Remove Install Drivers button (users misunderstood)
|
||||
v1.0.243: Fix cosmetic bug: Scrollbar on Probe Dialog
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
<div class="buttons" style="-webkit-app-region: no-drag">
|
||||
<span class="btn-min" onclick="socket.emit('minimize')"></span>
|
||||
<span data-cls-hint="bg-light fg-dark drop-shadow" class="btn-close" onclick="socket.emit('minimisetotray')"></span>
|
||||
<!-- <span data-cls-hint="bg-light fg-dark drop-shadow" class="btn-close" onclick="confirmQuit()"></span> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="window-content" style="height: 100%; overflow: hidden !important;">
|
||||
|
@ -1640,7 +1639,7 @@
|
|||
<script type="text/javascript" src="js/metroactions.js"></script>
|
||||
<script type="text/javascript" src="js/jog.js"></script>
|
||||
<script type="text/javascript" src="js/servo.js"></script>
|
||||
<script type="text/javascript" src="js/calibrate.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/widget.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/keyboard.js"></script>
|
||||
|
@ -1649,19 +1648,19 @@
|
|||
|
||||
<script type="text/javascript" src="js/grbl-defaults.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/calibrate-x.js"></script>
|
||||
<script type="text/javascript" src="js/calibrate-y.js"></script>
|
||||
<script type="text/javascript" src="js/calibrate-z.js"></script>
|
||||
<script type="text/javascript" src="js/calibrate-servo.js"></script>
|
||||
<!-- Wizards -->
|
||||
<script type="text/javascript" src="wizards/calibration/calibrate.js"></script>
|
||||
<script type="text/javascript" src="wizards/calibration/calibrate-x.js"></script>
|
||||
<script type="text/javascript" src="wizards/calibration/calibrate-y.js"></script>
|
||||
<script type="text/javascript" src="wizards/calibration/calibrate-z.js"></script>
|
||||
<script type="text/javascript" src="wizards/calibration/calibrate-servo.js"></script>
|
||||
|
||||
<script type="text/javascript" src="wizards/probe/probev2.js"></script>
|
||||
<script type="text/javascript" src="wizards/probe/holefinder.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/probev2.js"></script>
|
||||
<script type="text/javascript" src="js/holefinder.js"></script>
|
||||
<script type="text/javascript" src="wizards/surfacing/surfacing.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="wizards/surfacing.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/grbl-flashing.js"></script>
|
||||
<script type="text/javascript" src="wizards/flashingtool/grbl-flashing.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/toolchange.js"></script>
|
||||
|
||||
|
|
|
@ -1,171 +0,0 @@
|
|||
function findCenter() {
|
||||
var xoffset = (probemode.probe.xoffset) * -1 // *-1 to make negative as we are off to the left too far from x0
|
||||
var yoffset = (probemode.probe.yoffset) * -1 // *-1 to make negative as we are off to the front too far from y0
|
||||
var zoffset = parseFloat(probemode.probe.zoffset) // not *-1 as its offset in z pos
|
||||
var step = 0;
|
||||
var rightside = 0,
|
||||
leftside = 0,
|
||||
farside = 0,
|
||||
nearside = 0,
|
||||
centerXdistance = 0,
|
||||
centerYdistance = 0;
|
||||
|
||||
socket.off('prbResult'); // Disable old listeners
|
||||
|
||||
var holefindermacroStep1 = `
|
||||
; Header
|
||||
|
||||
G21 ; mm mode
|
||||
G10 P1 L20 X0 Y0 Z0 ; zero out current location
|
||||
|
||||
; First we establish Zero
|
||||
; Probe Z
|
||||
G0 X22.5 Y22.5 ; position to center of logo
|
||||
G38.2 Z-25 F100 ; Probe Z
|
||||
G4 P0.4
|
||||
G10 P1 L20 Z` + zoffset + ` ; Set Z6 where 6 is thickness of plate
|
||||
G0 Z` + (zoffset + 5) + ` ; retract
|
||||
|
||||
; Probe X
|
||||
G0 X-20 Y10 ; position to left side and move forward a little to be closer to center of edge
|
||||
G0 Z` + (zoffset - 6) + ` ; drop down to be next to plate
|
||||
G38.2 X25 F100 ; Probe X
|
||||
G4 P0.4
|
||||
G10 P1 L20 X` + xoffset + ` ; set X as offset and half endmill diameter
|
||||
G0 X` + (xoffset - 2).toFixed(3) + `
|
||||
G0 Z` + (zoffset + 5) + ` ; retract
|
||||
|
||||
; Probe Y
|
||||
G0 X15 Y-20 ; position to front side and move right a little to be closer to center of edge
|
||||
G0 Z` + (zoffset - 6) + ` ; drop down to be next to plate
|
||||
G38.2 Y25 F100 ; probe Y
|
||||
G4 P0.4
|
||||
G10 P1 L20 Y` + yoffset + ` ; set Y as offset and half endmill diameter
|
||||
G0 Y` + (yoffset - 2).toFixed(3) + `
|
||||
G0 Z` + (zoffset + 5) + ` ; retract
|
||||
G0 X0 Y0 ; return
|
||||
|
||||
G0 X4 Y4
|
||||
G0 Z1
|
||||
G38.2 X10 F50 ; Probe X`
|
||||
|
||||
socket.emit('runJob', {
|
||||
data: holefindermacroStep1,
|
||||
isJob: false,
|
||||
completedMsg: false,
|
||||
fileName: ""
|
||||
});
|
||||
|
||||
socket.on('prbResult', function(prbdata) {
|
||||
step++;
|
||||
console.log("Step " + step, prbdata);
|
||||
|
||||
// Steps 1-3 just positions endmill for probes that count
|
||||
|
||||
if (step == 4) {
|
||||
rightside = prbdata.x
|
||||
console.log(rightside);
|
||||
|
||||
var holefindermacroStep5 = `
|
||||
G91
|
||||
G0 X-1
|
||||
G90
|
||||
G38.2 X-10 F50 ; Probe X`
|
||||
|
||||
socket.emit('runJob', {
|
||||
data: holefindermacroStep5,
|
||||
isJob: false,
|
||||
completedMsg: false,
|
||||
fileName: ""
|
||||
});
|
||||
}
|
||||
|
||||
if (step == 5) {
|
||||
leftside = prbdata.x
|
||||
var centerdistance = (rightside - leftside);
|
||||
var holefindermacroStep6 = `
|
||||
G91
|
||||
G0 X` + centerdistance / 2 + `
|
||||
G90
|
||||
G38.2 Y10 F50 ; Probe Y`
|
||||
|
||||
socket.emit('runJob', {
|
||||
data: holefindermacroStep6,
|
||||
isJob: false,
|
||||
completedMsg: false,
|
||||
fileName: ""
|
||||
});
|
||||
}
|
||||
|
||||
if (step == 6) {
|
||||
farside = prbdata.y
|
||||
|
||||
var holefindermacroStep7 = `
|
||||
G91
|
||||
G0 Y-1
|
||||
G90
|
||||
G38.2 Y-10 F50 ; Probe Y`
|
||||
|
||||
socket.emit('runJob', {
|
||||
data: holefindermacroStep7,
|
||||
isJob: false,
|
||||
completedMsg: false,
|
||||
fileName: ""
|
||||
});
|
||||
}
|
||||
|
||||
if (step == 7) {
|
||||
nearside = prbdata.y
|
||||
centerYdistance = (farside - nearside);
|
||||
console.log(centerYdistance)
|
||||
var holefindermacroStep7 = `
|
||||
G91
|
||||
G0 Y` + centerYdistance / 2 + `
|
||||
G90
|
||||
G38.2 X-10 F50 ; Probe Y`
|
||||
|
||||
socket.emit('runJob', {
|
||||
data: holefindermacroStep7,
|
||||
isJob: false,
|
||||
completedMsg: false,
|
||||
fileName: ""
|
||||
});
|
||||
}
|
||||
|
||||
if (step == 8) {
|
||||
leftside = prbdata.x
|
||||
|
||||
var holefindermacroStep7 = `
|
||||
G91
|
||||
G0 X1
|
||||
G90
|
||||
G38.2 X10 F50 ; Probe Y`
|
||||
|
||||
socket.emit('runJob', {
|
||||
data: holefindermacroStep7,
|
||||
isJob: false,
|
||||
completedMsg: false,
|
||||
fileName: ""
|
||||
});
|
||||
}
|
||||
|
||||
if (step == 9) {
|
||||
rightside = prbdata.x
|
||||
centerXdistance = (rightside - leftside);
|
||||
console.log(centerXdistance)
|
||||
var holefindermacroStep7 = `
|
||||
G91
|
||||
G0 X-` + centerXdistance / 2 + `
|
||||
G90
|
||||
G10 P1 L20 X0 Y0
|
||||
G0 Z` + (zoffset + 5) + ` ; retract`
|
||||
|
||||
socket.emit('runJob', {
|
||||
data: holefindermacroStep7,
|
||||
isJob: false,
|
||||
completedMsg: "Probe Complete: Remove the Probe Clip and Probe Plate before continuing... <hr> Approx Endmill Diameter: " + (12 - ((centerXdistance + centerYdistance) / 2)).toFixed(2) + "mm",
|
||||
fileName: ""
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
|
@ -1,31 +1,3 @@
|
|||
$(document).ready(function() {
|
||||
//nothing
|
||||
});
|
||||
|
||||
function confirmQuit() {
|
||||
Metro.dialog.create({
|
||||
title: "Are you sure you want to Quit?",
|
||||
content: "<div>This will will close the connection to the machine, abort any running jobs, and shutdown OpenBuilds CONTROL</div>",
|
||||
actions: [{
|
||||
caption: "Yes, Quit!",
|
||||
cls: "js-dialog-close alert",
|
||||
onclick: function() {
|
||||
// alert("You clicked Agree action");
|
||||
socket.emit('quit')
|
||||
}
|
||||
},
|
||||
{
|
||||
caption: "Cancel",
|
||||
cls: "js-dialog-close",
|
||||
onclick: function() {
|
||||
// alert("You clicked Disagree action");
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function manualcontrolPanel() {
|
||||
$('#manualControlPanel').show()
|
||||
$('#grblPanel').hide()
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
// check if browser window has focus
|
||||
var notIE = (document.documentMode === undefined),
|
||||
isChromium = window.chrome;
|
||||
|
||||
if (notIE && !isChromium) {
|
||||
// checks for Firefox and other NON IE Chrome versions
|
||||
$(window).on("focusin", function() {
|
||||
// tween resume() code goes here
|
||||
setTimeout(function() {
|
||||
// console.log("focus");
|
||||
pauseAnimation = false;
|
||||
animate();
|
||||
// $('html, body').css('filter', 'blur(0px)');
|
||||
}, 100);
|
||||
}).on("focusout", function() {
|
||||
// tween pause() code goes here
|
||||
console.log("blur");
|
||||
pauseAnimation = true;
|
||||
});
|
||||
} else {
|
||||
// checks for IE and Chromium versions
|
||||
if (window.addEventListener) {
|
||||
// bind focus event
|
||||
window.addEventListener("focus", function(event) {
|
||||
// tween resume() code goes here
|
||||
setTimeout(function() {
|
||||
// $('html, body').css('filter', 'blur(0px)');
|
||||
// console.log("focus");
|
||||
pauseAnimation = false;
|
||||
animate();
|
||||
}, 100);
|
||||
}, false);
|
||||
// bind blur event
|
||||
window.addEventListener("blur", function(event) {
|
||||
// tween pause() code goes here
|
||||
// console.log("blur");
|
||||
pauseAnimation = true;
|
||||
// $('html, body').css('filter', 'blur(2px)');
|
||||
}, false);
|
||||
} else {
|
||||
// bind focus event
|
||||
window.attachEvent("focus", function(event) {
|
||||
// tween resume() code goes here
|
||||
setTimeout(function() {
|
||||
// console.log("focus");
|
||||
pauseAnimation = false;
|
||||
animate();
|
||||
// $('html, body').css('filter', 'blur(0px)');
|
||||
}, 100);
|
||||
});
|
||||
// bind focus event
|
||||
window.attachEvent("blur", function(event) {
|
||||
// tween pause() code goes here
|
||||
pauseAnimation = true;
|
||||
// console.log("blur");
|
||||
});
|
||||
};
|
||||
};
|
|
@ -0,0 +1,182 @@
|
|||
function findCenter() {
|
||||
var xoffset = (probemode.probe.xoffset) * -1 // *-1 to make negative as we are off to the left too far from x0
|
||||
var yoffset = (probemode.probe.yoffset) * -1 // *-1 to make negative as we are off to the front too far from y0
|
||||
var zoffset = parseFloat(probemode.probe.zoffset) // not *-1 as its offset in z pos
|
||||
var step = 0;
|
||||
var rightside = 0,
|
||||
leftside = 0,
|
||||
farside = 0,
|
||||
nearside = 0,
|
||||
centerXdistance = 0,
|
||||
centerYdistance = 0;
|
||||
|
||||
socket.off('prbResult'); // Disable old listeners
|
||||
|
||||
var holefindermacroStep1 = `
|
||||
; Header
|
||||
|
||||
G21 ; mm mode
|
||||
G10 P1 L20 X0 Y0 Z0 ; zero out current location
|
||||
|
||||
; First we establish Zero
|
||||
; Probe Z
|
||||
G0 X22.5 Y22.5 ; position to center of logo
|
||||
G38.2 Z-25 F100 ; Probe Z
|
||||
G4 P0.3
|
||||
G10 P1 L20 Z` + zoffset + ` ; Set Z6 where 6 is thickness of plate
|
||||
G0 Z` + (zoffset + 5) + ` ; retract
|
||||
|
||||
; Probe X
|
||||
G0 X-20 Y10 ; position to left side and move forward a little to be closer to center of edge
|
||||
G0 Z` + (zoffset - 6) + ` ; drop down to be next to plate
|
||||
G38.2 X25 F100 ; Probe X
|
||||
G4 P0.3
|
||||
G10 P1 L20 X` + xoffset + ` ; set X as offset and half endmill diameter
|
||||
G0 X` + (xoffset - 2).toFixed(3) + `
|
||||
G0 Z` + (zoffset + 5) + ` ; retract
|
||||
|
||||
; Probe Y
|
||||
G0 X15 Y-20 ; position to front side and move right a little to be closer to center of edge
|
||||
G0 Z` + (zoffset - 6) + ` ; drop down to be next to plate
|
||||
G38.2 Y25 F100 ; probe Y
|
||||
G4 P0.3
|
||||
G10 P1 L20 Y` + yoffset + ` ; set Y as offset and half endmill diameter
|
||||
G0 Y` + (yoffset - 2).toFixed(3) + `
|
||||
G0 Z` + (zoffset + 5) + ` ; retract
|
||||
G0 X0 Y0 ; return
|
||||
|
||||
G0 X4 Y4
|
||||
G0 Z1
|
||||
G38.2 X10 F50 ; Probe X`
|
||||
|
||||
socket.emit('runJob', {
|
||||
data: holefindermacroStep1,
|
||||
isJob: false,
|
||||
completedMsg: false,
|
||||
fileName: ""
|
||||
});
|
||||
|
||||
socket.on('prbResult', function(prbdata) {
|
||||
if (prbdata.state > 0) {
|
||||
step++;
|
||||
console.log("Step " + step, prbdata);
|
||||
|
||||
// Steps 1-3 just positions endmill for probes that count
|
||||
|
||||
if (step == 4) {
|
||||
rightside = prbdata.x
|
||||
console.log(rightside);
|
||||
|
||||
var holefindermacroStep5 = `
|
||||
G4 P0.3
|
||||
G91
|
||||
G0 X-1
|
||||
G90
|
||||
G38.2 X-10 F50 ; Probe X`
|
||||
|
||||
socket.emit('runJob', {
|
||||
data: holefindermacroStep5,
|
||||
isJob: false,
|
||||
completedMsg: false,
|
||||
fileName: ""
|
||||
});
|
||||
}
|
||||
|
||||
if (step == 5) {
|
||||
leftside = prbdata.x
|
||||
var centerdistance = (rightside - leftside);
|
||||
var holefindermacroStep6 = `
|
||||
G4 P0.3
|
||||
G91
|
||||
G0 X` + centerdistance / 2 + `
|
||||
G90
|
||||
G38.2 Y10 F50 ; Probe Y`
|
||||
|
||||
socket.emit('runJob', {
|
||||
data: holefindermacroStep6,
|
||||
isJob: false,
|
||||
completedMsg: false,
|
||||
fileName: ""
|
||||
});
|
||||
}
|
||||
|
||||
if (step == 6) {
|
||||
farside = prbdata.y
|
||||
|
||||
var holefindermacroStep7 = `
|
||||
G4 P0.3
|
||||
G91
|
||||
G0 Y-1
|
||||
G90
|
||||
G38.2 Y-10 F50 ; Probe Y`
|
||||
|
||||
socket.emit('runJob', {
|
||||
data: holefindermacroStep7,
|
||||
isJob: false,
|
||||
completedMsg: false,
|
||||
fileName: ""
|
||||
});
|
||||
}
|
||||
|
||||
if (step == 7) {
|
||||
nearside = prbdata.y
|
||||
centerYdistance = (farside - nearside);
|
||||
console.log(centerYdistance)
|
||||
var holefindermacroStep7 = `
|
||||
G4 P0.3
|
||||
G91
|
||||
G0 Y` + centerYdistance / 2 + `
|
||||
G90
|
||||
G38.2 X-10 F50 ; Probe Y`
|
||||
|
||||
socket.emit('runJob', {
|
||||
data: holefindermacroStep7,
|
||||
isJob: false,
|
||||
completedMsg: false,
|
||||
fileName: ""
|
||||
});
|
||||
}
|
||||
|
||||
if (step == 8) {
|
||||
leftside = prbdata.x
|
||||
|
||||
var holefindermacroStep7 = `
|
||||
G4 P0.3
|
||||
G91
|
||||
G0 X1
|
||||
G90
|
||||
G38.2 X10 F50 ; Probe Y`
|
||||
|
||||
socket.emit('runJob', {
|
||||
data: holefindermacroStep7,
|
||||
isJob: false,
|
||||
completedMsg: false,
|
||||
fileName: ""
|
||||
});
|
||||
}
|
||||
|
||||
if (step == 9) {
|
||||
rightside = prbdata.x
|
||||
centerXdistance = (rightside - leftside);
|
||||
console.log(centerXdistance)
|
||||
var holefindermacroStep7 = `
|
||||
G4 P0.3
|
||||
G91
|
||||
G0 X-` + centerXdistance / 2 + `
|
||||
G90
|
||||
G10 P1 L20 X0 Y0
|
||||
G0 Z` + (zoffset + 5) + ` ; retract`
|
||||
|
||||
socket.emit('runJob', {
|
||||
data: holefindermacroStep7,
|
||||
isJob: false,
|
||||
completedMsg: "Probe Complete: Remove the Probe Clip and Probe Plate before continuing... <hr> Approx Endmill Diameter: " + (12 - ((centerXdistance + centerYdistance) / 2)).toFixed(2) + "mm",
|
||||
fileName: ""
|
||||
});
|
||||
}
|
||||
} else {
|
||||
console.log("Probe Failed")
|
||||
}
|
||||
|
||||
})
|
||||
}
|
|
@ -64,13 +64,19 @@ function openProbeDialog() {
|
|||
Metro.dialog.open("#xyzProbeWindow");
|
||||
if (localStorage.getItem('probeType')) {
|
||||
probetype(localStorage.getItem('probeType'))
|
||||
if (localStorage.getItem('probeType') == "z") {
|
||||
if (localStorage.getItem('probeType') == "z") { // Z Touchplate
|
||||
setTimeout(function() {
|
||||
probezplatetab()
|
||||
$(".probetabxyz").removeClass("active")
|
||||
$("#probezplatetab").addClass("active")
|
||||
}, 100)
|
||||
} else {
|
||||
} else if (localStorage.getItem('probeType') == "xyz") { // OpenBuilds Probe Plus XYZ
|
||||
setTimeout(function() {
|
||||
probeautotab()
|
||||
$(".probetabxyz").removeClass("active")
|
||||
$("#probeautotab").addClass("active")
|
||||
}, 100)
|
||||
} else { // Custom Probe
|
||||
setTimeout(function() {
|
||||
probexyztab()
|
||||
$(".probetabxyz").removeClass("active")
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "OpenBuildsCONTROL",
|
||||
"version": "1.0.245",
|
||||
"version": "1.0.246",
|
||||
"license": "AGPL-3.0",
|
||||
"description": "OpenBuildsCONTROL CNC Machine Interface Software",
|
||||
"author": "github.com/openbuilds <webmaster@openbuilds.com>",
|
||||
|
|
Ładowanie…
Reference in New Issue