Skip to content

Dev/dc2025#22

Open
jirhiker wants to merge 7 commits into
PychronLabsLLC:mainfrom
aelamspychron:dev/dc2025
Open

Dev/dc2025#22
jirhiker wants to merge 7 commits into
PychronLabsLLC:mainfrom
aelamspychron:dev/dc2025

Conversation

@jirhiker
Copy link
Copy Markdown

Summary

  • Describe the user-facing or developer-facing change.
  • Keep this focused on what changed and why.

Context

  • Why is this change needed?
  • What problem does it solve?

Verification

  • Tests added or updated where appropriate
  • Local verification completed
  • CI is expected to pass

Verification details:

  • ...

Risk

  • Note behavioral risk, migration risk, hardware risk, or data risk.
  • If low risk, say so explicitly.

Target Branch Check

  • This PR targets the branch it was created from logically (develop, the active dev/* stream, release/*, or hotfix/*)

Follow-ups

  • Optional follow-up work, cleanup, or known limitations.

jirhiker and others added 6 commits May 12, 2026 10:52
Bar.set_value computed nv = A * v**N for the power-law scale. For
color_scalar != 1 the exponent N is fractional, and v**N with negative v
returns a complex number, breaking the downstream color-map call so the
bar fails to render. Clamp v to >= 0 before exponentiation; the power
scale is undefined for negatives anyway. SRG-3 readings can drift
slightly below zero around the noise floor (e.g. -2.3e-6) and now render
as the minimum-color bar instead of disappearing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
MKSSRG.get_pressure was decorated @get_float(default=0), which silently
returned 0 on any parse or communication failure. The gauge view then
read 0 indefinitely even when the device was reporting non-zero values.
Drop the default so failures pass through as None (and the scan loop's
existing no-response handling surfaces them), and log the raw VAL
response so format mismatches are visible.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
uv was resolving pyqt5 to 5.15.2 on Windows AMD64 because pyqt5-qt5
5.15.18 lacks Windows wheels, and 5.15.2 was the only pyqt5 in range
that bundles Qt and avoids the pyqt5-qt5 dependency. 5.15.2 has no
Windows wheel either, so uv fell back to its sdist and tried to invoke
qmake (not present on target machines), failing with
PyProjectOptionException.

Bumping the lower bound to 5.15.11 lets uv pick the modern Windows
pyqt5 wheel, and pyqt5-qt5 resolves to 5.15.2 on Windows (which does
ship a Windows Qt wheel) while keeping 5.15.18 on macOS/Linux.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Pressure parsing succeeds but the gauge display still reads 0.00e+00,
indicating the trait write either isn't happening or isn't reaching the
displayed gauge instance. Log the unwrapped scan value, the gauges list
identity, and the post-write readback so we can see in the next run
whether the assignment is firing and whether self.gauges still matches
the gauge being rendered.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
DeviceManager._scan invokes the device's scan_func and discards the
returned value -- it never reaches _scan_ in ScannableDevice and never
calls _scan_hook. The previous hook-based update was therefore dead code
and BaseGauge.pressure was never written, so the gauge view stayed
pinned at 0.00e+00 despite successful pressure parses.

Switch scan_func to a new update_pressures method (matching the
BaseGaugeController naming convention) that reads the SRG-3 pressure
and writes it into self.gauges[0].pressure before returning.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Diagnostic served its purpose; remove the per-tick log spam now that
the scan path is fixed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
BaseCoreDevice.setpoint_achieved samples the current process value on
each call, records abs(setpoint - value) into a fixed-size rolling
deque, and returns True only when the buffer is full and its mean is
below tolerance. History resets automatically when the target changes
or via reset_setpoint_achieved().

The setpoint and process value are discovered via existing device
hooks (get_setpoint/read_setpoint and get_process_value/
read_process_value), falling back to the `setpoint` trait and the
generic `get()` method, so all CoreDevice subclasses inherit the
behavior without per-driver wiring.

Tolerance and history size are tunable per instance via
setpoint_tolerance and setpoint_history_size.
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.

1 participant