Skip to content

fix(amu): enable gate controls only for Happy-Hare's selected gate - #348

Merged
gmmcosta15 merged 31 commits into
devfrom
fix/amu-4-gate-controls
Oct 16, 2026
Merged

gmmcosta15 merged 31 commits into
devfrom
fix/amu-4-gate-controls

Conversation

@gmmcosta15

@gmmcosta15 gmmcosta15 commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Description

  • Feature
  • Bug fix
  • Code refactor
  • Documentation

Last PR of the AMU stack (#345-#347 merged). Happy-Hare's bare MMU_LOAD, MMU_EJECT and MMU_CHECK_GATE act on the gate Happy-Hare has selected, so the AMU page now shows and enables controls only for that gate.

Changes

  • The info panel follows Happy-Hare's selected gate (printer.mmu.gate).
    • With no gate selected (unknown or bypass) the panel clears, and only Unload can stay enabled.
    • Before, it kept showing a stale gate with live buttons.
  • Button rules now match the AMUManager guards:
    • Load and Eject: MMU enabled, homed, filament unloaded, gate not EMPTY.
    • Check Gate: MMU enabled, homed, filament unloaded (allowed on an empty gate).
    • Unload: MMU enabled and filament not unloaded.
    • A disabled MMU greys out everything, including the material, temperature and colour fields.
  • Load and Unload open the load popup only when the manager actually sent the command. Before, the popup always opened, and the slot raised when no popup was passed.
  • Temperature and material edits no longer raise ValueError on the empty-field placeholder or on non-finite values; nothing is sent in those cases.
  • The temperature numpad minimum is 1, because Happy-Hare treats TEMP=0 as "keep the current value".
  • The carousel redraws only when the gates or the filament position change; the panel updates only when gate, enabled or homed change.
  • SpoolCarousel.selectIndex(-1) now unchecks the highlighted button (an exclusive button group refuses to otherwise).
  • Cleanup:
    • removed the unused request_gate_map signal;
    • removed the duplicate setObjectName calls; the page is now amu_page;
    • replaced the lambdas with named slots;
    • simplified the back-button rewiring (same behaviour).

Tests

  • tests/widgets/test_amu_widgets_unit.py covers:
    • the button matrix for each gate and MMU state;
    • clearing the panel on bypass or when there is no state;
    • gate selection;
    • popup gating;
    • temperature parsing;
    • back-button rewiring;
    • redraw skipping.

@gmmcosta15 gmmcosta15 self-assigned this Oct 13, 2026
…disconnect, fetch spools via the Spoolman proxy
@gmmcosta15
gmmcosta15 force-pushed the fix/amu-4-gate-controls branch from 748395e to 74e7e10 Compare October 13, 2026 15:36
@gmmcosta15
gmmcosta15 force-pushed the fix/amu-4-gate-controls branch from 74e7e10 to eb001ca Compare October 13, 2026 16:17
# Conflicts:
#	BlocksScreen/lib/panels/filamentTab.py
@RobeMartins
RobeMartins removed the request for review from Robert0Mart October 16, 2026 09:29
@gmmcosta15
gmmcosta15 merged commit 005ab10 into dev Oct 16, 2026
9 checks passed
@gmmcosta15
gmmcosta15 deleted the fix/amu-4-gate-controls branch October 16, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants