diff --git a/web/js/sections/stepper-test.js b/web/js/sections/stepper-test.js index ea4b5b2..671a1a3 100644 --- a/web/js/sections/stepper-test.js +++ b/web/js/sections/stepper-test.js @@ -218,13 +218,20 @@ async function jogMotor(motor, delta) { async function zeroMotor(motor) { const cmd = motor === 'ALL' ? 'HOMEALL' : `HOME${motor}`; + + if (motor === 'ALL') { + localStorage.setItem('wiji_homed', 'true'); + } + if (BLE.isConnected()) { await BLE.write(cmd).catch(e => UI.log(e.message, 'error')); + + const warningEl = document.getElementById('home-warning'); + if (warningEl) warningEl.style.display = localStorage.getItem('wiji_homed') === 'true' ? 'none' : 'block'; } else { if (motor === 'ALL') { steps1 = IK.ARM.HOME_STEPS.m1; steps2 = IK.ARM.HOME_STEPS.m2; - localStorage.setItem('wiji_homed', 'true'); } else if (motor === 1) { steps1 = IK.ARM.HOME_STEPS.m1; } else {