fix SDO unit tests for param flags UID change#52
Merged
Conversation
Agent-Logs-Url: https://github.com/jsphuebner/libopeninv/sessions/46a2a764-935f-4494-8156-061c2a519c50 Co-authored-by: jsphuebner <3882041+jsphuebner@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
jsphuebner
April 30, 2026 07:28
View session
jsphuebner
approved these changes
Apr 30, 2026
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.
The
SDO_INDEX_PARAM_FLAGS(0x2200) handler was changed to look up parameters by UID viaNumFromId(subIndex)rather than treatingsubIndexas a directPARAM_NUMenum index. The flag tests were still sending the enum index (Param::ocurlim= 2) instead of the UID (ocurlimUID = 22).Changes
test/test_cansdo.cpp: Updatesdo_read_param_flags_default,sdo_write_and_read_param_flags, andsdo_write_param_flags_clearto sendParam::GetAttrib(Param::ocurlim)->idas the subIndex for 0x2200 SDO requests instead ofParam::ocurlimThe invalid-index tests (
sdo_read_param_flags_invalid_index,sdo_write_param_flags_invalid_index) are unaffected — they passParam::PARAM_LAST(= 3), which is not a valid UID, soNumFromId(3)correctly returnsPARAM_INVALIDunder both the old and new handler.