Dev/dc2025#22
Open
jirhiker wants to merge 7 commits into
Open
Conversation
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.
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
Context
Verification
Verification details:
...Risk
Target Branch Check
develop, the activedev/*stream,release/*, orhotfix/*)Follow-ups