File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
transport/can/media/pythoncan Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 1
- __version__ = "1.24.2 "
1
+ __version__ = "1.24.3 "
Original file line number Diff line number Diff line change @@ -489,6 +489,8 @@ def _construct_pcan(parameters: _InterfaceParameters) -> can.ThreadSafeBus:
489
489
),
490
490
)
491
491
if isinstance (parameters , _FDInterfaceParameters ):
492
+ if parameters .bitrate [0 ] == 0 or parameters .bitrate [1 ] == 0 :
493
+ raise InvalidMediaConfigurationError ("Bitrate must be non-zero" )
492
494
# These magic numbers come from the settings of PCAN adapter.
493
495
# They don't allow any direct baudrate settings, you have to set all lengths and value of the main frequency.
494
496
# Bit lengths below are very universal and can be applied for almost every popular baudrate.
You can’t perform that action at this time.
0 commit comments