stub in laser ops for cam

This commit is contained in:
Stewart Allen 2022-10-18 10:27:41 -04:00
commit d0ae4b63f7
5 changed files with 13 additions and 6 deletions

View file

@ -439,6 +439,7 @@ const conf = exports({
bedDepth: 175,
bedHeight: 2.5,
maxHeight: 300,
useLaser: false,
originCenter: false,
spindleMax: 0,
gcodePre: [],

View file

@ -827,6 +827,7 @@ gapp.register("kiri.init", [], (root, exports) => {
ui.bedDepth,
ui.bedWidth,
ui.maxHeight,
ui.useLaser,
ui.resolutionX,
ui.resolutionY,
ui.deviceOrigin,
@ -1691,7 +1692,7 @@ gapp.register("kiri.init", [], (root, exports) => {
resolutionX: uc.newInput(LANG.dv_rezx_s, {title:LANG.dv_rezx_l, convert:uc.toInt, size:5, modes:SLA}),
resolutionY: uc.newInput(LANG.dv_rezy_s, {title:LANG.dv_rezy_l, convert:uc.toInt, size:5, modes:SLA}),
spindleMax: uc.newInput(LANG.dv_spmx_s, {title:LANG.dv_spmx_l, convert:uc.toInt, size:5, modes:CAM}),
spindleMax: uc.newInput(LANG.dv_spmx_s, {title:LANG.dv_spmx_l, convert:uc.toInt, size:5, modes:CAM, trigger:1}),
deviceZMax: uc.newInput(LANG.dv_zmax_s, {title:LANG.dv_zmax_l, convert:uc.toInt, size:5, modes:FDM}),
gcodeTime: uc.newInput(LANG.dv_time_s, {title:LANG.dv_time_l, convert:uc.toFloat, size:5, modes:FDM}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}),
@ -1728,8 +1729,9 @@ gapp.register("kiri.init", [], (root, exports) => {
palettePress: uc.newInput(LANG.dv_pacm_s, {title:LANG.dv_pacm_l, modes:FDM, convert:uc.toInt}),
gcode: uc.newGroup(LANG.dv_gr_out, $('device2'), {group:"dgco", inline:true, modes:CAM_LZR}),
gcodeSpace: uc.newBoolean(LANG.dv_tksp_s, onBooleanClick, {title:LANG.dv_tksp_l, modes:CAM_LZR}),
gcodeStrip: uc.newBoolean(LANG.dv_strc_s, onBooleanClick, {title:LANG.dv_strc_l, modes:CAM}),
gcodeSpace: uc.newBoolean(LANG.dv_tksp_s, onBooleanClick, {title:LANG.dv_tksp_l, modes:CAM_LZR}),
useLaser: uc.newBoolean(LANG.dv_lazr_s, onBooleanClick, {title:LANG.dv_lazr_l, modes:CAM}),
gcodeFExt: uc.newInput(LANG.dv_fext_s, {title:LANG.dv_fext_l, modes:CAM_LZR, size:7, text:true}),
gcodeEd: uc.newGroup(LANG.dv_gr_gco, $('dg'), {group:"dgcp", inline:true, modes:GCODE}),
@ -1744,7 +1746,7 @@ gapp.register("kiri.init", [], (root, exports) => {
(ui.gcodeLaserOff = uc.newGCode(LANG.dv_lzof_s, {title:LANG.dv_lzof_l, modes:LASER, area:gcode})).button,
(ui.gcodeChange = uc.newGCode(LANG.dv_tool_s, {title:LANG.dv_tool_l, modes:CAM, area:gcode})).button,
(ui.gcodeDwell = uc.newGCode(LANG.dv_dwll_s, {title:LANG.dv_dwll_l, modes:CAM, area:gcode})).button,
(ui.gcodeSpindle = uc.newGCode(LANG.dv_sspd_s, {title:LANG.dv_sspd_l, modes:CAM, area:gcode})).button
(ui.gcodeSpindle = uc.newGCode(LANG.dv_sspd_s, {title:LANG.dv_sspd_l, modes:CAM, area:gcode, show:() => ui.spindleMax.value > 0})).button
], {class:"ext-buttons f-row gcode-macros"}),
lprefs: uc.newGroup(LANG.op_menu, $('prefs-gen1'), {inline: true}),

View file

@ -158,8 +158,8 @@ gapp.register("kiri.ui", [], (root, exports) => {
});
}
function refresh() {
setMode(letMode, true);
function refresh(all) {
setMode(letMode, all ? false : true);
setters.forEach(input => {
if (input.setv) {
input.setv(input.real);
@ -695,7 +695,7 @@ gapp.register("kiri.ui", [], (root, exports) => {
lastChange = ip;
action(event);
if (opt.trigger) {
refresh();
refresh(opt.trigger === 1);
}
});
if (opt.units) {

View file

@ -483,6 +483,8 @@
<i class="fas fa-plus"></i>
<div id="op-add-pop" class="f-col">
<div id="op-add-list" class="opdiv op-grid">
<div id="laser-on" title="turn on laser mode">laser on</div>
<div id="laser-off" title="turn off laser mode">laser off</div>
<div title="flip part and load&#13;profile for other side&#13;for double-sided work">flip</div>
<div title="drill registration holes&#13;along the X or Y axis&#13;for double-sided work">register</div>
<div title="drill any holes matching&#13;selected tool diameter">drill</div>

View file

@ -141,6 +141,8 @@ self.kiri.lang['en-us'] = {
dv_strc_l: ["strip gcode comments","comments begin with ;"],
dv_fext_s: "file extension",
dv_fext_l: "file name extension",
dv_lazr_s: "enable laser",
dv_lazr_l: ["enable laser operations"],
dv_dwll_s: "dwell",
dv_dwll_l: "gcode dwell script",