Closed breachcircuit closed 9 months ago
Hello @breachcircuit and thank you for creating this issue!
First off, this sounds like a good idea. It even seems to be well supported by python-can
(as documented in https://python-can.readthedocs.io/en/stable/configuration.html#in-code), which is what we use under the hood.
My spontaneous feeling is that this could be implemented quite easily, but it will break backwards compatibility since Caring Caribou historically uses the wrong name (interface
when specifyingchannel
). Ripping the band-aid off by finally correcting that mistake would not be a bad idea :sweat_smile:
Hello @kasperkarlsson, thank you for getting back to me on such short notice. I would take the time to create a pull request in the next days addressing this enhancement. Looking forward to your feedback!
This issue proposes to be able to specify the
interface
,channel
, andbitrate
of the used connection.The option to remove the command line argument
interface
was already discussed in Issue #52 and closed as python-can enables to give those arguments askwargs
. However, we could benefit from specifying those values in the command line if we work with multiple can connections at the same time and don't want to modify the code.My suggestion would be to not require any arguments by default, but offer the option to the user and if specified, parse it to
can_actions
.This would include
-i
flag to specify theinterface
(e.g.socketcan
,cantact
, etc.)-c
flag to specify thechannel
(e.g.can0
)-b
flag to specify thebitrate
This should not interfere with any other usages of the tool but offer greater flexibility to users just working with the command line and multiple can connections.