| Age | Commit message (Collapse) | Author |
|
Arduino analog Signal ids used to be the pin name itself, so fixing a
wrong pin silently changed the id and orphaned any plot trace, control,
or filter pipeline pointing at it. Analog Signal ids are now positional
(ai0, ai1, ...) and decoupled from the underlying pin, matching how
digital I/O already worked.
More broadly, formalizes a Device -> Signal -> Channel -> Plot naming
model (SignalConfig for physical device channels, Channel for derived/
computed ones) and adds core/reference_registry.py to propagate any
Signal or Channel id rename through plot traces, controls, and filter
pipelines instead of leaving them dangling. Signal ids are now editable
in the Signals tab with the same propagation.
.labui profile schema bumped to v2.0 with a transparent migration for
old files, including remapping old pin-name Signal ids to the new
positional ones. Removed six confirmed-dead files (two legacy device
classes, four superseded top-level ui/ duplicates).
|
|
|
|
ControlWidget._write() called dev.write_channel() directly on the GUI
thread from Qt signal handlers — for CML (CoolMuscle), write() does 2-3
blocking serial round-trips, and a slider fires valueChanged on every drag
tick, so each tick froze the whole app until the device responded or timed
out. Replaced with a coalescing background dispatch: writes are keyed by
(device, channel) in a dict instead of a plain FIFO queue, so re-writing
the same channel while a write is still pending updates its value in place
rather than piling up — a strict FIFO was observed backing up 30+ deep
during a single drag, meaning the motor kept "moving" to seconds-old
positions long after the slider stopped, which looked like a freeze even
once off the GUI thread.
Separately, the motor never actually moved because it was never enabled:
per docs/CM1-C_ASCII_Command_Cheatsheet.md, a CM1-C motor stays disabled
("shaft free") until sent "(", and nothing in CMLLayer.write()'s VS/MA
handling ever sent it — enable only existed as a separate M1_ME channel
the generic MotorControl widget has no concept of. VS/MA now send enable
unconditionally before the move sequence (a no-op if already enabled).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
Several compounding freeze sources in plugins/motion_capture/:
- tracker.py: _run_real had no frame-rate cap independent of the camera's
configured fps (up to 120fps/2560x1440 was possible), and no bound on
consecutive failed reads — a camera that "opens" (cv2 isOpened() can lie,
seen with Windows MSMF/obsensor) but never actually delivers frames would
get hammered forever. Added a 20Hz processing cap, a real test-read before
committing to a camera, and a give-up-after-30-failures fallback to
simulation.
- tracker.py/device.py: cv2.VideoCapture() opening a real camera is a slow,
blocking call — CameraTracker.start() used to do this synchronously on
the caller's thread, which froze the whole app when ProfileManager.apply()
called it during profile load. Now runs on the background thread; status
reporting (CameraDevice) moved to an on_result callback since the caller
can no longer learn the outcome synchronously.
- window.py: the Camera View preview ran a 30Hz GUI-thread timer doing a
full-frame copy + QImage/QPixmap rebuild every tick unconditionally (no
visibility check) — dropped to 10Hz and skips entirely when hidden.
Camera enumeration (list_cameras(), up to 8 sequential cv2.VideoCapture
probes) also ran inline in the window constructor, blocking it open the
same way camera_panel.py's CameraScanThread already avoided for the Add
Device dialog — moved to the same async pattern here.
config_window.py: separately, ConfigWindow._dev_poll (device status label
refresh) was stopped in closeEvent and never restarted, since MainWindow
reuses the same ConfigWindow instance across opens — invisible before
because connect() was synchronous, but with the above change a device can
sit in CONNECTING for a while, and a stale poll made that look stuck
forever after reopening the window. Restart it in showEvent.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
Windows/Linux self-register via core/file_association.py (winreg /
XDG .desktop+mime), triggered from a new Settings button since there's
no installer to do it at install time. macOS gets it at build time via
labui.spec's new BUNDLE() step (CFBundleDocumentTypes in Info.plist) —
that step also makes mac builds a real .app bundle for the first time,
not just a bare onedir folder. main.py gains a LabUIApplication
subclass to catch the macOS QFileOpenEvent (buffered if it arrives
before MainWindow exists) plus argv[1] handling for Windows/Linux.
ProfileButton.load_path() extracted so both paths share the same
load-and-apply logic as the existing file-dialog flow.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
Channel ID renames
Generalized the Plot pane drag-to-reorder (_PaneDragHandle/_PlotDropContainer
-> _DragHandle/_DragReorderContainer) and reused it for the Channels tab's
derived-channel list; reordering also updates SignalProcessor's evaluation
order (list order matters for chained Channels) via new reorder_derived().
Namespace panel: added an ID column (bare channel_id, matching the actual
channels.get(...) script convention) and fixed the Source column for
Channels to show resolved absolute references (dev_id/ch_id for a Signal,
bare id for a chained Channel) instead of the operation kind, so a chain
is traceable by eye.
Fixed a real bug this surfaced: renaming a Channel's ID never propagated
to other Channels' sources, leaving dangling ("derived", old_id)
references that silently stopped updating. Added
SignalProcessor.rename_derived() to fix up sources plus carry the ring
buffer/latest-value cache to the new key, wired to DerivedBlock's Apply.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
Devices tab split into Physical Devices (left) / Signals (right); Channels
tab now hosts the Namespace browser (left) alongside Channels (right,
larger by default). Plot Builder panes gain drag-to-reorder (same mechanics
as ControlPanel's widget list, adapted for the editable pane title via a
dedicated grip icon), "+ Add Channel" moved beside Size for a more compact
row, and Min/Max/Size/line-width spin boxes widened so values no longer
overlap the up/down arrows.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
- Split device tab into pysical devices and signals.
- Replaced old Signals panel (under Channels tab) with namespace.
to make Channel creation easier.
|
|
machine
COM/tty numbers aren't stable across machines or replugs. Devices now save
their USB serial number and OS description alongside the port; on profile
load, if the saved port isn't present, ArduinoLayer.find_port_by_identity()
looks for a match and remaps it. Falls back to the saved port (device shows
ERROR) if nothing matches.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
|
|
|
|
- Removed log file and plugin enabled states.
- Updated esp32_stringPot.ino: added time delay for config screen
and group declaration together.
|
|
git add silently staged nothing from the previous attempt because one
pathspec in that batch (scripts/release/repository, already moved) no
longer existed — only the .gitignore-adjacent renames landed. This
commit adds what was actually meant to go in:
- core/updater.py: releases/download/updates-<platform>/ instead of a
single shared updates/ tag.
- labui.spec: bundles root.json from this platform's own tree.
- scripts/release/repo_init.py, repo_release.py: auto-detect platform,
operate inside scripts/release/<platform>/.
- .gitignore: per-platform ignore rules (previous commit only carried
the file renames, not this).
- docs/building.md, scripts/release/README.md: rewritten for the
per-platform flow.
- Also picks up pre-existing local TUF re-signing (new snapshot/
timestamp signatures, bumped expiry/version) that was sitting
uncommitted before this restructuring started.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
PyInstaller doesn't cross-compile and TUF metadata filenames aren't
platform-prefixed, so a shared updates/ release and repo tree can't
safely hold more than one OS's build — a second platform's publish
would silently overwrite the first's trust root and metadata.
- scripts/release/repo_init.py, repo_release.py: auto-detect platform
(win/mac/linux) and operate inside scripts/release/<platform>/ instead
of a flat scripts/release/ tree.
- labui.spec: bundles root.json from this platform's own tree.
- core/updater.py: points at releases/download/updates-<platform>/
instead of a single shared updates/ tag.
- Moved the existing real keystore/repository/config (already used for
a live Windows release) from the old flat path into
scripts/release/win/ — same keys, same signed metadata, just
relocated. No new keys generated, existing installs still trust it.
- .gitignore updated for the per-platform paths, plus temporary rules
covering the old flat path during migration.
- docs/building.md, scripts/release/README.md: rewritten for the
per-platform flow, including a note that Linux builds should happen
on Linux/WSL2 (no cross-compiling) and that a bare .exe doesn't
belong on the updates-<platform> release — only the TUF metadata +
signed target archive do.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
Root cause of "QFont::setPointSize: Point size <= 0 (-1)" on some
dropdowns: the app never sets an explicit widget style, so it defaults to
native windowsvista, whose popup code calls setPointSize() on fonts
resolved from our QSS's pixel-based font-size (pointSize() is -1 by
design for px fonts). Tried app.setStyle("Fusion") first — silences it,
but Fusion doesn't render buttons/dropdowns to match the QSS the way the
native style does. Kept native style, filtered just that one message via
qInstallMessageHandler instead — it's cosmetic Qt console noise (the
rejected setPointSize call is a no-op, doesn't affect rendering), not a
real bug.
Also adds a handful of tooltips (Control Editor's Check Syntax/Cancel/
Create Control, device Configure dialog's Close, main toolbar's View/
Configure/RUN/LOG/Settings, a few Control Panel widgets) from an
in-progress app-wide tooltip pass, paused partway through by request —
remaining buttons are being done manually.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
|
|
- Renamed LabDAQ to LabUI in main script
- Removed dubplicate separator when plugins are enabled
|
|
New right-docked panel (mirrors Control Panel's dock, opposite side)
listing every Signal, Channel, and shared `vars` key currently in the
profile, with live values and a double-click-to-copy reference snippet
(vars.get(...) / channels.get(...)) for use in scripts. Closed by
default — opt-in config tool, no collapse-strip nag like Control Panel
gets since it's not needed mid-run.
Also moves Configuration out of the View menu into its own toolbar
button, and makes table row hover match the selection highlight color.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
Devices: auto-name from OS-reported port description (Device Manager /
udev string) instead of a generic label; default Serial #Channels 1;
consistent simulate-mode checkbox across backends; inline device rename.
Channels: calibration/filters move out of Signals into a Channel
"Operation" (adds Scale/Offset alongside the existing math kinds);
single-physical-source Channels get an embedded Filters block; new
Channels auto-name/auto-ID from their source and reject duplicate
names/IDs on apply; "Create Channel" button on each Signal row; renamed
"Sources" -> "Signals" in the Channels UI; Signals' READ/WRITE dir badge
(was silently-broken IN/OUT) now reflects the real writable flag.
Plot: default layout is one pane per Channel (not per device, not raw
Signals) titled by channel name; "+ Add Channel" is a checkbox dialog
instead of an inline dropdown; traces get up/down reorder; live unit
changes (e.g. a Mark-10 gauge switching lb/kgF/N/ozF) propagate to an
open pane's axis label without clobbering a manually-typed one.
Control Panel: hardware assignment now picks from the same writable-
Signals list instead of a separate device/channel combo with a
hardcoded Arduino pin list; stale visual indicator when a control's
target device/channel disconnects or disappears; documented the `vars`
bridge (Control Panel On Action Script <-> Channel scripts) in both
directions' help text and script templates.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
|
|
|
|
- Moved arduino file to sub-directory.
- Updated esp32_stringPot low-pass filter from EMA to butterwoth.
|
|
- Renamed and moved arduino firmware into it's own sketch for arduino
compiling interface.
- Added esp32 firmware for stringpotentiometer.
|
|
|
|
|
|
|
|
amp+offset spanned the full [0,5] clamp range edge-to-edge, so
per-sample noise pushed past the rails on every peak/trough and got
hard-clamped into a flat plateau. Shrinking amp gives ~8.7 sigma of
headroom so the clamp stays a safety net instead of firing every cycle.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
Batches per-tick device readings into one signal emit instead of one
per channel, evaluates derived channels once per tick instead of once
per raw sample, and makes ChannelBuffer.window() cost scale with the
window size instead of total buffer history. Strip chart X-range now
scrolls on an independent ~30fps timer instead of only snapping when
new data lands, which was the main visible cause of the stutter.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
- Moved edit and X button to top with header of widget.
- Replaced up/down button with drag-and-drop style headers.
|
|
disappear and no sidebar panel.
Possible future implementation.
|
|
|
|
Debug button, DebugWindow, and the stdout/stderr tee (core/debug_log.py)
weren't wanted. developer_mode toggle stays — still gates device
Simulation Mode checkboxes and verbose terminal logging.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
protocol updates
origin/main (23 commits) added a Debug window/log system on top of the old
separate Devices/Channels/Plot windows, plus protocol fixes (cml, mark10,
modbus_rtu, scpi) and device/profile changes. Local main (3 commits)
replaced the separate windows with a unified ConfigWindow + dock panel.
Kept local's ConfigWindow/dock architecture and ported the Debug window
onto it: new toolbar button + _open_debug(), gated by developer_mode same
as origin's version. Deduped the two independent "developer mode" toggles
that had collided in SettingsWindow (origin's General-tab checkbox gating
Debug window + device sim-mode visibility, local's Advanced-tab checkbox
setting verbose logging) into one General-tab checkbox that does both.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
Consolidation of Devices/Channels/Plot into ConfigWindow left the
Settings button wired to a method that no longer exists.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
Replaces three separate floating windows with single tabbed ConfigWindow:
- Tab 0: Devices (device cards, add/remove/configure)
- Tab 1: Channels (signal table with Dir/IN/OUT badge + pipeline ⚙ per row; derived channels pane)
- Tab 2: Plot (layout canvas + pane config)
Adds is_output field to ChannelConfig for output channel direction badges.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- Added dedicated firmware file for arduino
- Added View button to consolidate windows
- Control Panel changes:
- Changed name fron "Controls" to "Control Panel"
- Blue side bar when Panel is hidden.
- Supports "popping" out contorl panel
- Settings > Advanced tab added with developer settings
|
|
Branding:
- Rename app, window title, file extension (.labdaq → .labui), user data
dirs (~/.labui/), spec file (labdaq.spec → labui.spec), and APP_NAME
throughout all source, docs, and config files
Plugin system:
- Plugins no longer bundled in the PyInstaller build — installed at
runtime by users via Settings → Plugins → Install Plugin (zip)
- PluginManager now takes user_dir + extra_scan_dirs; user plugins live
in ~/.labui/plugins/, dev scan additionally covers project plugins/
- install_from_zip / uninstall / is_user_installed added to PluginManager
- vendor/ dir inside plugin zips: prepended to sys.path at load time so
plugins can ship their own deps without requiring pip on end-user machine
- source_url field in manifest.json: shown as Download button in the
missing-plugins dialog when a profile requires an absent plugin
- Frozen-app pip install now targets ~/.labui/plugin_packages/ using a
real system Python (sys.executable is the exe in frozen builds)
Profile loading:
- Profile now stores plugins_manifest snapshot (id, name, version,
source_url) alongside plugins_enabled
- On load, missing or dep-broken plugins trigger MissingPluginsDialog
before the rest of the profile is applied; user can install from zip
or download via source_url in-dialog, or cancel the load
- Plugin reconciliation only enables installed plugins — missing ones
are not written to enabled.json
UI:
- Version label added to status bar (bottom-right, muted colour)
- Settings → Plugins tab: Install Plugin… button, per-plugin Remove
button for user-installed plugins, live list refresh after install/remove
Docs:
- New docs/building.md covers the full release pipeline
- docs/plugin-development.md updated for new install flow, vendoring,
source_url, profile behaviour, and distribution instructions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Full pipeline, verified end-to-end against the real installed tufup
0.10.0 API (initial docs/summaries turned out inaccurate in places —
e.g. the apply method is download_and_apply_update, not update;
confirmed by inspecting installed package source directly rather than
trusting docs alone):
- core/version.py: single-source app version constant.
- labdaq.spec: PyInstaller onedir build (must be onedir, not onefile —
tufup replaces individual files in the install dir on update).
Bundles ui/*.qss, plugins/ (needed for runtime plugin discovery), and
repository/metadata/root.json once repo_init.py has produced one.
Built and smoke-tested: the frozen exe launches and stays running.
- scripts/release/{repo_init,repo_release}.py: maintainer-run release
tooling using tufup.repo.Repository, manual local signing (keys never
touch CI). Both actually run end-to-end during development of this
feature against a real build, not just written and assumed correct.
Longer expiration_days than tufup-example's CI-oriented defaults
(targets/snapshot/timestamp 90d instead of 7d/7d/1d), since we're
signing manually, not on an automated daily schedule — see
scripts/release/README.md for the re-signing cadence this still
requires even between releases.
- core/updater.py: thin Client wrapper. Refuses to run outside a
frozen build (getattr(sys, "frozen", False)) since there's no
installed bundle for tufup to update in `python main.py` dev mode.
Bootstraps the bundled root.json into the metadata cache dir on
first run — tuf.ngclient.Updater loads root.json from local disk on
construction, it does not fetch it remotely by design (the root of
trust can't come from the same server being verified).
- core/app_settings.py: factored out app_data_dir() (was inline in
_settings_path()) so the updater's metadata/target cache dirs live
in the same per-user location as settings.json, deliberately outside
the install directory an update can replace/move.
- Settings > General: version display + "Check for Updates" button,
manual-only per discussion (no silent background network calls or
surprise restarts for a lab-instrument-control app).
Metadata/targets are hosted on this repo's "updates" GitHub Release —
a fixed tag, not a normal per-version tag, because TUF's top-level
metadata needs a stable URL across app versions. No such GitHub-Releases-
hosting example exists in tufup or tufup-example; verified this by
fetching tufup-example's actual GitHub Actions workflow file directly
after a web search wrongly suggested one existed — the design here is
ours, not copied from upstream.
Not yet done, deliberately left for the user: running repo_init.py for
real (generates production signing keys), and creating the actual
"updates" GitHub Release. Both are irreversible-ish, security-sensitive,
externally-visible actions outside what should happen without the
user directly driving them.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
|
|
# Conflicts:
# ui/control_editor.py
|
|
|
|
|
|
|
|
|
|
|
|
New Settings > General > "Developer mode" checkbox (default on, so
this repo's simulate-by-default workflow is unaffected out of the box)
persisted through the existing core/app_settings.py load/save
functions. Exposed to code that can't easily receive the settings dict
via core.app_settings.is_developer_mode()/set_developer_mode(), a
small in-memory cache MainWindow keeps in sync whenever settings are
loaded or applied.
Debug window (ui/windows/debug_window.py): minimal first pass per the
plan — a live console. core/debug_log.py tees stdout/stderr into a
ring buffer + Qt signal (installed once in main.py, before anything
prints), so the window shows everything printed since app start,
including from background poll threads, not just what's printed while
it happens to be open. Its toolbar button is hidden unless developer
mode is on.
Simulate gating: every device's Simulation Mode checkbox/dropdown is
now hidden when developer mode is off — ui/add_device_dialog.py (also
covers the motion_capture camera panel, which shares this same
checkbox rather than having its own), and the per-device config
widgets in analog_input.py, arduino_device.py, digital_io.py,
nidaqmx_device.py, serial_device.py. Hiding rather than force-clearing
an already-simulating device's state — an existing simulated device
keeps working if developer mode is turned off later; the option is
just not offered again until it's back on.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
Builds on the previous branch's dependency check: the missing-deps
QMessageBox is now a Yes/No prompt. Yes runs a blocking
`sys.executable -m pip install <reqs>` (subprocess.run, output
captured), shows a result dialog, and on success proceeds straight to
enabling the plugin — no need to click Enable a second time.
Blocking is a deliberate simplification, not an oversight: this
codebase has no worker-thread/progress-dialog pattern for slow
operations anywhere else, so a threaded installer would be
inconsistent with everything else here. pip install is a one-time,
infrequent action, unlike e.g. a serial connect that runs constantly.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
manifest.json already had an unused "requires" field (motion_capture's
manifest lists opencv-python>=4.8.0) — PluginManifest never parsed it,
so a missing dependency just crashed the import inside _load_plugin(),
caught by the broad except and only ever printed to the console.
Adds PluginManifest.requires, PluginManager.missing_requirements()/
get_missing_dependencies(), and an early check in _load_plugin() that
skips the risky import entirely when a requirement is missing.
main_window.plugin_enable() now checks this before calling
PluginManager.enable() and shows a QMessageBox with the missing
packages and a pip install command instead of failing silently.
Checks by distribution name via importlib.metadata (what pip installed
it as), not import name — those differ for packages like opencv-python
(imports as cv2) or pyserial (imports as serial), so importlib.util.
find_spec() would give false negatives.
Also fixes a button-state bug this surfaces: SettingsWindow's plugin
toggle optimistically flipped to "Disable" the instant Enable was
clicked, before knowing whether enabling actually succeeds — pre-existing,
but now trivially reproducible (any plugin missing a dependency). Enable
no longer flips the button immediately; main_window calls the new
sync_plugin_button() once the real outcome is known.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
Run/Stop previously only paused acquisition — control outputs (motor
speed, switches, PWM duty) kept whatever value was last written, so
stopping the run loop didn't stop a running motor. Adds
ControlWidget.safe_stop() (per-widget override, default zeros the
output) and ControlPanel.safe_stop_all(), called from _toggle_run's
Stop branch before engine.stop().
Per-widget behavior is deliberately not uniform:
- OnOffSwitch/MotorControl/PwmControl have a latched running/enabled
state, so safe_stop() drives their own toggle handler (consistent UI
+ write in one path) and, for Motor/PWM, zeroes the slider too.
- SetpointControl/AnalogOutputControl only write on an explicit user
action and have no universally safe forced value (e.g. 0 isn't
necessarily "off" for an arbitrary process setpoint or analog
output) — Stop leaves them untouched rather than guessing.
Log button: added a :disabled QSS rule so "can't log yet" reads as
clearly inert rather than a duller version of the enabled look, and a
600ms blink (toggling a "recording" dynamic property the QSS keys off)
while a recording is active, so it reads as live/recording rather than
a static pressed button. Master Stop now calls _toggle_log(False)
explicitly when forcing the button off, since QPushButton.setChecked()
doesn't emit clicked — without this the blink would keep running after
a master Stop even though logging itself already halted via
engine.stop()'s internal stop_logging() call.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
|
Mark10Layer._parse() already tracked whichever unit suffix the gauge
last reported (lb/kgF/N/ozF — the gauge's physical unit button cycles
these independently of this app). serial_device.py hardcoded the
"force" channel's unit to "N" and never updated it, so switching units
on the gauge itself was invisible here.
Adds Mark10Layer.current_unit and has SerialDevice.read_channels()
keep the "force" ChannelConfig's unit in sync with it on every poll.
This fixes the unit shown in anything that reads ChannelConfig.unit
live — new plots, channel pickers, CSV log headers — but does not
relabel the Y-axis of an already-open plot pane, since plot axis
labels are baked into PlotConfig.y_label once at plot-build time, not
re-read from the channel live. Making an open pane's axis relabel
itself would need new signal plumbing from the device through
AcquisitionEngine to the strip chart — a bigger, separate change.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|