Repository navigation
P0: fix AUTO=0 admission bug, PTP switch state loss and Studio UI stutter - #235
Conversation
…oalesce serial log UI signals
…delay in AUTO gate
…ent and coalesced logs
…y, and Studio PTP state ownership
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6bcc6f7b3
ℹ️ 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 (success && root.ptpDesiredForSession) { | ||
| root.ptpRestoreChecks = 0 | ||
| root.ptpRestoreAfterFirmware = true | ||
| } |
There was a problem hiding this comment.
Route all PTP actions through the intent owner
This restoration condition is stale whenever the Advanced timing controls are used: PtpExpertPanel.qml:136-137,281,290 calls the session's start/stop methods directly, bypassing the new wrappers that update ptpDesiredForSession. For example, starting from the main tray and then explicitly stopping from Advanced leaves this flag true, so a successful later firmware reflash reaches this branch and unexpectedly restarts the PTP publisher; starting from Advanced has the inverse problem and is never restored. Centralize the intent alongside the session state or route every PTP start/stop control through the same owner.
AGENTS.md reference: AGENTS.md:L26-L31
Useful? React with 👍 / 👎.
fb4329e
into
feature/studio-matched-ptp-sv-auto-20261017
Reproduction from operator
On exact-bundle build
65f3f0cdf751dc4ain COM15 diagnostics, flashed board started PTP STOPPED; no new PTP START after reboot, while Studio shows SV running and PTP OFF. Operator observes AUTO=0 but manual1shows LOCAL on analyzer, and UI responsiveness regressed. Do not misrepresent manual metadata as real synchronization.Core root cause (IEC 61850 sample time != SV MAC TX time)
The prior experimental SOURCE gate demanded MAC-transmitted
smpCnt=0frame land within ±4µs of the PTP whole second, conflating packet egress with sample acquisition instant. IEC 61850smpCntindexes the sample instant; MU packet preparation/queuing occurs afterward. This requirement can permanently prevent AUTO from reaching 1 even when GPTimer sample epoch is aligned. Preserve the strict software-observed sample phase + clock-read uncertainty <=4µs, and use independently timestamped canonical MAC egress only to confirm plausible publication latency of [-4µs, +250µs] (4kHz one-slot policy), not zero-delay coincidence. Still require coherent 16-second descriptor evidence and matching session/source/fault generation. Negative regressions cover 300us late, premature TX, stale evidence and bad phase.PTP switch regression
DeviceControllerwas overwriting authoritative PTP RUNNING andPTP2discipline whenever an olderPROFILE PTPROLEreadback arrived. Now role readback updates the role only;PTP STATUSowns running state, PTP2 owns lock fields.smpSynch=1just because PTP packets exist.UI responsive
Coalesce high-volume incoming serial-log QML notification to 10Hz instead of emitting a full 48–60k-char binding every log row. ACK parsing and raw log buffer remain immediate and lossless up to bounded preexisting retention.
Verification
PTP Core GCC/Clang/MSVC, ESP32-P4 firmware (SOURCE+RECEIVER), Studio Qt, Windows Lifecycle and exact-head native Preview. Bench remains mandatory for actual sample-epoch accuracy and SIPROTEC subscription; manual
smpSynch=1is a metadata test, not lock proof.