Repository navigation
Add smart live SMV injection and premium resizable Qt shell - #65
Conversation
There was a problem hiding this comment.
💡 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".
| 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; |
There was a problem hiding this comment.
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 👍 / 👎.
| 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); |
There was a problem hiding this comment.
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 👍 / 👎.
| if (matrix.device.connected) | ||
| matrix.device.setEnabled(signalRow.sid, checked) |
There was a problem hiding this comment.
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 👍 / 👎.
What changed
IDENTIFYhandshake and exposes manual port selection only in Expert Device Protocol;Product and safety boundaries
Validation
ariec61850_live_signal_testspassed, including DC constant output and bounded asymmetric CT saturation.git diff --checkpassed.