Repository navigation
Sync current main into server consolidation - #58
Conversation
Merge the validated ESP32-P4 live Sampled Values control runtime as the foundation for the GUI and SCL-driven injector integration.
Merge the validated operator-facing GUI for live ESP32-P4 Sampled Values control onto main.
Merge the completed SCL-driven ESP32-P4 Sampled Values injector flow, including smart profile compilation, GUI deployment, runtime 4000/4800 scheduling, and completion-status documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 056c6a71f8
ℹ️ 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".
| !profile.sample_counter_modulus.has_value()) { | ||
| return false; | ||
| } | ||
| if (profile.asdu_options.refresh_time || profile.asdu_options.security || | ||
| profile.asdu_options.synch_source_id) { |
There was a problem hiding this comment.
Validate the fixed 4I+4V channel order
For an SCL stream with 16 alternating INT32/Quality leaves but reordered FCDA entries, this loop still returns true because it checks only widths and types. Using the added fixture with the first current and voltage FCDAs swapped, the tool emits deviceSupport:"ready" even though payload slot 0 is U01A.Vol; firmware patch_packet() maps fixed live-channel index 0 (IA) directly to that slot in embedded/esp32p4_smv_injector/main/app_main.cpp, so deployment silently injects current controls into a voltage or other signal. Verify the required IA/IB/IC/IN/UA/UB/UC/UN references and order before reporting the profile as ready.
Useful? React with 👍 / 👎.
| } finally { | ||
| state.reader = null; | ||
| state.port = null; | ||
| setConnected(false); | ||
| setRunning(false); |
There was a problem hiding this comment.
Clear deployment state when the serial session ends
After deploying a profile, disconnecting or rebooting the board leaves profileBridge.deployed true; reconnecting, including to a different device, therefore re-enables Start without redeployment and continues to display the imported profile as armed. Firmware runtime profiles are volatile and reset to defaults in runtime_profile_initialize(), so this can silently start the default stream while the GUI claims the SCL profile is active. Clear the deployment state on disconnect and require redeployment or device-side verification for each serial session.
Useful? React with 👍 / 👎.
| await state.sendChain; | ||
| return true; |
There was a problem hiding this comment.
Propagate serial write failures to callers
When getWriter() or write() rejects, the preceding catch logs the error but resolves state.sendChain, so these lines still return true. A device unplug or port failure during deploySelectedProfile() is consequently treated as successful delivery, allowing the remaining profile commands to continue and leaving the GUI stuck deploying or operating on a partial profile; applyAll() can likewise show success after failed writes. Return false or rethrow after the catch so callers can abort and reset their state.
Useful? React with 👍 / 👎.
f67bba8
into
agent/complete-server-consolidation
Mechanical synchronization PR: merge the current
mainlineage intoagent/complete-server-consolidationbefore final validation of PR #51. This must not introduce new server features; it only brings the consolidation branch current with the latest main commits so conflicts and regressions are caught before #51 is merged.