Add Omniscan3D support and fix message definition lookup#172
Open
steve-at-oblique wants to merge 1 commit into
Open
Add Omniscan3D support and fix message definition lookup#172steve-at-oblique wants to merge 1 commit into
steve-at-oblique wants to merge 1 commit into
Conversation
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.
This PR adds support for the OmniScan3D device to the ping-python library, including a generated device class and example application.
While integrating the new device, I discovered that the library assumes message IDs are globally unique by using a single payload_dict_all lookup table. OmniScan3D and Surveyor240 both define ATTITUDE_REPORT (message ID 504), but with different payload layouts, causing packets to be decoded incorrectly.
To address this, PingMessage, PingParser, and PingDevice were updated to support device-specific message definition dictionaries while preserving the existing payload_dict_all behavior for backward compatibility. This allows device families with overlapping message IDs to coexist correctly without affecting existing applications.
The implementation has been tested against both Surveyor240 and OmniScan3D hardware. The example applications communicate correctly with the devices, and generated log files can be successfully opened and replayed in SonarView.