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

Missing datatype 0x16 -> UNSIGNED24 #466

Closed
prunith opened this issue Jun 19, 2024 · 7 comments
Closed

Missing datatype 0x16 -> UNSIGNED24 #466

prunith opened this issue Jun 19, 2024 · 7 comments

Comments

@prunith
Copy link

prunith commented Jun 19, 2024

Hi,
Could you implement USIGNED24 bits datatype ? Hex code is 0x16.

Thierry

@sveinse
Copy link
Collaborator

sveinse commented Jun 19, 2024

I'm not familiar with UNSIGNED12 in canopen. Datatype 0x16 is according to CiA 301 UNSIGNED24. Where is UNSIGNED12 used?

@prunith
Copy link
Author

prunith commented Jun 19, 2024

Hi @sveinse you are right i made a mistake UNSIGNED24 is missing UNSIGNED12 does not exist so far.

@prunith prunith changed the title Missing datatype 0x16 -> UNSIGNED12 Missing datatype 0x16 -> UNSIGNED24 Jun 19, 2024
@prunith
Copy link
Author

prunith commented Jun 19, 2024

I dig into code to see how it can be implemented, unfortunatly canopen use struct library that not support 24bit data. Perhaps with this work arround it could work unpack('<l', b'\x57\x15\x00' + b'\x00')[0] # unsigned littleendian

@prunith
Copy link
Author

prunith commented Jun 19, 2024

I see also that pull request already submited to correct that #267 unfortunately it was mixed with other change and not implemented.

@sveinse
Copy link
Collaborator

sveinse commented Jun 19, 2024

The latest release 2.3.0 contains support for UNSIGNED24 and all the other types that were missing. Done in PR #440. Is there anything that's missing or not working properly?

@prunith
Copy link
Author

prunith commented Jun 19, 2024

Tanks @sveinse @acolomb i m just late from one week , i have not noticed new release. Anyway i confirm it is fixed with 2.3.0.
Unfortunatly i have noticed some issue with latest python_can 4.4.0 library. I ll open a new ticket if needed.

@sveinse sveinse closed this as completed Jun 19, 2024
@acolomb
Copy link
Collaborator

acolomb commented Jun 19, 2024

What issues specifically? The canopen 2.3.0 release should work around an incompatible change in python-can 4.4.0 already. And for the next python-can release, the incompatibility is fixed again on their end already, just not released.

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

No branches or pull requests

3 participants