Fixed a nasty bug that could cause the whole program to crash when

changing ID filters. Made the new connection screen update to
show the set baud rates. Added the ability to set Single Wire mode on
the connection window but it actually doesn't work yet.
This commit is contained in:
Collin Kidder
2015-12-28 18:51:07 -05:00
parent a37dbe33aa
commit 5facfe72aa
5 changed files with 38 additions and 5 deletions
+13
View File
@@ -103,6 +103,8 @@ void ConnectionWindow::setSpeeds(int speed0, int speed1)
{
bool found = false;
qDebug() << speed0 << "X" << speed1;
for (int i = 0; i < ui->cbSpeed0->count(); i++)
{
if (ui->cbSpeed0->itemText(i).toInt() == speed0)
@@ -184,3 +186,14 @@ ConnectionType::ConnectionType ConnectionWindow::getConnectionType()
if (ui->rbKvaser->isChecked()) return ConnectionType::KVASER;
if (ui->rbSocketCAN->isChecked()) return ConnectionType::SOCKETCAN;
}
void ConnectionWindow::setCAN1SWMode(bool mode)
{
ui->ckSingleWire->setChecked(mode);
}
bool ConnectionWindow::getCAN1SWMode()
{
if (ui->ckSingleWire->checkState() == Qt::Checked) return true;
return false;
}