-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sdr): add utility methods for SDR tags and tests
Added multiple utility methods to handle AsvSdrRecordTagTypes in AsvSdrHelper.cs. These methods include PrintTag, PrintTagValue, GetTagValueAsUInt64, SetTagValueAsUInt64, GetTagValueAsInt64, SetTagValueAsInt64, GetTagValueAsReal64, SetTagValueAsReal64, GetTagValueAsString, and SetTagValueAsString. These methods provide a unified way to manage SDR tag values, handle various data types and improve code robustness by performing necessary checks to prevent incorrect usage. Mavlink endpoint 'AsvSdrClientRecordTag.cs' was refactored to use these new utility methods. The changes are justified by enhancing the capacity of handling SDR tags and simplifying the client's tasks in managing these data types. Also added corresponding tests for these new utility methods in AsvSdrHelperTest.cs to ensure their correct functionality. Tests include setting and getting tag value for all supported types (ulong, long, double, string). These added tests provide validation that new utility methods function as expected. A method was added in MavlinkTypesHelper.cs for setting and getting string value from byte arrays. Testing for these methods was also included. Reducing code repetition and enhancing code robustness lead to sturdier and easily maintainable codebase.
- Loading branch information
Showing
4 changed files
with
175 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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