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:
Collin Kidder
2015-05-20 18:47:47 -04:00
parent 5c2bc06877
commit 40fc10d197
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -119,10 +119,10 @@ void MainWindow::updateBaudLabel(int baud0, int baud1)
{
QString labelText;
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");
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");
lbStatusBauds.setText(labelText);
}
@@ -662,7 +662,7 @@ void MainWindow::connectionSucceeded(int baud0, int baud1)
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);
else
{
+1 -1
View File
@@ -138,7 +138,7 @@
<item>
<widget class="QPushButton" name="btnBaudSet">
<property name="text">
<string>Set Baud Rates</string>
<string>Set CANBUS Speeds</string>
</property>
</widget>
</item>