fix spindle speed handling

This commit is contained in:
Stewart Allen 2020-06-09 11:37:10 -04:00
commit 213694040f

View file

@ -606,7 +606,7 @@ var gs_kiri_init = exports;
UI.gcodeLayer,
UI.extFilament,
UI.extNozzle,
UI.deviceMaxSpindle,
UI.spindleMax,
UI.gcodeSpindle,
UI.gcodeDwell,
UI.gcodeChange,
@ -627,14 +627,15 @@ var gs_kiri_init = exports;
});
// hide spindle fields when device doens't support it
if (mode === 'CAM') [
UI.extrudeAbs,
UI.roughingSpindle,
UI.finishingSpindle,
UI.drillSpindle
].forEach(function(e) {
e.parentNode.style.display = dev.spindleMax >= 0 ? 'none' : 'block';
});
UI.extrudeAbs.style.display = mode === 'CAM' ? 'none' : 'block';
if (mode === 'CAM') {
[ UI.roughingSpindle,
UI.finishingSpindle,
UI.drillSpindle
].forEach(function(e) {
e.parentNode.style.display = dev.spindleMax > 0 ? 'block' : 'none';
});
}
UI.deviceSave.disabled = !local;
UI.deviceDelete.disabled = !local;
@ -1165,7 +1166,7 @@ var gs_kiri_init = exports;
bedWidth: UC.newInput(LANG.dv_bedw_s, {title:LANG.dv_bedw_l, convert:UC.toFloat, size:6}),
bedDepth: UC.newInput(LANG.dv_bedd_s, {title:LANG.dv_bedd_l, convert:UC.toFloat, size:6}),
maxHeight: UC.newInput(LANG.dv_bedh_s, {title:LANG.dv_bedh_l, convert:UC.toFloat, size:6, modes:FDM_SLA}),
deviceMaxSpindle: UC.newInput(LANG.dv_spmx_s, {title:LANG.dv_spmx_l, convert:UC.toInt, modes:CAM}),
spindleMax: UC.newInput(LANG.dv_spmx_s, {title:LANG.dv_spmx_l, convert:UC.toInt, modes:CAM}),
deviceOrigin: UC.newBoolean(LANG.dv_orgc_s, onBooleanClick, {title:LANG.dv_orgc_l, modes:GCODE}),
deviceOriginTop: UC.newBoolean(LANG.dv_orgt_s, onBooleanClick, {title:LANG.dv_orgt_l, modes:CAM}),
deviceRound: UC.newBoolean(LANG.dv_bedc_s, onBooleanClick, {title:LANG.dv_bedc_l, modes:FDM}),