Skip to content

fix range issue + test pdo comm records + import union + add getitem#637

Open
luciademoja-lab wants to merge 1 commit intocanopen-python:masterfrom
luciademoja-lab:luciademoja
Open

fix range issue + test pdo comm records + import union + add getitem#637
luciademoja-lab wants to merge 1 commit intocanopen-python:masterfrom
luciademoja-lab:luciademoja

Conversation

@luciademoja-lab
Copy link
Copy Markdown

Summary
Fixes PDO lookup and generic PDO mapping behavior in canopen so access via both PDO communication parameter records and mapping records works correctly.

Changes
Updated base.py
PdoMaps.getitem now resolves keys in both communication record (0x1400 / 0x1800) and mapping record (0x1600 / 0x1A00) ranges.
Updated init.py
PDO now normalizes alternate PDO index ranges and avoids duplicate counting while still supporting legacy lookup patterns.
Added missing Union import for type annotations.
Testing
Verified with python -m pytest test/test_pdo.py
Result: 7 passed, 1 skipped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants