From c4c20c6d0a273e27f5a3bd159f768f0d0840c43f Mon Sep 17 00:00:00 2001 From: Henrik Muehe Date: Sun, 3 May 2026 13:29:34 +0200 Subject: [PATCH] Rename user-facing 'W axis' references to 'A axis' / 'auxiliary axis' The auxcnc-driven stepper has been integrated into gplan as a virtual A axis since the option-b migration. User-facing labels that still said 'W axis' are now confusing because the user types G-code with A, sees 'A' in the DRO, but config tabs and tooltips still talked about W. Cleaned up: - Settings tab label W Axis -> A Axis (route slug stays #w-axis for back-compat with bookmarks) - WAxisSettings.svelte tooltips and tip text say 'auxiliary' or just describe the field generically - control-view.pug DRO row tooltips, comments, labels - control-view.js console.error messages and route-comments - axis-vars.js _compute_aux_axis tooltips - AuxAxis.py boot-banner message Internal identifiers (filenames WAxisSettings.svelte, route slug #w-axis, aux.json fields min_w/max_w, internal comments referring to the historical W-as-aux design) are kept where they are tied to on-disk state or wire formats - those rename moves are not worthwhile and would force users to migrate their aux.json files. --- src/js/axis-vars.js | 15 +++++----- src/js/control-view.js | 24 ++++++++-------- src/js/settings-shell-view.js | 8 ++++-- src/pug/templates/control-view.pug | 8 +++--- src/py/bbctrl/AuxAxis.py | 2 +- .../src/components/WAxisSettings.svelte | 28 ++++++++++--------- 6 files changed, 45 insertions(+), 40 deletions(-) diff --git a/src/js/axis-vars.js b/src/js/axis-vars.js index 7e47e1e..3f410ea 100644 --- a/src/js/axis-vars.js +++ b/src/js/axis-vars.js @@ -256,10 +256,11 @@ module.exports = { }, _compute_aux_axis: function() { - // Virtual W axis driven by the auxcnc ESP32. Position, homed - // flag and presence come from the bbctrl AuxAxis driver via - // state.aux_*. No motor mapping, no soft-limit warnings on - // toolpath bounds (auxcnc enforces its own). + // Auxiliary axis driven by the auxcnc ESP32 (typically + // exposed to gplan as A). Position, homed flag and + // presence come from the bbctrl AuxAxis driver via + // state.aux_*. No motor mapping, no soft-limit warnings + // on toolpath bounds (auxcnc enforces its own). const enabled = !!this.state.aux_enabled; const present = !!this.state.aux_present; const homed = !!this.state.aux_homed; @@ -269,12 +270,12 @@ module.exports = { let state = present ? "UNHOMED" : "OFFLINE"; let icon = present ? "question-circle" : "plug"; let title = present - ? "Click the home button to home W axis." + ? "Click the home button to home the auxiliary axis." : "Aux controller not connected on /dev/ttyUSB0."; if (homed) { state = "HOMED"; icon = "check-circle"; - title = "W axis successfully homed."; + title = "Auxiliary axis successfully homed."; } else if (!present) { klass += " error"; } @@ -295,7 +296,7 @@ module.exports = { title: title, ticon: "check-circle", tstate: "OK", - toolmsg: "W axis is not constrained by tool path bounds.", + toolmsg: "Auxiliary axis is not constrained by tool path bounds.", tklass: `${homed ? "homed" : "unhomed"} axis-w`, isAux: true, }; diff --git a/src/js/control-view.js b/src/js/control-view.js index 76bd6d0..6cbdf9f 100644 --- a/src/js/control-view.js +++ b/src/js/control-view.js @@ -251,24 +251,24 @@ module.exports = { aux_home: function () { api.put("aux/home").catch(function (err) { - console.error("W home failed:", err); + console.error("Aux home failed:", err); }); }, // Home every enabled axis (legacy Onefinity "Home All"). Sequence: // 1. Z, X, Y (and A/B/C if enabled) via /api/home on the AVR - // 2. W axis via /api/aux/home on the ESP + // 2. Auxiliary axis via /api/aux/home on the ESP // ONLY when the auxcnc axis is not integrated as a virtual - // machine axis. With the gplan W-as-A integration - // (synthetic motor 4 enabled), Mach.home() already homes - // the external axis as part of the xyzabc pass — calling - // aux/home afterwards would home it a second time. + // machine axis. With the gplan A-axis integration (synthetic + // motor 4 enabled), Mach.home() already homes the external + // axis as part of the xyzabc pass - calling aux/home + // afterwards would home it a second time. // /api/home returns as soon as the request is queued, not when // homing completes, so we have to watch state.cycle: // - first wait for it to *leave* 'idle' (cycle began), // - then wait for it to come *back* to 'idle' (cycle ended). - // Only then do we fire the W home, so the gantry and the auxcnc - // ESP never move at the same time. + // Only then do we fire the auxiliary home, so the gantry and the + // auxcnc ESP never move at the same time. home_all: async function () { this.ask_home = false; try { @@ -289,14 +289,14 @@ module.exports = { // Phase 1: wait up to 5s for the homing cycle to actually start. // If the request was rejected upstream (e.g. estopped) cycle - // never leaves idle and we bail rather than home W in isolation. + // never leaves idle and we bail rather than home A in isolation. const startedAt = Date.now(); while (Date.now() - startedAt < 5000) { if (cycleNow() != "idle") break; await wait(100); } if (cycleNow() == "idle") { - console.warn("home_all: main homing cycle never started; skipping W"); + console.warn("home_all: main homing cycle never started; skipping aux"); return; } @@ -312,13 +312,13 @@ module.exports = { } api.put("aux/home").catch(function (err) { - console.error("W home failed:", err); + console.error("Aux home failed:", err); }); }, aux_jog: function (delta_mm) { api.put("aux/jog", { mm: delta_mm }).catch(function (err) { - console.error("W jog failed:", err); + console.error("Aux jog failed:", err); }); }, diff --git a/src/js/settings-shell-view.js b/src/js/settings-shell-view.js index bf5604c..1c0bea4 100644 --- a/src/js/settings-shell-view.js +++ b/src/js/settings-shell-view.js @@ -57,9 +57,11 @@ module.exports = { { sub: "motor", motor: 1, href: "#motor:1", icon: "fa-arrows-up-down-left-right", label: "Motor 1" }, { sub: "motor", motor: 2, href: "#motor:2", icon: "fa-arrows-up-down-left-right", label: "Motor 2" }, { sub: "motor", motor: 3, href: "#motor:3", icon: "fa-arrows-up-down-left-right", label: "Motor 3" }, - // W axis is auxiliary (auxcnc ESP32). It mounts the existing - // WAxisSettings Svelte component on its own page. - { sub: "w-axis", href: "#w-axis", icon: "fa-arrows-up-down", label: "W Axis" }, + // Auxiliary axis (auxcnc ESP32 - exposed to gplan as A). + // Mounts the WAxisSettings Svelte component on its own page. + // The route slug stays "#w-axis" for back-compat with any + // bookmarks; the visible label and tab content say "A Axis". + { sub: "w-axis", href: "#w-axis", icon: "fa-arrows-up-down", label: "A Axis" }, { section: " " }, { sub: "help", href: "#help", icon: "fa-circle-question", label: "Help" }, ], diff --git a/src/pug/templates/control-view.pug b/src/pug/templates/control-view.pug index ccf2913..4a4d8b7 100644 --- a/src/pug/templates/control-view.pug +++ b/src/pug/templates/control-view.pug @@ -219,7 +219,7 @@ script#control-view-template(type="text/x-template") // 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. + // the auxiliary A axis when it is enabled. button.icon-btn(:disabled="!is_idle", title="Home all axes.", @click="home_all()") .fa.fa-house-chimney @@ -252,8 +252,8 @@ script#control-view-template(type="text/x-template") // Legacy W axis row - shown only when the auxcnc stepper is // *not* exposed as a virtual A axis. After v2 the standard // A row above renders this axis natively (with full offset - // + set-position support); the W row stays for backwards - // compatibility with installs that haven't migrated. + // + set-position support); this row only appears on legacy + // installs that haven't migrated yet. .dro-row(:class="w.klass + ' ' + w.tklass", v-if="w.enabled && !a.enabled", :title="w.title") @@ -268,7 +268,7 @@ script#control-view-template(type="text/x-template") .fa.fa-location-dot button.icon-btn(:class="w.homed ? 'state-green' : 'state-amber'", :disabled="!w.enabled", - title="Home W axis.", @click="aux_home()") + title="Home auxiliary axis.", @click="aux_home()") .fa.fa-home // ----- Status strip ----- diff --git a/src/py/bbctrl/AuxAxis.py b/src/py/bbctrl/AuxAxis.py index 6ad693f..1ba39e0 100644 --- a/src/py/bbctrl/AuxAxis.py +++ b/src/py/bbctrl/AuxAxis.py @@ -525,7 +525,7 @@ class AuxAxis(object): self._present = True self._publish_state() self.ctrl.state.add_message( - 'W axis controller restarted - re-home before use') + 'Auxiliary axis controller restarted - re-home before use') return # Topic dispatch: "[topic] body..." diff --git a/src/svelte-components/src/components/WAxisSettings.svelte b/src/svelte-components/src/components/WAxisSettings.svelte index 6c45795..afed7fa 100644 --- a/src/svelte-components/src/components/WAxisSettings.svelte +++ b/src/svelte-components/src/components/WAxisSettings.svelte @@ -4,9 +4,11 @@ import * as api from "$lib/api"; // Mirrors the DEFAULTS in src/py/bbctrl/AuxAxis.py. The "enabled" - // flag is read-only here; toggling the W axis on/off is done via - // aux.json on disk, so adding/removing the hardware doesn't have a - // surprise UI that bricks bring-up. + // flag is read-only here; toggling the auxiliary A axis on/off + // is done via aux.json on disk, so adding/removing the hardware + // doesn't have a surprise UI that bricks bring-up. Field names + // (min_w/max_w) keep the historical "w" prefix for back-compat + // with existing aux.json files - rename happens at display only. type AuxConfig = { enabled: boolean; port: string; @@ -73,9 +75,9 @@ } } - // Mark the root config as modified whenever a W axis field is - // edited, so the master Save button highlights and the user knows - // there are unsaved changes. + // Mark the root config as modified whenever an auxiliary axis + // field is edited, so the master Save button highlights and + // the user knows there are unsaved changes. function markDirty() { try { const root = (window as any).$root || (window as any).Vue?.root; @@ -88,7 +90,7 @@
{#if !cfg} -

Loading W axis configuration...

+

Loading auxiliary A axis configuration...

{:else}
{#if status} @@ -109,7 +111,7 @@
-
+
@@ -128,7 +130,7 @@

Mechanics

-
+
@@ -196,12 +198,12 @@
-
+
@@ -263,7 +265,7 @@ master Save button at the bottom of the settings rail. Homing rates and the limit polarity are pushed to the ESP immediately; any running motion is - unaffected. Re-home the W axis after changing direction, + unaffected. Re-home the auxiliary axis after changing direction, sign, or step settings.