A bit more work on MQTT support. It can actually connect to an MQTT broker now.

This commit is contained in:
Collin Kidder
2020-08-05 21:53:21 -04:00
parent ee287eac4b
commit 2da2855bfa
6 changed files with 288 additions and 4 deletions
+10 -2
View File
@@ -52,7 +52,7 @@ void NewConnectionDialog::handleConnTypeChanged()
if (ui->rbGVRET->isChecked()) selectSerial();
if (ui->rbSocketCAN->isChecked()) selectSocketCan();
if (ui->rbRemote->isChecked()) selectRemote();
if (ui->rbMQTT->isChecked()) selectMQTT();
}
void NewConnectionDialog::handleDeviceTypeChanged()
@@ -123,7 +123,12 @@ void NewConnectionDialog::setPortName(CANCon::type pType, QString pPortName, QSt
break;
case CANCon::SERIALBUS:
ui->rbSocketCAN->setChecked(true);
//you can't configure any of the below three with socketcan so dim them out
break;
case CANCon::REMOTE:
ui->rbRemote->setChecked(true);
break;
case CANCon::MQTT:
ui->rbMQTT->setChecked(true);
break;
default: {}
}
@@ -157,6 +162,9 @@ void NewConnectionDialog::setPortName(CANCon::type pType, QString pPortName, QSt
else ui->cbPort->addItem(pPortName);
break;
}
case CANCon::MQTT:
ui->cbPort->setCurrentText(pPortName);
break;
default: {}
}
}