Fix to correct a few places where 2 buses were hard coded as the
limit. There is no hard and fast limit to the number of buses you can have now.
This commit is contained in:
+3
-1
@@ -8,6 +8,7 @@
|
||||
#include <QApplication>
|
||||
#include <QPalette>
|
||||
#include "utility.h"
|
||||
#include "connections/canconmanager.h"
|
||||
|
||||
DBCHandler* DBCHandler::instance = nullptr;
|
||||
|
||||
@@ -291,8 +292,9 @@ int DBCFile::getAssocBus()
|
||||
|
||||
void DBCFile::setAssocBus(int bus)
|
||||
{
|
||||
int numBuses = CANConManager::getInstance()->getNumBuses();
|
||||
if (bus < -1) return;
|
||||
if (bus > 1) return;
|
||||
if (bus >= numBuses) return;
|
||||
assocBuses = bus;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user