Add the Cygnus thickness gauge on an RS232 converting connector - #283
Merged
Conversation
The X7 carries no RS485 on any port. Devices needing it reach the drone through a connector holding a converter, so they present as RS232, and a gauge on such a connector is a different thing to the drone than one wired straight through: it fits any port with RS232, where the original fits only a port with RS485. Named for the interface it presents rather than as a revision, since the instrument is unchanged and naming it by interface is what the compatibility model reasons about. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new guest port device identifier to the protocol definitions to distinguish the Cygnus Mini ROV Thickness Gauge when it is presented to the drone as RS232 via an RS485→RS232 converting connector (relevant for drones like the X7 that lack RS485).
Changes:
- Added
GUEST_PORT_DEVICE_ID_CYGNUS_MINI_ROV_THICKNESS_GAUGE_RS232 = 49toGuestPortDeviceID. - Documented the rationale in adjacent comments to clarify the RS485→RS232 connector context.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| GUEST_PORT_DEVICE_ID_BLUEYE_SCALING_LASER = 48; // Blueye Scaling Laser. | ||
| // Cygnus Mini ROV Thickness Gauge on a connector that converts its RS485 to | ||
| // RS232, letting it be used on drones with no RS485, such as the X7. | ||
| GUEST_PORT_DEVICE_ID_CYGNUS_MINI_ROV_THICKNESS_GAUGE_RS232 = 49; |
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.
Adds
GUEST_PORT_DEVICE_ID_CYGNUS_MINI_ROV_THICKNESS_GAUGE_RS232 = 49.Why
The X7 carries no RS485 on any port. Devices that need it reach the drone through a guest port connector holding a converter chip, so they present as RS232.
To the drone these are genuinely different devices: the original fits only a port wired for RS485, while one on a converting connector fits any port with RS232. Since compatibility is computed from the interfaces a device requires, the two need separate identifiers — the connector is flashed with one or the other, and that is what tells the drone which it is dealing with.
The practical consequence is that an existing RS485 gauge on an X7 now resolves to no compatible port at all, which the app already reports as a device that cannot be used on that drone. That is the intended answer, and it arrives without any new code.
Naming
Named for the interface it presents rather than as a revision. The instrument itself is unchanged — our connector is what differs — so a "v2" would misdescribe it and collide should Cygnus ever ship one. Naming by interface also matches what the compatibility model reasons about, so the entry explains itself. The converter is referred to as a coin internally; that is in the comment rather than the enum, which SDK users see.
Downstream
peripherals.jsonin libguestport gains the matching entry, requiring RS232, and its port table drops RS485 from the X7: BluEye-Robotics/libguestport#385. The app needs this package published before it can map the new identifier, since a device it cannot name is silently ignored.🤖 Generated with Claude Code