Skip to content

Commit

Permalink
Save add ons
Browse files Browse the repository at this point in the history
  • Loading branch information
petervanderwalt committed Apr 18, 2024
1 parent ba9afde commit 6d28bdb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Binary file added images/mch/leadmachine1010plasma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion js/application-settings-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,17 @@ function selectToolhead() {
startcode += "M3 S" + $('#scommandscale').val() + "; Spindle On\n"
endcode += "M5 S0; Spindle Off\n"
$('#scommandscale').val(1000);
localStorage.setItem("hasRouter", value);
}

if ($("#hasSpindle").is(':checked')) {
// console.log('Add Spindle')
startcode += "M3 S" + $('#scommandscale').val() + "; Spindle On\n"
endcode += "M5 S0; Spindle Off\n"
$('#scommandscale').val(24000);
localStorage.setItem("hasSpindle", true);
} else {
localStorage.setItem("hasSpindle", false);
}

if ($("#hasPlasma").is(':checked')) {
Expand All @@ -232,19 +236,28 @@ function selectToolhead() {
$("#sizexmax").val(xaxis)
$("#sizeymax").val(yaxis)
$("#sizezmax").val(zaxis)
localStorage.setItem("hasPlasma", true);
} else {
localStorage.setItem("hasPlasma", false);
}

if ($("#hasLaser").is(':checked')) {
// console.log('Add Laser Dynamic')
startcode += "M4; Dynamic Power Laser On\n"
endcode += "M5; Laser Off\n"
$('#scommandscale').val(1000);

localStorage.setItem("hasLaser", true);
} else {
localStorage.setItem("hasLaser", false);
}

if ($("#hasDust").is(':checked')) {
// console.log('Add Misting')
startcode += "M8; Coolant Output On - turns on Dust Extractor if wired\n"
endcode += "M9; Coolant Output Off - turns off Dust Extractor if wired\n"
localStorage.setItem("hasDust", true);
} else {
localStorage.setItem("hasDust", false);
}

$('#startgcode').val(startcode)
Expand Down

0 comments on commit 6d28bdb

Please sign in to comment.