From ecf3191fcc7d2f073409d496220e7978bd0dd8c8 Mon Sep 17 00:00:00 2001 From: muehe Date: Fri, 1 May 2026 15:54:52 +0200 Subject: [PATCH] control: restore Home All button in DRO header Legacy Onefinity exposed a master Home All in the DRO header. Our V09 redesign only kept it inside the no-W fallback row, so machines with the W axis enabled (which is most users now) had no master home button. Add it back to the DRO header's Actions column. home_all() fires /api/home for X/Y/Z/A and /api/aux/home for W in parallel \u2014 the AVR and the auxcnc ESP run independent homing cycles so the user sees one click homing everything. --- src/js/control-view.js | 15 +++++++++++++++ src/pug/templates/control-view.pug | 9 ++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/js/control-view.js b/src/js/control-view.js index b5c67f5..3603216 100644 --- a/src/js/control-view.js +++ b/src/js/control-view.js @@ -255,6 +255,21 @@ module.exports = { }); }, + // Home every enabled axis at once (legacy Onefinity behavior). + // The XYZ home is fired first via the standard /api/home endpoint, + // then the W axis is homed if it is enabled. The two cycles run + // in parallel — W is on the auxcnc ESP and doesn't share motors + // with the AVR — so the user sees one click homing everything. + home_all: function () { + this.ask_home = false; + api.put("home"); + if (this.w && this.w.enabled) { + api.put("aux/home").catch(function (err) { + console.error("W home failed:", err); + }); + } + }, + aux_jog: function (delta_mm) { api.put("aux/jog", { mm: delta_mm }).catch(function (err) { console.error("W jog failed:", err); diff --git a/src/pug/templates/control-view.pug b/src/pug/templates/control-view.pug index 1d78e01..6af83d3 100644 --- a/src/pug/templates/control-view.pug +++ b/src/pug/templates/control-view.pug @@ -213,7 +213,14 @@ script#control-view-template(type="text/x-template") div Offset div State div Toolpath - div(style="text-align:right") Actions + .actions-cell + // Master Home All. Each row's Actions cell has a per-axis + // home button; this header-level button homes every + // enabled axis (legacy Onefinity behavior). Auto-includes + // the W axis when it is enabled. + button.icon-btn(:disabled="!is_idle", + title="Home all axes.", @click="home_all()") + .fa.fa-house-chimney // Per-axis rows — keep unit-value + bindings from axis-vars each axis in 'xyzabc'