Skip to content

Commit

Permalink
Merge pull request #339 from tippfehlr/require-probe-touch
Browse files Browse the repository at this point in the history
feat(probe/safety): require probe to be touched before probing
  • Loading branch information
petervanderwalt authored Aug 13, 2024
2 parents d58524a + dae612f commit deff1fa
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 13 deletions.
14 changes: 7 additions & 7 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1591,37 +1591,37 @@ <h1 style="position: fixed; top: 100px; left: 50%; transform: translateX(-50%);
determine endmill diameter. </small>
<hr>
<small>Position the endmill above the hole in the probe plate as shown, just above the plate, clip
the magnet to the collet, then click the <span class="fg-grayBlue">Confirm Probe Position</span> button to continue...</small>
the magnet to the collet, then click the <span class="fg-grayBlue">Confirm Probe Position</span> button or touch the probe to enable the <span class="fg-grayBlue">Probe</span> button.</small>
</div>
<div id="probe-xyz" class="probe-tab-content">
<small>XYZ Probe Routine: This routine is used to find the XYZ origins</small>
<hr>
<small>Position the endmill above the hole in the probe plate as shown, just above the plate, clip
the magnet to the collet, then click the <span class="fg-grayBlue">Confirm Probe Position</span> button to continue...</small>
the magnet to the collet, then click the <span class="fg-grayBlue">Confirm Probe Position</span> button or touch the probe to enable the <span class="fg-grayBlue">Probe</span> button.</small>
</div>
<div id="probe-x" class="probe-tab-content" style="display: none;">
<small>X Probe Routine: This routine is used to find the X origin</small>
<hr>
<small>Position the endmill to the left of the probe plate as shown, clip the magnet to the collet,
then click the <span class="fg-grayBlue">Confirm Probe Position</span> button to continue...</small>
then click the <span class="fg-grayBlue">Confirm Probe Position</span> button or touch the probe to enable the <span class="fg-grayBlue">Probe</span> button.</small>
</div>
<div id="probe-y" class="probe-tab-content" style="display: none;">
<small>Y Probe Routine: This routine is used to find the Y origin</small>
<hr>
<small>Position the endmill in front of the probe plate as shown, clip the magnet to the collet, then
click the <span class="fg-grayBlue">Confirm Probe Position</span> button to continue...</small>
click the <span class="fg-grayBlue">Confirm Probe Position</span> button or touch the probe to enable the <span class="fg-grayBlue">Probe</span> button.</small>
</div>
<div id="probe-z" class="probe-tab-content" style="display: none;">
<small>Z Probe Routine: This routine is used to find the Z origin</small>
<hr>
<small>Position the endmill above the probe plate as shown, clip the magnet to the collet or the alligator clip to the bit, then click
the <span class="fg-grayBlue">Confirm Probe Position</span> button to continue...</small>
the <span class="fg-grayBlue">Confirm Probe Position</span> button or touch the probe to enable the <span class="fg-grayBlue">Probe</span> button.</small>
</div>
<div id="probe-endmill" class="probe-tab-content" style="display: none;">
<small>Endmill Probe Routine: This routine is used to find the Endmill Diameter</small>
<hr>
<small>Position the endmill above the hole in the probe plate as shown, just above the plate, clip
the magnet to the collet, then click the <span class="fg-grayBlue">Confirm Probe Position</span> button to continue...</small>
the magnet to the collet, then click the <span class="fg-grayBlue">Confirm Probe Position</span> button or touch the probe to enable the <span class="fg-grayBlue">Probe</span> button.</small>
<hr>
<small>
This operation will perform an XYZ probe to establish the plate position, then using the hole in the plate,
Expand Down Expand Up @@ -1966,4 +1966,4 @@ <h1 style="position: fixed; top: 100px; left: 50%; transform: translateX(-50%);
<script src="/lib/furcanIconPicker/iconpicker-1.5.0.js"></script>

</html>
<!-- -->
<!-- -->
33 changes: 27 additions & 6 deletions app/wizards/probe/probev2.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ var probemode = {
position: "fl" // fl, fr, rl, rr, c
},
probe: xyzprobeplate,
interval: undefined,
}

$(document).ready(function() {
Expand Down Expand Up @@ -81,8 +82,23 @@ $("#probeunitxyz").change(function() {
// $(".needsXYZProbe").hide();
// }

function openProbeDialog() {
function initProbeDialog() {
Metro.dialog.open("#xyzProbeWindow");
$('#confirmNewProbeBtn')[0].innerHTML = "Confirm Probe Position";

probemode.interval = setInterval(() => {
if (laststatus.machine.inputs.contains("P")) {
$('#confirmNewProbeBtn').addClass("disabled");
$('#confirmNewProbeBtn')[0].innerHTML = "Touched";
$('#runNewProbeBtn').removeClass("disabled").focus();
clearInterval(probemode.interval);
probemode.interval = undefined;
}
}, 100);
}

function openProbeDialog() {
initProbeDialog();
if (localStorage.getItem('probeType')) {
probetype(localStorage.getItem('probeType'))
if (localStorage.getItem('probeType') == "z") { // Z Touchplate
Expand Down Expand Up @@ -114,7 +130,7 @@ function openProbeDialog() {
}

function openProbeXDialog() {
Metro.dialog.open("#xyzProbeWindow");
initProbeDialog();
if (localStorage.getItem('probeType')) {
probetype(localStorage.getItem('probeType'))
if (localStorage.getItem('probeType') == "z") {
Expand All @@ -140,7 +156,7 @@ function openProbeXDialog() {
}

function openProbeYDialog() {
Metro.dialog.open("#xyzProbeWindow");
initProbeDialog();
if (localStorage.getItem('probeType')) {
probetype(localStorage.getItem('probeType'))
if (localStorage.getItem('probeType') == "z") {
Expand All @@ -166,7 +182,7 @@ function openProbeYDialog() {
}

function openProbeZDialog() {
Metro.dialog.open("#xyzProbeWindow");
initProbeDialog();
if (localStorage.getItem('probeType')) {
probetype(localStorage.getItem('probeType'))
if (localStorage.getItem('probeType') == "z") {
Expand Down Expand Up @@ -408,8 +424,10 @@ function probetype(type) {
}

function confirmProbeInPlace(operation) {
$('#confirmNewProbeBtn').addClass("disabled")
$('#confirmNewProbeBtn').addClass("disabled");
$('#runNewProbeBtn').removeClass("disabled").focus();
clearInterval(probemode.interval);
probemode.interval = undefined;
}

function resetJogModeAfterProbe() {
Expand All @@ -425,10 +443,13 @@ function resetJogModeAfterProbe() {
}
}
$('#confirmNewProbeBtn').removeClass("disabled")
clearInterval(probemode.interval)
probemode.interval = undefined;
}


function runProbeNew() {
$('#confirmNewProbeBtn')[0].innerHTML = "Confirm Probe Position";
resetJogModeAfterProbe()
$("#consoletab").click()
probemode.stock.x = $("#stockwidth").val();
Expand Down Expand Up @@ -713,4 +734,4 @@ function saveEditCustomProbe() {
};
localStorage.setItem('customProbe', JSON.stringify(customprobeplate));
probetype('custom');
}
}

0 comments on commit deff1fa

Please sign in to comment.