var ycaltemplate = `
Step 1: Mark Initial Position
This wizard, will allow you to fine-tune your steps-per-mm for the Y-Axis
To get started, jog your Y-Axis until its near the Y- position.

Then, place a physical mark on your machine to mark where the Y-Carriage currently is
` function applycalibrationy() { var actualdist = $('#ycaltraveldist').val(); var currentstepspermm = parseFloat(grblParams['$101']); // var currentstepspermm = 199.9; // newstepsval = currentsteps * (intended distance / actual distance) var newsteps = currentstepspermm * (100 / actualdist); // alert("New Steps Per MM Value: " + newsteps); $('#val-101-input').val(newsteps) checkifchanged(); } function ystepscalibrate() { Metro.dialog.create({ title: "Calibrate Steps per mm for Y-Axis ($101)", content: ycaltemplate, width: 750, actions: [{ caption: "Cancel", cls: "js-dialog-close", onclick: function() { // } }] }); } function ycalslide1() { $('#ycalstep1').show(); $('#ycalstep2').hide(); $('#ycalstep3').hide(); } function ycalslide2() { $('#ycal100mm').attr('disabled', false); $('#ycalcontinue2').attr('disabled', true); $('#ycalstep1').hide(); $('#ycalstep2').show(); $('#ycalstep3').hide(); } function ycalslide3() { $('#ycalstep1').hide(); $('#ycalstep2').hide(); $('#ycalstep3').show(); }