From 9e683838d320635a31f798f9931fd7303ac291d1 Mon Sep 17 00:00:00 2001 From: osiu97 Date: Wed, 8 Jul 2026 19:39:43 +0200 Subject: [PATCH] fix home status not being saved --- web/js/sections/stepper-test.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 {