Add GP4-GP6 guest ports and per-port 24V sensing for X7#272
Merged
Conversation
4b2690b to
a2f488d
Compare
jp-pino
requested changes
Jun 24, 2026
a2f488d to
dd0e4b0
Compare
Extend the guest port definitions from 3 to 6 ports to support the X7 platform, and add per-port 24V current sensing. - GuestPortNumber enum: add PORT_4..PORT_6 - GuestPortInfo: add gp4..gp6 - GuestPortCurrent: add gp4_bat..gp6_bat (fields 5-7) and per-port gp1_24v..gp6_24v (fields 8-13); keep gp_24v for backwards compatibility (field 4), now documented as the common/input supply - ErrorFlags: add per-port flags (read, not_flashed, unknown_device, device_connection, device, bat_current) for GP4-GP6, and per-port 24V current flags (gp1_24v_current..gp6_24v_current) for all six ports, using new field numbers 48-71, grouped so gp1..gp6 of each error type are listed together; existing field numbers are unchanged - Rename the guest port 20V fields to 24V (gp_20v -> gp_24v, gpN_20v -> gpN_24v, gp_20v_current -> gp_24v_current). Field numbers and types are unchanged, so the wire format stays compatible - Align the gp*_bat_current comments to the "guest port N" full-name form used by the other per-port flags - Bump package version to 6.0.0 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
dd0e4b0 to
97f9eec
Compare
Contributor
|
We also have 5V current sensing and fault detection per GP |
jp-pino
requested changes
Jun 24, 2026
X7 adds 5V current sensing per guest port. - GuestPortCurrent: add gp1_5v..gp6_5v (fields 14-19) - ErrorFlags: add gp1_5v_current..gp6_5v_current (fields 72-77), grouped after the per-port 24V current flags Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The common/input 24V current reading (gp_24v) only exists on X1/X3; X3 Ultra and X7 have no global 24V current sensing (per review). Clarify this in the field comment. The field is kept (released field 4) for wire compatibility. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The global 24V over-current flag (gp_24v_current) mirrors the gp_24v reading: there is no global 24V current sensing on X3 Ultra or X7, so clarify in the comment that it only applies to X1/X3. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
As part of X7, the platform will have 6 guest ports (up from 3). This PR extends the guest port definitions to GP4–GP6 in
protobuf_definitions/message_formats.proto, adds per-port 24V and 5V current sensing for all six ports, and renames the 20V fields to 24V.GuestPortNumberenumGUEST_PORT_NUMBER_PORT_4..6(values 4–6)GuestPortInfogp4..gp6(fields 4–6)GuestPortCurrentgp4_bat..gp6_bat(fields 5–7), per-portgp1_24v..gp6_24v(fields 8–13), and per-portgp1_5v..gp6_5v(fields 14–19)ErrorFlagsread,not_flashed,unknown_device,device_connection,device,bat_current), per-portgp1_24v_current..gp6_24v_current, and per-portgp1_5v_current..gp6_5v_current— new field numbers 48–77Blueye.Protocol.Protobuf.csproj5.9.0 → 6.0.0Current sensing
X7 adds per-port 24V and 5V current sensing to all six guest ports:
GuestPortCurrentgainsgp1_24v–gp6_24v(fields 8–13) andgp1_5v–gp6_5v(fields 14–19). The existing common-supply field is kept for backwards compatibility (field 4) and is now documented as the common/input 24V supply.ErrorFlagsgains per-portgp1_24v_current–gp6_24v_current(fields 66–71) andgp1_5v_current–gp6_5v_current(fields 72–77), alongside the existing commongp_24v_current.Naming: 20V → 24V
The guest-port supply is 24V, so the
20Vfields are renamed:gp_20v → gp_24v,gp_20v_current → gp_24v_current. Field numbers and types are unchanged, so the wire format stays compatible — only the generated symbol names change (a source-level breaking change for consumers, intentional). This follows the review discussion concluding on 24V.ErrorFlags ordering
The new per-port flags are grouped so that
gp1..gp6of each error type are listed together (e.g. all*_read, then all*_not_flashed, …). The existing GP1–GP3 flags keep their original field numbers (9–41) for wire compatibility; the new flags use 48–77, assigned so they read in ascending order down the file. As a resultgp_24v_current(field 42) now appears later in source thangp6_bat_current(65) — proto does not require numeric source order.Design notes
bat_current/24v_current/5v_currentcomments use the "guest port N" full-name form, matching the other per-port flags (this also corrected the pre-existing GP1–GP3 lines).Validation
protolintpassesprotoccompiles cleanlyDownstream note
The generated consumer libraries (C++ / Python / TS / C#) and firmware will need to handle the new fields and the 20V→24V renames, but those live outside this repo. Tracked for
libguestportin BluEye-Robotics/libguestport#371.🤖 Generated with Claude Code