fix(examples): use correct EtherCAT configured station address in ethercat-real-bus#9
Merged
Merged
Conversation
…ercat-real-bus `EthercrabBusDriver::with_subdevice_inputs` matches on `sd.configured_address()`, which `ethercrab`'s `init_single_group` auto-assigns starting at `0x1000` — not on the 0-based topology index. The example was pinned to `SUBDEV: u16 = 1`, which matched no SubDevice on a real EK1100 + EL1008 rig, so the reader silently yielded zero envelopes. Bump the const to `0x1001` and update the module docs, the routing comment, and the README's "Topology assumption" section to describe configured station addresses so the next person doesn't trip on the same gap. Verified live on a Raspberry Pi 5 against an EK1100 + EL1008 + EL2004 — envelopes now flow at the expected ~1/cycle (10 ms tick), and toggling inputs produces `bits=…` lines as the README predicts.
…l capture The "What you should see" block was written from doc-reading, with illustrative timestamps and bit patterns that didn't reflect what the binary actually emits. Replace it with a trimmed transcript of a real Pi 5 session: bring-up, the iceoryx2 default-config warning, the first all-zeros sample, the Connecting → Up → Degraded health flow, and a walking-bit pattern from probing each EL1008 input in turn (verifies all 8 channels end-to-end). Also explain when readers should expect Up → Degraded — it's tied to having an extra output terminal (the captured rig had an EL2004) not being written to, which is asymmetric-PDO behaviour the connector intentionally flags. With the bare topology this README documents, the transition does not appear.
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.
Summary
Why this slipped past PR #8
The example was written to spec from doc reading without a live rig. The reasonable-looking "EK1100 = SubDevice 0, EL1008 = SubDevice 1" assumption maps to ethercrab's bus-scan topology index, but the driver's lookup uses the EtherCAT configured station address — a different namespace. The connector silently returns `None` when nothing matches, which presents as "stream healthy, value always 0" rather than an error. Diagnosed on a Pi 5 by counting envelopes-per-tick and confirming the bus reached OP.
Test plan