Change display of canbus speed to say kbps instead of writing out the whole # in the status line. Also, removed any mention of baud rate.
This commit is contained in:
+3
-3
@@ -119,10 +119,10 @@ void MainWindow::updateBaudLabel(int baud0, int baud1)
|
|||||||
{
|
{
|
||||||
QString labelText;
|
QString labelText;
|
||||||
labelText = tr("Baud 0: ");
|
labelText = tr("Baud 0: ");
|
||||||
if (baud0 > 0) labelText += QString::number(baud0);
|
if (baud0 > 0) labelText += QString::number(baud0 / 1000.0) + "kbps";
|
||||||
else labelText += tr("disabled");
|
else labelText += tr("disabled");
|
||||||
labelText += tr(" Baud 1: ");
|
labelText += tr(" Baud 1: ");
|
||||||
if (baud1 > 0) labelText += QString::number(baud1);
|
if (baud1 > 0) labelText += QString::number(baud1 / 1000.0) + "kbps";
|
||||||
else labelText += tr("disabled");
|
else labelText += tr("disabled");
|
||||||
lbStatusBauds.setText(labelText);
|
lbStatusBauds.setText(labelText);
|
||||||
}
|
}
|
||||||
@@ -662,7 +662,7 @@ void MainWindow::connectionSucceeded(int baud0, int baud1)
|
|||||||
ui->cbSpeed1->setCurrentIndex(ui->cbSpeed1->count() - 1);
|
ui->cbSpeed1->setCurrentIndex(ui->cbSpeed1->count() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
idx = ui->cbSpeed2->findText(QString::number(baud0));
|
idx = ui->cbSpeed2->findText(QString::number(baud1));
|
||||||
if (idx > -1) ui->cbSpeed2->setCurrentIndex(idx);
|
if (idx > -1) ui->cbSpeed2->setCurrentIndex(idx);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -138,7 +138,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="btnBaudSet">
|
<widget class="QPushButton" name="btnBaudSet">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Set Baud Rates</string>
|
<string>Set CANBUS Speeds</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user