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

Fixed missing context arg when creating CAN bus #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

minhyuk
Copy link

@minhyuk minhyuk commented Jul 24, 2023

When using the configuration of python-can, it was guided to pass interface settings through context, so I made the modification.

https://python-can.readthedocs.io/en/stable/configuration.html

I have verified that it works properly with python-can-remote.
Please review and provide feedback.

@minhyuk
Copy link
Author

minhyuk commented Apr 17, 2024

Dear,
Am I something do wrong?

@kasperkarlsson
Copy link
Contributor

Hello @minhyuk,

I do not see the context keyword for can.Bus in the python-can documentation. Is this interface specific? I would otherwise expect to see it on https://python-can.readthedocs.io/en/stable/bus.html#can.Bus

Where can I read more about this?

@minhyuk
Copy link
Author

minhyuk commented Apr 17, 2024

Hello @minhyuk,

I do not see the context keyword for can.Bus in the python-can documentation. Is this interface specific? I would otherwise expect to see it on https://python-can.readthedocs.io/en/stable/bus.html#can.Bus

Where can I read more about this?

First of all, Thank you for your feedback.

Actually, if you have CAN configuration file(.ini/.conf), you have to pass context argument via kwargs.
here is some code for Bus interface
https://github.com/hardbyte/python-can/blob/7dba4490c6c61385dc8cbe917e85492b4777b8f6/can/interface.py#L69

and some below, you can see this code for loading configuration from file
https://github.com/hardbyte/python-can/blob/7dba4490c6c61385dc8cbe917e85492b4777b8f6/can/interface.py#L121

this code might helpful, understanding what I want do.
If I am wrong, please let me know.

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