diff options
author | Andre Hartmann <aha_1980@gmx.de> | 2019-03-23 12:02:26 +0100 |
---|---|---|
committer | André Hartmann <aha_1980@gmx.de> | 2019-04-29 07:49:52 +0000 |
commit | c970ba0b591ccb04eb70801e9e386a017b02064b (patch) | |
tree | 92da4e98bc242fca5a3ae9e18d2e89f19cd06c23 /src/plugins/canbus/peakcan | |
parent | 6c3b9bcfc38c50a9e4a4e7abbc67345b19aad3c0 (diff) |
PeakCAN: Skip data bitrate after device opening too
Some configuration parameters must be changed before
the device is opened, like bitrate and data bitrate.
Both bitrates are already set in PeakCanBackendPrivate::open(),
which is called some lines above. So skip the data bitrate
here, like already done for the (arbitration) bitrate.
Amends ac8509d992f4
Change-Id: Ib2ee99a8c969eeae96a8978401987c4fde273743
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/plugins/canbus/peakcan')
-rw-r--r-- | src/plugins/canbus/peakcan/peakcanbackend.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/canbus/peakcan/peakcanbackend.cpp b/src/plugins/canbus/peakcan/peakcanbackend.cpp index 7643c44..80c783c 100644 --- a/src/plugins/canbus/peakcan/peakcanbackend.cpp +++ b/src/plugins/canbus/peakcan/peakcanbackend.cpp @@ -741,7 +741,7 @@ bool PeakCanBackend::open() // the bitrate can not be applied after opening of device const auto keys = configurationKeys(); for (int key : keys) { - if (key == QCanBusDevice::BitRateKey) + if (key == QCanBusDevice::BitRateKey || key == QCanBusDevice::DataBitRateKey) continue; const QVariant param = configurationParameter(key); const bool success = d->setConfigurationParameter(key, param); |