Skip to content

Add GP4-GP6 guest ports and per-port 24V sensing for X7#272

Merged
follesoe merged 4 commits into
masterfrom
x7-guest-ports-gp4-gp7
Jun 24, 2026
Merged

Add GP4-GP6 guest ports and per-port 24V sensing for X7#272
follesoe merged 4 commits into
masterfrom
x7-guest-ports-gp4-gp7

Conversation

@follesoe

@follesoe follesoe commented Jun 24, 2026

Copy link
Copy Markdown
Member

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.

Location Change
GuestPortNumber enum Added GUEST_PORT_NUMBER_PORT_4..6 (values 4–6)
GuestPortInfo Added gp4..gp6 (fields 4–6)
GuestPortCurrent Added gp4_bat..gp6_bat (fields 5–7), per-port gp1_24v..gp6_24v (fields 8–13), and per-port gp1_5v..gp6_5v (fields 14–19)
ErrorFlags Added per-port flags for GP4–GP6 (read, not_flashed, unknown_device, device_connection, device, bat_current), per-port gp1_24v_current..gp6_24v_current, and per-port gp1_5v_current..gp6_5v_current — new field numbers 48–77
Blueye.Protocol.Protobuf.csproj Version bump 5.9.0 → 6.0.0

Current sensing

X7 adds per-port 24V and 5V current sensing to all six guest ports:

  • GuestPortCurrent gains gp1_24vgp6_24v (fields 8–13) and gp1_5vgp6_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.
  • ErrorFlags gains per-port gp1_24v_currentgp6_24v_current (fields 66–71) and gp1_5v_currentgp6_5v_current (fields 72–77), alongside the existing common gp_24v_current.

Naming: 20V → 24V

The guest-port supply is 24V, so the 20V fields 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..gp6 of 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 result gp_24v_current (field 42) now appears later in source than gp6_bat_current (65) — proto does not require numeric source order.

Design notes

  • Wire compatibility preserved. No existing field number changed; only field names (20V→24V) and source ordering were modified.
  • Comment consistency. All per-port bat_current / 24v_current / 5v_current comments use the "guest port N" full-name form, matching the other per-port flags (this also corrected the pre-existing GP1–GP3 lines).

Validation

  • protolint passes
  • protoc compiles cleanly
  • ErrorFlags field numbers verified unique and contiguous (1–77); GuestPortCurrent (1–19)

Downstream 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 libguestport in BluEye-Robotics/libguestport#371.

🤖 Generated with Claude Code

@follesoe follesoe added the enhancement New feature or request label Jun 24, 2026
@follesoe follesoe requested a review from jp-pino June 24, 2026 09:04
@follesoe follesoe self-assigned this Jun 24, 2026
@follesoe follesoe added this to the Blunux v5.1 milestone Jun 24, 2026
@follesoe follesoe added the dotnet Issues related to the dotnet libraries label Jun 24, 2026
@follesoe follesoe changed the title Add GP4-GP7 guest ports for X7 Add GP4-GP6 guest ports and per-port 20V sensing for X7 Jun 24, 2026
@follesoe follesoe force-pushed the x7-guest-ports-gp4-gp7 branch from 4b2690b to a2f488d Compare June 24, 2026 10:45
Comment thread protobuf_definitions/message_formats.proto Outdated
Comment thread protobuf_definitions/message_formats.proto Outdated
@follesoe follesoe force-pushed the x7-guest-ports-gp4-gp7 branch from a2f488d to dd0e4b0 Compare June 24, 2026 11:12
@follesoe follesoe changed the title Add GP4-GP6 guest ports and per-port 20V sensing for X7 Add GP4-GP6 guest ports and per-port 24V sensing for X7 Jun 24, 2026
Comment thread protobuf_definitions/message_formats.proto Outdated
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]>
@follesoe follesoe force-pushed the x7-guest-ports-gp4-gp7 branch from dd0e4b0 to 97f9eec Compare June 24, 2026 11:15
@follesoe follesoe requested a review from jp-pino June 24, 2026 11:17
@jp-pino

jp-pino commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

We also have 5V current sensing and fault detection per GP

Comment thread protobuf_definitions/message_formats.proto Outdated
follesoe and others added 2 commits June 24, 2026 13:43
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]>
@follesoe follesoe requested a review from jp-pino June 24, 2026 11:47
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]>

@jp-pino jp-pino left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@follesoe follesoe merged commit b410ea0 into master Jun 24, 2026
4 checks passed
@follesoe follesoe deleted the x7-guest-ports-gp4-gp7 branch June 24, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dotnet Issues related to the dotnet libraries enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants