summaryrefslogtreecommitdiff
path: root/api_layers
AgeCommit message (Collapse)Author
2026-09-20Persist dock layout to profiles; dedupe port names; Channels-tab Create buttonChristian Kolset
- Fix duplicated device names ("FT231X USB UART - FT231X USB UART (...)") — pyserial on Linux often reports the same udev model string twice for cheap FTDI/CH340-style adapters. Collapse it at the list_ports() source so every consumer (device auto-name, port picker) benefits. - Save Control Panel / Namespace dock area, floating geometry, visibility, size and order to .labui profiles via QMainWindow.saveState()/ restoreState(), round-tripped through the existing Profile.settings passthrough (self._settings) — no profile schema change needed. - Channels tab: replace the per-row Signal ⊕ button (and its pinned/ frozen-column overlay) with a single "Create Channel" button below the Namespace panel. Select one or more Signal/Channel rows (multi-select now supported) and click it — selected rows become the new Channel's sources, or an empty Channel is created if nothing's selected. Fixes a bug in the process: the multi/zero-source path defaulted to kind="expression" with no expression text, which fails to compile and silently dropped the channel; use kind="none" instead, which the user then edits in the Channels pane. NamespacePanel itself (ui/namespace_panel.py) goes back to a plain read-only reference widget — the create-channel button and its logic live entirely in ConfigWindow (config_window.py), so the shared dockable Namespace panel on the main window is unaffected. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19Redesign Signal/Channel naming and fix pin-remap breaking referencesChristian Kolset
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).
2026-08-26Commented out unfiltered stream. Now works with Adams python code.Christian Kolset
2026-08-17Fix control panel freeze and CM1 motor not movingChristian Kolset
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>
2026-08-13Re-detect serial device ports by identity when a profile loads on another ↵Christian Kolset
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>
2026-08-13Added DSCUSB Protocol.Christian Kolset
2026-08-13Removed tracking of temp files and updated esp32_stringPot.inoChristian Kolset
- Removed log file and plugin enabled states. - Updated esp32_stringPot.ino: added time delay for config screen and group declaration together.
2026-08-10Unify Signals/Channels around auto-naming, plot-by-channel, and shared varsChristian Kolset
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>
2026-08-10esp32_stringPot firmware supports calibration from aruidno IDEChristian Kolset
2026-08-07Removed serial commands feature.Christian Kolset
2026-08-07Device Firmware updated.Christian Kolset
- Moved arduino file to sub-directory. - Updated esp32_stringPot low-pass filter from EMA to butterwoth.
2026-08-06Firmware update.Christian Kolset
- Renamed and moved arduino firmware into it's own sketch for arduino compiling interface. - Added esp32 firmware for stringpotentiometer.
2026-08-03Fix clipped/jagged simulated Arduino waveformsChristian Kolset
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>
2026-08-02Merge origin/main: reconcile ConfigWindow consolidation with Debug window + ↵Christian Kolset
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>
2026-08-01Major control panel improvements.Christian Kolset
- 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
2026-07-29Sync Mark-10 gauge's live unit into ChannelConfig instead of a fixed defaultChristian Kolset
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>
2026-07-28Update CML protocol documentation and improve command handling; adjust ↵Christian Kolset
motion_capture setting to false
2026-07-27Enhance protocol layers: implement I/O locking for thread safety in serial ↵Christian Kolset
communication
2026-07-27Add simulation handling to protocol layers and update motion_capture settingChristian Kolset
2026-06-03Remove __pycache__ from trackingChristian Kolset
2026-04-27Improved arduino interface. Now allowing the user to configure pins on the fly.Christian Kolset
2026-04-24Added difference serial protocolsChristian Kolset
2026-04-22Added port scanning for new devices and only shows related backend config linesChristian Kolset
2026-04-21Major update to Output controlChristian Kolset
Including: - Control panel - Change status of simulation after devices creation. - Arduino serial conflict with multiple channels. - Claude instructions. - Update to arduino on board code.
2026-04-21V13Christian Kolset
This version contains the profile feature. Allowins users to save the channels, signals and plots for specific labs.
2026-04-20V9Christian Kolset
2026-04-20V8Christian Kolset
2026-04-13Removed QtPy5 snippet and fixed directoriesChristian Kolset