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.
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -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" },
|
||||
],
|
||||
|
||||
@@ -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 -----
|
||||
|
||||
@@ -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..."
|
||||
|
||||
@@ -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 @@
|
||||
|
||||
<div class="w-axis-settings">
|
||||
{#if !cfg}
|
||||
<p class="tip">Loading W axis configuration...</p>
|
||||
<p class="tip">Loading auxiliary A axis configuration...</p>
|
||||
{:else}
|
||||
<div class="status">
|
||||
{#if status}
|
||||
@@ -109,7 +111,7 @@
|
||||
|
||||
<div class="pure-form pure-form-aligned" on:input={markDirty} on:change={markDirty}>
|
||||
<fieldset>
|
||||
<div class="pure-control-group" title="Enable the auxcnc W axis. Edit aux.json to toggle.">
|
||||
<div class="pure-control-group" title="Enable the auxiliary axis (auxcnc-driven A). Edit aux.json to toggle.">
|
||||
<label for="enabled">enabled</label>
|
||||
<input id="enabled" type="checkbox" checked={cfg.enabled} disabled />
|
||||
<label for="" class="units">(edit aux.json)</label>
|
||||
@@ -128,7 +130,7 @@
|
||||
|
||||
<h3>Mechanics</h3>
|
||||
<fieldset>
|
||||
<div class="pure-control-group" title="Logical steps per mm of W travel.">
|
||||
<div class="pure-control-group" title="Logical steps per mm of axis travel.">
|
||||
<label for="steps_per_mm">steps per mm</label>
|
||||
<input id="steps_per_mm" type="number" bind:value={cfg.steps_per_mm} step="any" />
|
||||
<label for="" class="units">steps/mm</label>
|
||||
@@ -196,12 +198,12 @@
|
||||
<div class="pure-control-group" title="Direction the axis moves when looking for the home limit switch.">
|
||||
<label for="home_dir">home direction</label>
|
||||
<select id="home_dir" bind:value={cfg.home_dir}>
|
||||
<option value="-">- (toward W-)</option>
|
||||
<option value="+">+ (toward W+)</option>
|
||||
<option value="-">- (toward A-)</option>
|
||||
<option value="+">+ (toward A+)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group" title="W position assigned when homing completes.">
|
||||
<div class="pure-control-group" title="Axis position assigned when homing completes.">
|
||||
<label for="home_position_mm">home position</label>
|
||||
<input id="home_position_mm" type="number" bind:value={cfg.home_position_mm} step="any" />
|
||||
<label for="" class="units">mm</label>
|
||||
@@ -263,7 +265,7 @@
|
||||
master <strong>Save</strong> 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.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user