mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-24 03:02:29 -04:00
LimeSDR input: status bar updated
This commit is contained in:
parent
db67e07ab9
commit
2c5ea336da
@ -358,7 +358,7 @@ bool LimeSDRInput::handleMessage(const Message& message)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << "LimeSDRInput::handleMessage: got stream status at %llu" << status.timestamp
|
qDebug() << "LimeSDRInput::handleMessage: got stream status at: " << status.timestamp
|
||||||
<< " fifoFilledCount: " << status.fifoFilledCount
|
<< " fifoFilledCount: " << status.fifoFilledCount
|
||||||
<< " fifoSize: " << status.fifoSize
|
<< " fifoSize: " << status.fifoSize
|
||||||
<< " underrun: " << status.underrun
|
<< " underrun: " << status.underrun
|
||||||
|
@ -128,6 +128,7 @@ public:
|
|||||||
uint64_t getTimestamp() const { return m_timestamp; }
|
uint64_t getTimestamp() const { return m_timestamp; }
|
||||||
|
|
||||||
static MsgReportStreamInfo* create(
|
static MsgReportStreamInfo* create(
|
||||||
|
bool success,
|
||||||
bool active,
|
bool active,
|
||||||
uint32_t fifoFilledCount,
|
uint32_t fifoFilledCount,
|
||||||
uint32_t fifoSize,
|
uint32_t fifoSize,
|
||||||
@ -140,6 +141,7 @@ public:
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
return new MsgReportStreamInfo(
|
return new MsgReportStreamInfo(
|
||||||
|
success,
|
||||||
active,
|
active,
|
||||||
fifoFilledCount,
|
fifoFilledCount,
|
||||||
fifoSize,
|
fifoSize,
|
||||||
|
@ -185,23 +185,36 @@ void LimeSDRInputGUI::handleMessagesToGUI()
|
|||||||
LimeSDRInput::MsgReportStreamInfo *report = (LimeSDRInput::MsgReportStreamInfo *) message;
|
LimeSDRInput::MsgReportStreamInfo *report = (LimeSDRInput::MsgReportStreamInfo *) message;
|
||||||
|
|
||||||
if (report->getSuccess())
|
if (report->getSuccess())
|
||||||
{
|
|
||||||
if (report->getActive())
|
|
||||||
{
|
{
|
||||||
ui->streamStatusLabel->setStyleSheet("QLabel { background-color : green; }");
|
ui->streamStatusLabel->setStyleSheet("QLabel { background-color : green; }");
|
||||||
|
ui->streamLinkRateText->setText(tr("%1 MB/s").arg(QString::number(report->getLinkRate() / 1000000.0f, 'f', 3)));
|
||||||
|
|
||||||
|
if (report->getUnderrun() > 0) {
|
||||||
|
ui->underrunLabel->setStyleSheet("QLabel { background-color : red; }");
|
||||||
|
} else {
|
||||||
|
ui->underrunLabel->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (report->getOverrun() > 0) {
|
||||||
|
ui->overrunLabel->setStyleSheet("QLabel { background-color : red; }");
|
||||||
|
} else {
|
||||||
|
ui->overrunLabel->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (report->getDroppedPackets() > 0) {
|
||||||
|
ui->droppedLabel->setStyleSheet("QLabel { background-color : red; }");
|
||||||
|
} else {
|
||||||
|
ui->droppedLabel->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->fifoBar->setMaximum(report->getFifoSize());
|
||||||
|
ui->fifoBar->setValue(report->getFifoFilledCount());
|
||||||
|
ui->fifoBar->setToolTip(tr("FIFO fill %1/%2 bytes").arg(QString::number(report->getFifoFilledCount())).arg(QString::number(report->getFifoSize())));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui->streamStatusLabel->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
ui->streamStatusLabel->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->streamSampleRateText->setText(tr("%1kS").arg(QString::number(report->getSampleRate() / 1000.0f, 'f', 0)));
|
|
||||||
ui->streamLinkRateText->setText(tr("%1kB").arg(QString::number(report->getLinkRate() / 1000.0f, 'f', 0)));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ui->streamStatusLabel->setStyleSheet("QLabel { background-color : red; }");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -628,18 +628,68 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="streamSampleRateText">
|
<widget class="QLabel" name="underrunLabel">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>50</width>
|
<width>12</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Red if underruns</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background:rgb(79,79,79);</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>00000kS</string>
|
<string>U</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="overrunLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>12</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Red if overruns</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background:rgb(79,79,79);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>O</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="droppedLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>12</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Red if dropped packets</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background:rgb(79,79,79);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>D</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -647,18 +697,43 @@
|
|||||||
<widget class="QLabel" name="streamLinkRateText">
|
<widget class="QLabel" name="streamLinkRateText">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>50</width>
|
<width>90</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Stream link rate (MB/s)</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>00000kB</string>
|
<string>000.000 MB/s</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QProgressBar" name="fifoBar">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>15</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>8</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">border: 2px solid rgb(79, 79, 79);
|
||||||
|
text-align: center;</string>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_3">
|
<spacer name="horizontalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user