Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vesc_tool.pro
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ ios: {

# CAN bus available
# Adding serialbus to Qt seems to break the serial port on static builds. TODO: Figure out why.
#DEFINES += HAS_CANBUS
DEFINES += HAS_CANBUS

# Positioning
DEFINES += HAS_POS
Expand Down
4 changes: 3 additions & 1 deletion vescinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2373,7 +2373,9 @@ bool VescInterface::connectCANbus(QString backend, QString ifName, int bitrate)
mCanDevice->setConfigurationParameter(QCanBusDevice::ReceiveOwnKey, false);
// bitrate change not supported yet by socketcan. It is possible to set the rate when
// configuring the CAN network interface using the ip link command.
// mCanDevice->setConfigurationParameter(QCanBusDevice::BitRateKey, bitrate);
// This needs to happen or Qt will try and set a default bitrate which libsocketsocket can doesn't accept
mCanDevice->setConfigurationParameter(QCanBusDevice::BitRateKey, QVariant());

mCanDevice->setConfigurationParameter(QCanBusDevice::CanFdKey, false);
mCanDevice->setConfigurationParameter(QCanBusDevice::ReceiveOwnKey, false);

Expand Down