Skip to content

Add smart live SMV injection and premium resizable Qt shell - #65

Merged
masarray merged 29 commits into
mainfrom
main-qt-premium-phase2
Aug 11, 2026
Merged

masarray merged 29 commits into
mainfrom
main-qt-premium-phase2

Conversation

@masarray

@masarray masarray commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

What changed

  • rebuilt the native Qt 6 SMV Injector into a calm Office-style tabbed ribbon and engineering shell;
  • added resizable nested splitters for editor vs docks, Phasor vs Waveform, and workspace vs bottom monitor;
  • added closable/detachable Phasor and Waveform docks plus a fully clickable, smoothly collapsible Status & Output Monitor;
  • bundled Inter for every UI and numeric surface and Lucide SVG icons for ribbon/dock controls;
  • removed normal-workflow COM selection: Smart Discovery verifies the dedicated ESP32-P4 IDENTIFY handshake and exposes manual port selection only in Expert Device Protocol;
  • added PTP Lab TX Smart/Expert controls while preserving the truthful non-lock boundary;
  • made AC frequency editable, added DC injection, field suffixes (A, V, °, Hz), and mandatory live apply after verified connection;
  • added an ARSVIN-compatible bounded CT-saturation stress shape (DC offset + harmonic + clip approximation);
  • added ESP32-P4 identity/PTP/shape serial commands and shared-engine DC/CT waveform support with regression coverage.

Product and safety boundaries

  • Start and Deploy remain gated by verified ARStack device identity and profile readiness.
  • Generated plots remain setpoint previews, not independent on-wire proof.
  • PTP Lab TX does not claim external grandmaster lock.
  • CT Saturation is explicitly an injection approximation, not a calibrated electromagnetic CT model.
  • Physical updated-firmware and Ethernet acceptance remains required.

Validation

  • Qt 6.8.3 / MSVC / CMake / Ninja build passed after the final Lucide and nested-SplitView polish.
  • ariec61850_live_signal_tests passed, including DC constant output and bounded asymmetric CT saturation.
  • git diff --check passed.
  • Final GUI is running locally for visual audit; no startup configuration popup is created.
  • Optional Vulkan headers remain absent and Qt reports the existing non-blocking QTP0004 developer-policy warning.

@masarray masarray changed the title Add native Qt SMV Injector premium workflow and dock shell Add smart live SMV injection and premium resizable Qt shell Aug 11, 2026
@masarray
masarray marked this pull request as ready for review August 11, 2026 15:24

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 97227a8119

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +56 to +61
if ((i % 2U) == 0U) {
if (channel.is_quality || sv_support_lower_copy(channel.basic_type) != "int32") {
return false;
}
} else if (!channel.is_quality) {
return false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reject datasets that do not match the fixed 4I/4V mapping

The deployment gate checks only for eight alternating Int32/quality pairs, without validating signal_reference or other channel semantics. An SCL dataset containing any eight Int32 values therefore becomes ready, but the firmware always fills those positions from the fixed IA, IB, IC, IN, UA, UB, UC, UN controls; deploying such a profile silently sends values under the wrong dataset meanings. Either require the expected channel mapping here or add an explicit mapping before allowing deployment.

Useful? React with 👍 / 👎.

Comment on lines 222 to 224
const std::int64_t peak_counts = rms_to_peak_counts(channel.rms_counts);
const std::int64_t value = (sine_q30 * peak_counts) >> 30U;
row[index] = clamp_i32(value);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prevent overflow when applying high clip limits

With waveform shaping enabled, the accepted clip_permille range allows sine_q30 to reach 10×Q30, while signal counts may approach INT32_MAX. For accepted current setpoints above roughly 608 million counts at a 1000% clip, this multiplication exceeds int64_t, causing undefined behavior before clamp_i32 can constrain the result and potentially emitting corrupt samples. Use a wider intermediate or clamp the operands to a provably safe range before multiplying.

Useful? React with 👍 / 👎.

Comment on lines +136 to +137
if (matrix.device.connected)
matrix.device.setEnabled(signalRow.sid, checked)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require identity verification before sending ENABLE

If an operator toggles a channel after a serial port opens but before the identity handshake completes, this condition sends an ENABLE command to the unverified port. That violates the otherwise read-only probing flow and can mutate an unrelated serial device that happens to accept the command; the other live controls correctly wait for deviceVerified. Gate this command on device.deviceVerified as well.

Useful? React with 👍 / 👎.

@masarray
masarray merged commit 46e1165 into main Aug 11, 2026
20 checks passed
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