Feature/ttl control#98
Draft
MoritzFS wants to merge 4 commits into
Draft
Conversation
Adds server-side control of the 32 Zedboard FPGA TTL output channels. Each channel can be set to OFF (forced LOW), ON (forced HIGH), or CONTROL (pulse-sequence driven) using the ttlMasks / setTTLMasks RPC calls. Mask state is persisted to SQLite so it survives hardware power cycles. Changes: - TTLController (pydase.DataService) registered on APIService as .ttl - TTLRepository + ttl_mask_states SQLite table (alembic migration) - HardwareController.get_ttl_masks() / set_ttl_masks() wrappers - HardwareConfig.n_ttl_channels config field (default 32) - 19 unit tests covering mask encode/decode and controller logic - docs/ttl_server_implementation.md design reference Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…utton UX Adds a dedicated /ttl page with 32-channel grid. Each channel mirrors ionizer's ControlButton (blue=FPGA, grey=manual) + StateButton (green=ON, red=OFF) layout. StateButton retains its value when in CONTROL mode and applies it on switch-back, matching ionizer behaviour exactly. Also adds server-side label persistence (TTLController.get_labels/set_label, labels column on ttl_mask_states via migration b2c3d4e5f6a1). Labels are editable inline via double-click and persisted to SQLite. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Points down_revision to the actual HEAD of main's migration chain instead of the branching point fc9af856df20. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add sqlite database entry and n_ttl_channels to test config, gitignore local config overrides, and rebuild frontend bundle with TTL page included. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
While this is nice, ICON client and server should not become hardware/device specific. I see three options to include this functionality, which more generally could be device configuration:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TTLControllerpydase service exposing per-channel state control (0 = forced LOW, 1 = forced HIGH, 2 = pulse-sequence CONTROL) backed by SQLite persistence andHardwareControllerraw RPC calls to the Zedboard (
ttlMasks/setTTLMasks)/ttlpage with an ionizer-style two-button-per-channel panel (ControlButton + StateButton), editable custom labels persisted server-side, and real-time updates viattl.update/ttl.label_updateSocket.IO eventssqlitedatabase entry andn_ttl_channels: 32totests/config.yaml; local config overrides are gitignored viatests/config.local.yamlTest plan
uv run pytest tests/— all green including new TTL unit testsuv run alembic upgrade headthenuv run alembic downgrade -1— migration round-trip clean/ttl— 32 channels appearttl.updateevent updates other tab in real time