From 00878336be1be6bffc4a5e5f083f8ed72580e850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20K=C3=B6hler?= Date: Sun, 26 Dec 2021 14:42:56 +0100 Subject: [PATCH] default baudrate couldn't be changed for pcan The overall CanConnection parameter handling forces each parameter to be a string value, but the pcan bus driver expected the baudrate (=bitrate) to be an integer value --- .../TransportProtocols/Can/CanConnectionFactory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uds/uds_communications/TransportProtocols/Can/CanConnectionFactory.py b/uds/uds_communications/TransportProtocols/Can/CanConnectionFactory.py index aee217d..77a7b01 100644 --- a/uds/uds_communications/TransportProtocols/Can/CanConnectionFactory.py +++ b/uds/uds_communications/TransportProtocols/Can/CanConnectionFactory.py @@ -38,7 +38,7 @@ def __call__(callback=None, filter=None, configPath=None, **kwargs): elif connectionType == 'peak': channel = CanConnectionFactory.config['peak']['device'] if channel not in CanConnectionFactory.connections: - baudrate = CanConnectionFactory.config['can']['baudrate'] + baudrate = int( CanConnectionFactory.config['can']['baudrate'] ) CanConnectionFactory.connections[channel] = CanConnection(callback, filter, pcan.PcanBus(channel, bitrate=baudrate))