Fix ExtractMotorola() to follow DBC bit numbering.
Add reproducible regression tests covering:
A signal contained within one byte.
A signal spanning multiple bytes.
A non-byte-aligned start bit.
A signed Motorola signal.
An insufficient payload.
Verify that Intel decoding still works.
Do not modify generated docs.
Acceptance criteria:
The reproduction case returns the expected values.
All regression tests pass.
An insufficient payload produces an invalid signal result.
The project builds without warnings using -Wall -Wextra -Wpedantic.
Suggested branch: fix/motorola-extraction
Description:
Motorola signal decoding incorrectly calculates the bit position within a byte and the transition to the next byte.
Reproduction:
- Signal: startBit=7, length=16, ByteOrder::Motorola, unsigned, factor 1, offset 0.
- Payload: {0x12, 0x34}.
- Expected: rawValue=4660 (0x1234), physicalValue=4660.
- Actual: rawValue=0, valid=true.
Scope:
- Fix ExtractMotorola() to follow DBC bit numbering.
- Add reproducible regression tests covering:
- A signal contained within one byte.
- A signal spanning multiple bytes.
- A non-byte-aligned start bit.
- A signed Motorola signal.
- An insufficient payload.
- Verify that Intel decoding still works.
- Do not modify generated docs.
Acceptance criteria:
- The reproduction case returns the expected values.
- All regression tests pass.
- An insufficient payload produces an invalid signal result.
- The project builds without warnings using -Wall -Wextra -Wpedantic.
Suggested branch: fix/motorola-extraction
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description:
Motorola signal decoding incorrectly calculates the bit position within a byte and the transition to the next byte.
Reproduction:
Scope:
Acceptance criteria:
Suggested branch: fix/motorola-extraction