Repository navigation
Studio P0: preserve PTP–SV baseline; fix angle updates and professional operator layout #242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
371ebee
86ad8a2
eddf8fd
75ff405
ed7bf00
00ce9d3
1df0fea
62465bc
27e32a5
bbc49c2
2bb9eb1
5711b7a
329247a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,10 +52,9 @@ ApplicationWindow { | |
| function markScenarioDirty() { | ||
| if (restoringScenario) return | ||
| saveScenarioTimer.restart() | ||
| // While STOPPED, a new edit belongs to the next supervised Start batch. | ||
| // Only a genuinely RUNNING board receives incremental live SETs. | ||
| if (!workflowBar.injectionRunning) | ||
| pendingApply = true | ||
| // All edits are a draft until the matching command is queued. | ||
| // Never label a visible draft as proven transmitted waveform data. | ||
| pendingApply = true | ||
| } | ||
| function restoreLocalScenario() { | ||
| const saved = scenarioSettings.lastScenario | ||
|
|
@@ -122,6 +121,7 @@ ApplicationWindow { | |
| property string ptpDesiredRole: "SOURCE" | ||
| property bool ptpRestoreAfterFirmware: false | ||
| property int ptpRestoreChecks: 0 | ||
| property bool ptpDefaultStartAttempted: false | ||
| property bool restoringScenario: false | ||
| property bool offlinePreviewRunning: false | ||
| property real currentScale: 1000.0 | ||
|
|
@@ -215,6 +215,23 @@ ApplicationWindow { | |
| } | ||
| } | ||
|
|
||
| // Operator-friendly default: start SOURCE with the verified profile | ||
| // once the connected board is READY, never in a blind reconnect loop. | ||
| // A deliberate OFF cancels this default for the rest of the session. | ||
| Timer { | ||
| interval: 500 | ||
| repeat: true | ||
| running: !root.ptpDefaultStartAttempted | ||
| onTriggered: { | ||
| const session = workflowBar.session | ||
| if (!session || !device.deviceVerified || !session.startReady || | ||
| session.updatingFirmware || device.ptpStarting) return | ||
| root.ptpDefaultStartAttempted = true | ||
| if (!device.ptpRunning && !root.startPtpRole("SOURCE")) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The automatic start calls AGENTS.md reference: AGENTS.md:L74-L76 Useful? React with 👍 / 👎. |
||
| root.showMessage("PTP could not start automatically; use PTP On to retry.", true) | ||
| } | ||
| } | ||
|
|
||
| Timer { | ||
| interval: 300 | ||
| repeat: true | ||
|
|
@@ -323,6 +340,7 @@ ApplicationWindow { | |
| } | ||
|
|
||
| function requestStopPtp() { | ||
| root.ptpDefaultStartAttempted = true | ||
| root.ptpDesiredForSession = false | ||
| root.ptpRestoreAfterFirmware = false | ||
| return workflowBar.session && workflowBar.session.requestStopPtp() | ||
|
|
@@ -467,9 +485,12 @@ ApplicationWindow { | |
|
|
||
| selectSignal(group, row) | ||
| markScenarioDirty() | ||
| if (workflowBar.session && workflowBar.session.liveControlReady && !pendingApply) { | ||
| if (phaseLink && row < 3) sendLinkedGroup(group) | ||
| else sendSignal(group, row) | ||
| if (workflowBar.injectionRunning && workflowBar.session && | ||
| workflowBar.session.liveControlReady) { | ||
| const queued = phaseLink && row < 3 | ||
| ? sendLinkedGroup(group) : sendSignal(group, row) | ||
| if (!queued) showMessage("Signal update not queued; retry or Stop/Start.", true) | ||
| else pendingApply = false | ||
|
Comment on lines
+492
to
+493
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
A failed live update leaves AGENTS.md reference: AGENTS.md:L74-L76 Useful? React with 👍 / 👎. |
||
| } | ||
| return true | ||
| } | ||
|
|
@@ -487,6 +508,8 @@ ApplicationWindow { | |
| return ok | ||
| } | ||
| function startScenarioSnapshot() { | ||
| // START always serializes the same ListModels that draw the table, | ||
| // including all eight current phase angles and enabled flags. | ||
| var draft = scenarioSnapshot() | ||
| draft.currentScale = currentScale | ||
| draft.voltageScale = voltageScale | ||
|
|
@@ -698,10 +721,10 @@ ApplicationWindow { | |
| } | ||
| Rectangle { width: 1; height: 12; color: studioTheme.lineSoft } | ||
| Label { | ||
| text: root.pendingApply && !workflowBar.injectionRunning | ||
| ? "4I + 4V · Changes sent on Start" | ||
| text: root.pendingApply | ||
| ? "4I + 4V · Setpoints pending · Start to apply" | ||
| : "4I + 4V · 4000 samples/s" | ||
| color: root.pendingApply && !workflowBar.injectionRunning | ||
| color: root.pendingApply | ||
| ? studioTheme.amber : studioTheme.muted | ||
| font.family: root.uiFont | ||
| font.pixelSize: 9 | ||
|
|
@@ -1049,11 +1072,11 @@ ApplicationWindow { | |
| } | ||
| } | ||
|
|
||
| RowLayout { | ||
| ColumnLayout { | ||
| Layout.fillWidth: true | ||
| Layout.preferredHeight: root.compactLayout ? 214 : 224 | ||
| Layout.maximumHeight: root.compactLayout ? 214 : 224 | ||
| spacing: 9 | ||
| Layout.preferredHeight: root.compactLayout ? 352 : 384 | ||
| Layout.maximumHeight: root.compactLayout ? 352 : 384 | ||
| spacing: 7 | ||
| SignalMatrix { | ||
| id: voltageMatrix | ||
| enabled: !workflowBar.startQueued | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When injection is RUNNING, every non-cell editor still calls
markScenarioDirty()before checking!pendingApply; this unconditional assignment therefore makes those checks permanently false. Frequency/waveform mode, CT shaping, channel enabled/quality, balanced/zero, and the group context-menu actions now change only the QML model while the physical SV stream continues using the old values, and Start cannot apply them until the operator stops injection. These handlers need the same RUNNING-aware queue behavior added toeditSignal, rather than using the draft flag to suppress transmission.AGENTS.md reference: AGENTS.md:L74-L76
Useful? React with 👍 / 👎.