Add two new external libraries. SimpleCrypt is used to encrypt passwords, QMQTT is an MQTT
library that I was able to integrate into the codebase so there aren't any external dependencies. Both external projects have their own open source licenses. Those licenses are included. Also in this commit is some preliminary work to start adding MQTT support to SavvyCAN.
This commit is contained in:
@@ -25,6 +25,8 @@ NewConnectionDialog::NewConnectionDialog(QVector<QString>* ips, QWidget *parent)
|
||||
connect(ui->rbGVRET, &QAbstractButton::clicked, this, &NewConnectionDialog::handleConnTypeChanged);
|
||||
connect(ui->rbSocketCAN, &QAbstractButton::clicked, this, &NewConnectionDialog::handleConnTypeChanged);
|
||||
connect(ui->rbRemote, &QAbstractButton::clicked, this, &NewConnectionDialog::handleConnTypeChanged);
|
||||
connect(ui->rbMQTT, &QAbstractButton::clicked, this, &NewConnectionDialog::handleConnTypeChanged);
|
||||
|
||||
connect(ui->cbDeviceType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &NewConnectionDialog::handleDeviceTypeChanged);
|
||||
connect(ui->btnOK, &QPushButton::clicked, this, &NewConnectionDialog::handleCreateButton);
|
||||
|
||||
@@ -50,6 +52,7 @@ void NewConnectionDialog::handleConnTypeChanged()
|
||||
if (ui->rbGVRET->isChecked()) selectSerial();
|
||||
if (ui->rbSocketCAN->isChecked()) selectSocketCan();
|
||||
if (ui->rbRemote->isChecked()) selectRemote();
|
||||
|
||||
}
|
||||
|
||||
void NewConnectionDialog::handleDeviceTypeChanged()
|
||||
@@ -102,6 +105,14 @@ void NewConnectionDialog::selectRemote()
|
||||
}
|
||||
}
|
||||
|
||||
void NewConnectionDialog::selectMQTT()
|
||||
{
|
||||
ui->lPort->setText("Topic Name:");
|
||||
ui->lblDeviceType->setHidden(true);
|
||||
ui->cbDeviceType->setHidden(true);
|
||||
ui->cbPort->clear();
|
||||
}
|
||||
|
||||
void NewConnectionDialog::setPortName(CANCon::type pType, QString pPortName, QString pDriver)
|
||||
{
|
||||
|
||||
@@ -156,6 +167,7 @@ QString NewConnectionDialog::getPortName()
|
||||
case CANCon::GVRET_SERIAL:
|
||||
case CANCon::SERIALBUS:
|
||||
case CANCon::REMOTE:
|
||||
case CANCon::MQTT:
|
||||
return ui->cbPort->currentText();
|
||||
default:
|
||||
qDebug() << "getPortName: can't get port";
|
||||
@@ -178,6 +190,7 @@ CANCon::type NewConnectionDialog::getConnectionType()
|
||||
if (ui->rbGVRET->isChecked()) return CANCon::GVRET_SERIAL;
|
||||
if (ui->rbSocketCAN->isChecked()) return CANCon::SERIALBUS;
|
||||
if (ui->rbRemote->isChecked()) return CANCon::REMOTE;
|
||||
if (ui->rbMQTT->isChecked()) return CANCon::MQTT;
|
||||
qDebug() << "getConnectionType: error";
|
||||
|
||||
return CANCon::NONE;
|
||||
|
||||
Reference in New Issue
Block a user