Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CANdapter extended length arbitration ID #1528

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

BroderickJack
Copy link

Add support for Ewert Energy CANdapter extended arbitration ID ASCII identifier of x for the slcan interface implementation.

Fixes #1506

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BroderickJack example comment
elif string[0] == "T" or string[0] == "x": # x is an alternative extended message identifier from the CANDapter

Copy link

@NoahMaceri NoahMaceri Apr 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also in test_slcan.py you can insert this test after line 40 for a test

# Ewert Energy Systems CANDapter specific
self.serial.write(b"x12ABCDEF2AA55\r")
msg = self.bus.recv(TIMEOUT)
self.assertIsNotNone(msg)
self.assertEqual(msg.arbitration_id, 0x12ABCDEF)
self.assertEqual(msg.is_extended_id, True)
self.assertEqual(msg.is_remote_frame, False)
self.assertEqual(msg.dlc, 2)
self.assertSequenceEqual(msg.data, [0xAA, 0x55])

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thank you!

test/test_slcan.py Outdated Show resolved Hide resolved
@zariiii9003
Copy link
Collaborator

@BroderickJack can you fix the failing test?

BroderickJack and others added 6 commits October 17, 2023 15:27
More efficient check of arbitration ID

Co-authored-by: zariiii9003 <52598363+zariiii9003@users.noreply.github.com>
Type fix in slcan test

Co-authored-by: zariiii9003 <52598363+zariiii9003@users.noreply.github.com>
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.

CANdapter Support for Extended Arbitration ID's (slcan ASCII Protocol)
3 participants