Skip to content

Merge v2 (2.2.1) into main - #8

Merged
bfulham merged 34 commits into
mainfrom
v2/redesign
Oct 16, 2026
Merged

bfulham merged 34 commits into
mainfrom
v2/redesign

Conversation

@bfulham

@bfulham bfulham commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Summary

Brings the v2 redesign (in v2/, alongside the untouched v1 fart.py) onto main, through 2.2.1. v1 files, tests and CI are unchanged apart from build-windows.yml, which is scoped to v0.*/v1.* tags so v2.* tags only run build-v2.yml.

Since 2.1.0 (field-tested on real gear):

  • Arm removed entirely; Start is the only gate and the dimmer fader starts at 0.
  • Global Use DMX in, Dimmer mode (Manual / DMX in) and Beam mode (Manual / Auto size / DMX passthrough); faders with no effect are greyed out.
  • DMX-in has its own timeout; sACN-in source lock; DMX-in rate/age readout.
  • Explicit tickboxes for the shadow patch and console mode/marker control (universe 0 is a real Art-Net universe).
  • Full passthrough says why it outputs nothing.
  • PSN In receive table; per-channel DMX grid tooltips; calibration fine adjust.
  • build-v2.yml now runs on main (paths v2/**) instead of v2/redesign.

See v2/CHANGELOG.md.

Testing

  • v2/tests pass (200 tests, offscreen Qt)
  • python -m unittest discover -s tests -v (v1 suite, untouched by this change)
  • GUI starts successfully (run on Windows by the author on 2.2.0)
  • Tracking-loss blackout still works (covered by tests)
  • Dimmer output still requires explicit arming (v1 only; v2 removes arming by design)
  • New protocol behaviour has test coverage (sACN source lock, PSN decoding, control model)

Fixture or protocol details

2.2.0 and later were run by the author against a real console and ELC node (sACN in, Art-Net/sACN out). Not exercised by automated tests: real fixtures, real console merge behaviour.

🤖 Generated with Claude Code

https://claude.ai/code/session_01N1mKoJCmbZntHA98Tu85Qt


Generated by Claude Code

Brady Fulham and others added 30 commits September 18, 2026 16:22
Not wired into the shipped v1 app in any way -- fart.py at the repo
root is untouched, v1's tests and CI are unaffected. This is the
first phase of the plugin-architecture redesign discussed and agreed
on: engine + bus + plugins, verified working headlessly, before any
UI is built on top.

Structure:
- fart/bus.py: TrackerBank, FaderState, ExternalInputBus -- the shared
  state that lets multiple consumers (fader value, every fixture's
  console-relay channels) read one input plugin's data without each
  needing their own socket.
- fart/config.py: new nested Settings schema (psn_in/dmx_in/dmx_out/
  fader/fixtures, grouped by concern instead of one flat dataclass),
  plus migrate_v1() mapping an existing v1 FART.json onto it.
- fart/engine.py: all tracking/aim/safety math ported from v1 with
  behaviour preserved, plus run_cycle() -- an explicit, testable
  replacement for what used to live inline in v1's App.loop().
- fart/runner.py: headless orchestration wiring configured plugins to
  the engine. No UI dependency at all.
- fart/plugins/: psn_in (ported), artnet_in (new: single unified
  listener, this is what actually fixes the v1 port-6454 bug -- see
  v2/README.md), artnet_out (ported), sacn_in (NEW -- v1 had no sACN
  input), sacn_out (hand-rolled, replacing the third-party `sacn`
  package dependency), open_dmx_out (ported).

Two deliberate scope cuts from the earlier design discussion: OSC
support removed entirely (fader source is now just manual or
DMX-in), and only one DMX-in/DMX-out protocol is ever active at a
time (Settings.dmx_in.active / dmx_out.active), with both protocols'
settings still persisted so switching doesn't lose configuration.

Verification (40/40 tests passing, stable across repeated runs):
- Every plugin has a real UDP socket test, not just parse/build round
  trips through pure functions -- including real multicast loopback
  for the hand-rolled sACN implementation, which nothing in this
  project has ever exercised before. The E1.31 byte layout (both
  parsing and building) was independently checked against the
  reference `sacn` library's actual source before writing any of it.
- A full Runner-level integration test sends real PSN packets and
  checks the resulting Art-Net/sACN output against independently
  computed expected pan/tilt -- proving the whole pipeline, not just
  each piece in isolation.
- Along the way, found and fixed a real design gap: Runner was
  starting the control-input plugin unconditionally even when nothing
  needed it (no console-relay fixture, fader not DMX-sourced),
  needlessly binding a port. Added dmx_in_is_needed() and gated on it,
  plus made every input plugin's stop() join its thread before
  returning instead of just closing the socket, since a quick
  stop-then-start could otherwise race the OS for the port.

Not yet ported/built: any UI (PySide6 planned), the calibration
solver, GDTF import, and no real Open DMX hardware to test against.
See v2/README.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
fart/calibration.py: solve_fixture_calibration and its helpers
(_solve_3x3, _direction_from_bearing_elevation, _closest_point_to_lines),
ported from v1 with behaviour unchanged.

fart/gdtf.py: import_gdtf_channel_mapping and all its helpers, ported
from v1 with behaviour unchanged, minus select_gdtf_mode -- that's a Tk
dialog (UI concern), not import logic, and doesn't belong here. Callers
of list_gdtf_modes()/import_gdtf_channel_mapping() are responsible for
asking the user which mode when a GDTF has more than one, same as v1's
preferred_mode parameter already assumed.

Tests carried over directly from v1's suite (same fixture geometry, same
synthetic GDTF file) confirm both produce identical results to v1.

44/44 tests passing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Six tabs (Operator, PSN In, DMX In, DMX Out, Fixtures, Calibration)
wired to the existing engine/plugin/runner layer, replacing v1's
Tkinter front end. DMX In/Out show only the active protocol's
settings via a QStackedWidget switched by mutually-exclusive radio
buttons, while still saving the inactive protocol's settings in the
background.

Includes a QTest-based UI test suite (real synthesized clicks/typing
against real, shown widgets, run offscreen) covering fixture
add/edit/remove, DMX In protocol switching, start/stop and arm, and
one live end-to-end pass with real PSN packets over loopback. Full v2
suite: 52/52 passing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Real Runner + real plugins + real sockets (no mocks), covering what
test_runner_integration.py didn't yet: console-relay auto-mode
passthrough of dimmer/beam channels, manual-mode full passthrough,
fader sourced from DMX in, and the safety fallbacks (tracking loss,
console loss during manual, unarmed) -- for both DMX-in/out protocol
pairings.

One test documents a real, confirmed limitation found while writing
these: SACNInPlugin only ever joins the single multicast group named
by dmx_in.sacn.universe, so a fixture whose console relay lives on a
different sACN universe silently and permanently loses console data
(reads as console-lost -> blackout) even though a real console is
broadcasting for it. Art-Net-in has no such limit since it accepts
every incoming universe without needing a per-universe join.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
SACNInPlugin previously joined only the single multicast group named
by dmx_in.sacn.universe, so a fixture whose console relay lived on
any other output universe silently and permanently read as
console-lost -> blackout, even though a real console was genuinely
sending it. Found and confirmed with a real end-to-end test while
doing a full pass over console-relay behaviour.

Fixed by computing every universe actually needed (each enabled
fixture's own output_universe with console relay configured, plus the
master fader's DMX-in universe when sourced from it -- new
engine.dmx_in_universes_needed()) and having SACNInPlugin join a
group per universe instead of just one. Art-Net-in never had this
problem since it accepts every incoming universe without needing a
per-universe join; it now just accepts (and ignores) the same
`universes` argument for a uniform ControlInputPlugin interface.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds a PyInstaller spec (v2/FART.spec, packaging "FART2" so it can
sit alongside a v1 install without overwriting it), a run_fart.py
entry point, and requirements-dev.txt, mirroring v1's packaging setup
but scoped entirely to the v2/ subdirectory.

Bugs found and fixed while actually building and launching the real
packaged app (not just trusting a clean PyInstaller exit):
- Pointing PyInstaller directly at fart/__main__.py ran it with no
  parent package, breaking its relative imports
  ("attempted relative import with no known parent package"). Fixed
  by adding run_fart.py, which imports fart.__main__ properly instead
  of executing it as a bare script.

New workflow (build-v2.yml) builds and tests both platforms, and on a
v2.* tag creates a GitHub pre-release with both zips attached -- kept
in its own file rather than extending build-windows.yml since it
builds an entirely separate app from a different subdirectory.
build-windows.yml's tag trigger is narrowed from "v*" to "v0.*"/"v1.*"
so a v2.* tag doesn't also fire v1's release job against the same tag.

Bumped v2's APP_VERSION from "2.0.0-dev" to "2.0.0".

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…them

GitHub's hosted macOS runner has no route to any multicast destination
at all -- every real multicast sendto() in the test suite fails
immediately with ENETUNREACH/EHOSTUNREACH there, even though the same
sends work fine over loopback on a normal dev Mac and on GitHub's
Windows runner.

First attempt at a fix (explicitly pinning the outgoing interface to
127.0.0.1) made things worse: verified live that it actually breaks
real multicast delivery on a normal Mac, which was masked because I
hadn't rerun the full suite locally before pushing. Reverted that.

Correct fix: catch that specific errno at the sendto() call and raise
unittest.SkipTest instead of letting it crash the test as an error --
this is an environment capability gap, not a product bug, so tests
skip cleanly wherever real multicast routing isn't available and run
exactly as before everywhere it is (confirmed 60/60 still pass
locally, where the skip path is never hit).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Removes MainWindow.set_setup_tabs_enabled() entirely -- users found
the lock annoying (e.g. wanting to check fixture settings without
stopping output first). Setup tabs now stay usable while running;
edits apply on the next output cycle, though switching DMX in/out
protocol still needs a stop/start to actually reconnect sockets.

Adds a live 512-channel status grid (dmx_channel_grid.py, 32x16 like
Artnetominator) to both DMX In and DMX Out tabs:
- DMX In reads straight off ExternalInputBus.snapshot() (new) for a
  user-chosen universe -- works as a plain protocol monitor
  independent of any fixture.
- DMX Out reads the literal last frame the Runner sent
  (Runner.live["out_frames"], new), not a recomputation.
Both refresh from MainWindow's existing 100ms UI timer.

Verified with real sockets (test_ui.py): sent a real Art-Net packet
and confirmed the DMX In grid shows the exact received bytes; sent
real PSN and confirmed the DMX Out grid shows the fixture's actual
computed pan/tilt bytes. The DMX In test needed a non-default
universe -- this dev network has genuine Art-Net traffic on universe
0, which the receiver correctly picks up since it binds all
interfaces (not just loopback), same as it must in real use.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Shows each fixture's actual live console-relay state at a glance:
"Auto"/"Manual" (resolved from its console_mode_channel) and the
live-selected marker id (resolved from its console_marker_channel),
or "—" for both when a fixture has no console relay configured at
all -- distinct from an actual resolved value, so a plain fixture
doesn't show a misleading "Auto".

run_cycle() now carries "dmx_mode"/"dmx_marker" through all three of
its status-dict exit points (manual full-passthrough, normal
success, and the ValueError fallback) so the UI never has to
re-derive them.

Verified end to end with real sockets: a fixture with console relay
configured shows the exact mode/marker a real Art-Net console packet
selected; a fixture without relay configured always shows "—".

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Real console patching model instead of one flat dataclass with ~14
raw absolute DMX channel numbers per fixture:

- FixtureType (config.py): a reusable personality -- channel offsets
  within the fixture's own footprint (not absolute numbers), total
  footprint size, and physical properties (pan/tilt range, beam
  model, reverse flags, intensity scale). Define once, patch as many
  instances as needed.
- FixtureConfig instance: position, calibration, and three
  independent DMX patches (universe + start address each) -- output,
  a console "shadow" feed of the fixture's entire real footprint, and
  a small mode/marker control block. These can all live on completely
  different universes now, fixing the actual conflict: DMX In and DMX
  Out no longer have to share a universe number.

engine.py: resolve_fixture() merges an instance with its type into a
ResolvedFixture (concrete absolute channels) for calculate_aim/
write_fixture_to_frame, unchanged otherwise. New
copy_shadow_into_output() copies a fixture's *entire* footprint from
its shadow patch into its own slice of the output frame every cycle
-- not the whole universe, so fixtures sharing an output universe
never affect each other's shadow feed -- before FART overwrites only
what it actually owns (pan/tilt always, dimmer always in auto mode,
zoom/iris only when auto-beam-size is on). Manual mode now works by
skipping FART's writes entirely, since the shadow copy alone already
is the full passthrough; intensity_passthrough is removed from
write_fixture_to_frame since dimmer is never passed through anymore
in auto mode.

fixtures_tab.py: a Fixture Types library (add/duplicate/remove/
import-from-GDTF) alongside the fixture list; picking a type shows
its channel offsets and physical properties, picking a fixture shows
its patch. Removing a type in use reassigns affected fixtures rather
than leaving a dangling reference. Also fixes a real rendering bug
found via an actual screenshot: _clear_editor() used deleteLater()
alone, which only schedules destruction for the next event-loop pass
-- within the same call stack (list-selection signals firing during
__init__, followed by an explicit load call) old widgets stayed
visible and overlapped the new ones. Fixed with setParent(None) for
immediate detachment.

calibration.py/calibration_wizard.py: pan_min/pan_max now live on the
type, not the instance -- passed in explicitly to
solve_fixture_calibration() rather than pulled off the fixture.

gdtf.py: import_gdtf_channel_mapping() now also derives a `footprint`
(highest channel offset anywhere in the mode, not just channels FART
classifies) so a shadow patch can bring across a fixture's full
channel count, not just the ones FART drives.

migrate_v1() (config.py) now splits every pre-v3 fixture (v1's flat
FART.json, or v2's earlier flat-fixture FART2.json) into a generated
FixtureType + slim instance, defaulting all three patches to the
fixture's old shared output_universe for lossless migration -- console
relay keeps working exactly as before until the user actively splits
the patches apart onto different universes.

67/67 tests passing, including a full rewrite of the console-relay
integration suite using genuinely different universes per patch to
prove the redesign's actual point, and real visual verification of
the new Fixture Types UI (which caught and fixed the rendering bug
above).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
currentRowChanged only fires when the list's current-row index
actually changes. With only one fixture (or when re-clicking the
same fixture after the editor had switched to showing a fixture
type, e.g. from duplicating a type), the Fixtures list's current row
never changes on click, so the signal never fires and the editor
panel stayed stuck on whatever was loaded last -- looking to the user
like selecting a fixture did nothing at all.

Fixed by also connecting itemClicked (fires on every click,
regardless of whether the row index changed) on both the fixture and
type lists, alongside the existing currentRowChanged (still needed
for keyboard arrow-key navigation and programmatic selection).

Found via a real user report and reproduced exactly: removed down to
one fixture, duplicated a fixture type (switches editor_mode to
"type"), then clicked the one (already-current) fixture -- editor
stayed on the type view before this fix, correctly switches back
after. Regression test added.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…stamps

run_cycle()'s console-relay staleness check compares cycle_start
against ExternalInputBus timestamps, which are always stamped with
real time.monotonic() (bus.update() has no way to accept a fake
clock). These tests passed a hardcoded cycle_start=100.0 while
calling bus.update() for their console/shadow frames, silently
relying on the test machine's monotonic clock already exceeding 100
seconds by the time the test ran.

On a freshly-booted CI VM (GitHub's macOS runners are provisioned
fresh per job) that assumption can be false, making every console
frame look instantly "stale" (cycle_start - real_timestamp becomes a
large positive number instead of ~0), which silently skips the
manual-passthrough branch and forces auto-mode blackout. Caught when
cutting the v2.0.1 tag: the exact same commit had just passed on the
branch-push run minutes earlier, then failed on the tag-push run on a
different, more freshly-booted runner -- classic real-clock-dependent
flake, not a real app bug (v1957282's release build failed on this;
no partial release was created since it needs both platforms).

Fixed by using time.monotonic() for cycle_start in these tests too,
so the comparison is always internally consistent regardless of
system uptime.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Both from real tester feedback on v2.0.1.

Bug: selecting multiple fixtures in the Calibration tab and opening
the wizard only showed one. _on_open_wizard() calls _refresh_list()
right before reading the selection (to pick up fixtures added/
renamed elsewhere), and _refresh_list() unconditionally reset the
list's selection to row 0 -- collapsing any multi-fixture selection
every time the wizard was opened. Fixed by preserving the selection
(matched by fixture name) across the refresh, only defaulting to row
0 when nothing was previously selected.

Feature: v1's calibration wizard had an "Add custom point" panel
(X/Y/Z entry + button) for calibrating against a point that isn't one
of the six defaults -- left out of the initial v2 port. Restored,
matching v1's behavior exactly (rejects non-numeric input via the
same error-dialog pattern the wizard already uses elsewhere, appends
a "Custom" entry, selects it so it's ready to capture against).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replaces the old "all fixtures visible, pick a point, manually aim
everything, capture" flow with what was asked for:

1. Setup screen -- choose default points (the existing 6) or enter a
   custom list (X/Y/Z + Add point, building the actual point list
   used for calibration, not just a one-off supplement to the
   defaults).
2. Guided screen -- one fixture, one point, at a time. Only the
   current fixture is lit (at whatever its sliders say); every other
   fixture -- already done or not reached yet, including ones sharing
   its output universe -- stays blacked out, since the output tick
   now only ever writes the active fixture's channels into an
   otherwise-blank frame. "Capture & Next" saves that fixture's aim
   for the current point and advances to the next fixture, cycling
   through every fixture before moving to the next point. "Back"
   undoes the previous capture so re-capturing doesn't duplicate it.
3. Done screen -- once every (point, fixture) pair is captured,
   "Solve and apply all" runs the existing solver per fixture.

Calibration output now starts/stops automatically with the guided
flow instead of needing separate manual buttons; a "Cancel /
blackout" button aborts back to setup at any point.

Verified with a real Art-Net output socket (not just internal state):
confirmed only the active fixture's dimmer is ever nonzero on the
wire at each step, and that it flips to the next fixture correctly on
Next, including two fixtures sharing one output universe.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…wizard

New "Aim (dial)" tab alongside the existing "Sliders" tab on each
fixture row: a top-down pan dial (drag the needle around a full
circle, 0 at top matching the app's own bearing convention) and a
side-view tilt arc (drag the needle through a semicircle below a
hung-fixture icon at the pivot, matching how most fixtures are
actually rigged). The needle is the control -- no separate slider
underneath it.

The tilt arc's range always matches the specific fixture's own
tilt_min/tilt_max (linearly mapped onto a fixed 180-degree sweep, so
an asymmetric range still lands its midpoint at the bottom) rather
than a generic -90..90 -- real fixtures vary widely, and letting the
dial suggest travel the fixture can't physically do would be
misleading. Pan stays a plain -180..180 dial: a fixture's real pan
range is often wider than 360 degrees, which a single-turn dial can't
represent without the same visual angle meaning two different pan
values.

The existing linear sliders remain the source of truth pan()/tilt()
already read from; the dial is just another control kept in sync
with them in both directions, verified with a real mouse press-drag-
release (not just calling setValue() directly).

fart/ui/pan_tilt_dial.py -- new custom QPainter widgets (PanDial,
TiltArc), reusable outside the wizard if needed later.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Previously the arc always normalized any tilt range onto a fixed
180-degree semicircle, so a wide range like -135..135 (270 degrees)
looked identical in shape to a narrow one. Tilt 0 now always points
straight down, and every other value is drawn at its real angle from
there, so the arc's visible width equals hi - lo.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The lo/hi labels were offset vertically based on the sign of the tilt
value rather than which side of horizontal the point actually landed
on, and positioned with a crude length*4 guess instead of real font
metrics -- both made labels drift away from their arc endpoints for
asymmetric or wide ranges. Also fixed a double-draw: when lo or hi is
exactly 0, the endpoint label and the separate "0" tick overlapped.

Labels are now centered on their true anchor point (same radial
direction as the arc endpoint) using QFontMetrics, and the "0" tick
only draws when 0 falls strictly between lo and hi.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
New "Browse GDTF Share..." button next to the existing local GDTF
import lets a fixture type be filled in from gdtf-share.com's catalog
instead of a downloaded .gdtf file.

The real API requires a login for every call, including just listing
the catalog (confirmed live: getList.php returns 401 with no session).
So login can't be deferred all the way to import as first hoped --
instead a previously fetched catalog is cached to disk and shown with
no login at all, and a real login prompt only appears the first time
this machine ever browses GDTF Share, or when Refresh/Import is used
after the session has expired. The password is stored in the OS
keychain via the new `keyring` dependency when a backend is available,
falling back to re-prompting each session otherwise; the username is
remembered in a small local file since it isn't sensitive.

fart/gdtf_share.py is the Qt-free client + credential storage (testable
with an injectable opener and a fake keyring backend, never touching
the real network or the real OS keychain). fart/ui/gdtf_share_dialog.py
is the browse/login UI, reusing the existing GDTF parsing pipeline
(gdtf.import_gdtf_channel_mapping) once a fixture is downloaded to a
temp file -- the parsing side needed no changes at all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Tested live against a real GDTF Share account for the first time.
Two real bugs turned up:

- getList.php wraps its response as {"result": true, "list": [...]},
  not a bare array -- GDTFShareClient.get_list() was returning the
  whole wrapper dict, so every "entry" the dialog normalized was
  actually one of its two string keys ("result"/"list"), producing
  two blank-looking rows no matter what the account actually had.
- The real per-fixture field names differ from the guessed ones:
  "uploader" is "Manuf." or "User" (not a rating-adjacent field),
  "rating" is a string ("N/A" or a numeric string, not a number), and
  each mode's channel count key is "dmxfootprint" (lowercase, no
  camelCase).

Also added a "Manufacturer-verified only" filter, checked by default:
the real catalog has ~12,900 entries and about two-thirds are
community uploads of wildly varying quality (some literally named
"1111111112"), so surfacing manufacturer-uploaded revisions first
matters in practice, not just in theory.

Verified end-to-end against the real account: login, list (12,857
entries, 4,547 manufacturer-verified), download, and channel-mapping
import all confirmed working on a real fixture.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- "Import from GDTF..." and "Browse GDTF Share..." now live under the
  Fixture Types list's Add/Duplicate/Remove row instead of inside the
  type editor form, acting on whichever type is currently selected in
  that list rather than needing the editor open to a type first.
- Dropped the "(revision)" text from each GDTF Share search result:
  on real data it's usually an internal build/measurement-date code
  like "(20230316NoMeas)", not a meaningful label -- confirmed by
  screenshot from testing against a real account, where it read as
  gibberish next to genuinely useful info (verified checkmark, rating).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…cted one

Both "Import from GDTF..." and "Browse GDTF Share..." now always
append a brand new Fixture Type (named from the imported file's
filename, or the GDTF Share manufacturer + fixture name) rather than
overwriting whichever type happened to be selected in the list --
silently clobbering an existing type's channel mapping because it was
still selected is an easy, hard-to-notice mistake to make with a
top-level button that isn't scoped inside that type's own editor.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ion)

First step of the GDTF flow redesign: switches the settings file from a
plain JSON file to a zip container (~/FART2.fart), with config.json
plus one gdtf/<type id>.gdtf entry per GDTF-backed FixtureType. This is
what makes a saved file fully self-contained -- no external library
folder to keep in sync, no shared store two show files could collide
over; format is detected by content (zipfile.is_zipfile), not by
filename, so an older plain-JSON FART2.json/FART.json still loads.
MainWindow falls back to that legacy path once, on a fresh install with
no .fart file yet, then always saves back out as the new format.

FixtureType gains gdtf_data (the actual .gdtf bytes, non-empty marks a
type as GDTF-backed -- no separate flag), gdtf_origin, gdtf_share_rid,
gdtf_source_label. FixtureConfig gains gdtf_mode: mode selection lives
on the patched instance, not the type, since two fixtures sharing one
GDTF-backed type can run different modes.

Nothing yet derives per-mode channel data from gdtf_data or changes the
GDTF import/browse flows to populate these fields -- that's next.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… mode

Second step of the GDTF flow redesign, on top of the .fart container
from the previous commit.

gdtf.py now parses from raw bytes as well as a file path (zipfile
accepts a file-like object directly), and gains derive_all_modes():
every DMX mode a file declares, each mapped to its own channel data --
a mode with nothing FART recognises maps to {} rather than vanishing,
since it still needs to be a selectable option.

engine.resolve_fixture branches on FixtureType.gdtf_data: a GDTF-backed
type's own stored channel fields are ignored entirely (they're not
meaningful for that kind of type -- only the instance's selected
fixture.gdtf_mode is), and the selected mode's derived data is overlaid
onto an all-disabled baseline rather than either the type's own stale
fields or FixtureType's convenience "channels 1-5" defaults (meant for
a brand-new custom type, not a safe "nothing here" baseline). Parsing
is cached on the type object (keyed by gdtf_data identity) since
resolve_fixture runs every cycle for every fixture. ResolvedFixture
gains a footprint field so run_cycle's shadow-patch sizing follows the
selected mode's real footprint instead of a stale/coincidental value
computed from the type's own unused fields.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Final step of the GDTF flow redesign, on top of the previous two
commits (the .fart container and per-mode derivation/resolution).

Both import paths ("Import from GDTF..." and "Browse GDTF Share...")
no longer ask which DMX mode to use at import time -- there is nothing
left to extract or choose there. They just validate the file parses
(list_gdtf_modes) and store the whole thing as a new FixtureType's
gdtf_data, named from the local filename or the GDTF Share manufacturer
+ fixture name. GDTFShareBrowseDialog's mode picker is gone too, replaced
with a plain "available modes" label -- selection happens later.

The Fixture Types editor now shows a GDTF-backed type's channel/range/
beam fields as disabled (still visible, since they're useful context
computed from the real file) alongside a "GDTF source" panel and a
"Convert to custom copy" button that bakes one chosen mode's values
into a brand new, fully editable type without touching the original.
Only the display name stays editable on the type itself.

The per-fixture instance editor gains a "GDTF DMX mode" dropdown,
shown only when that fixture's type is GDTF-backed, bound to the new
FixtureConfig.gdtf_mode field -- matching the earlier decision that
mode selection belongs on the patched instance, not the type, since
two fixtures can share one type while running different modes.
Switching a fixture's type via its own combo now reloads the editor so
this row appears/disappears/repopulates correctly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…out and sACN source lock

- Remove Arm completely (Runner.armed, run_cycle param, Operator checkbox,
  DIMMER LOCKED wording). Start is the only gate; the manual dimmer fader
  resets to 0 on every Start.
- Settings: use_dmx_in, dimmer_mode (manual|dmx_in), beam_mode
  (manual|auto_size|dmx) replace zoom_mode and the DMX master-fader source.
  Old files migrate (zoom_mode -> beam_mode); fader source is dropped.
- Dimmer in DMX-in mode passes through from the shadow feed but is still
  forced to 0 by tracking-loss / console-loss / marker-change blackouts.
  Fixtures with no shadow feed fall back to the faders and say so.
- DMX-in gets its own timeout (default 3 s) instead of reusing PSN's.
- sACN-in locks onto the highest-priority source per universe, drops
  duplicate/late packets, honours stream termination, ignores non-zero
  start codes. Operator tab shows per-universe packet rate and age.
- Faders with no effect are greyed out.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1mKoJCmbZntHA98Tu85Qt
- DMX In/Out channel grid: every cell's tooltip is now 'Channel N = value'
  instead of a row/column formula.
- PSN decoder keeps every tracker field it receives (speed, orientation,
  acceleration, target, status, timestamp, names) instead of stopping at
  position; TrackerBank records them plus per-tracker receive rate.
- PSN In tab: live table of every tracker seen, used by fixtures or not.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1mKoJCmbZntHA98Tu85Qt
…udge, Shift fine-drag)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1mKoJCmbZntHA98Tu85Qt
…l model

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1mKoJCmbZntHA98Tu85Qt
…otprint 0 / no feed yet)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1mKoJCmbZntHA98Tu85Qt
…ol; 2.2.1

Universe 0 is a real Art-Net universe, so 'universe 0 = off' could not be
enabled. Old patches are inferred once; the saved switch is authoritative.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1mKoJCmbZntHA98Tu85Qt
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N1mKoJCmbZntHA98Tu85Qt
@bfulham
bfulham merged commit b31f6c9 into main Oct 16, 2026
6 checks passed
@bfulham
bfulham deleted the v2/redesign branch October 16, 2026 05:26
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