Skip to content

Commit

Permalink
Add ensemble ID to service details
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbrechtL committed Oct 9, 2024
1 parent 33ab26b commit 6a1adf0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/welle-gui/QML/expertviews/ServiceDetails.qml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ ViewBaseFrame {
}
}

TextExpert {
name: qsTr("Ensemble ID") + ":"
text: "0x" + radioController.ensembleId.toString(16)
}

TextExpert {
name: qsTr("DAB date and time") + ":"
text: radioController.dateTime.toUTCString()
Expand Down
5 changes: 4 additions & 1 deletion src/welle-gui/radio_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ void CRadioController::setChannel(QString Channel, bool isScan, bool Force)
if (!isScan)
emit autoChannelChanged(autoChannel);
emit ensembleChanged();
emit ensembleIdChanged();
emit frequencyChanged();
}
}
Expand Down Expand Up @@ -654,6 +655,7 @@ void CRadioController::resetTechnicalData(void)
currentEId = 0;
currentEnsembleLabel = "";
emit ensembleChanged();
emit ensembleIdChanged();

currentFrequency = 0;
emit frequencyChanged();
Expand Down Expand Up @@ -730,12 +732,13 @@ bool CRadioController::deviceRestart()
*****************/
void CRadioController::ensembleId(quint16 eId)
{
qDebug() << "RadioController: ID of ensemble:" << eId;
qDebug() << "RadioController: ID of ensemble:" << Qt::hex << eId;

if (currentEId == eId)
return;

currentEId = eId;
emit ensembleIdChanged();

//auto label = radioReceiver->getEnsembleLabel();
//currentEnsembleLabel = QString::fromStdString(label.utf8_label());
Expand Down
2 changes: 2 additions & 0 deletions src/welle-gui/radio_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class CRadioController :
Q_PROPERTY(QStringList lastChannel MEMBER currentLastChannel NOTIFY lastChannelChanged)
Q_PROPERTY(QString autoChannel MEMBER autoChannel NOTIFY autoChannelChanged)
Q_PROPERTY(QString ensemble MEMBER currentEnsembleLabel NOTIFY ensembleChanged)
Q_PROPERTY(int ensembleId MEMBER currentEId NOTIFY ensembleIdChanged)
Q_PROPERTY(int frequency MEMBER currentFrequency NOTIFY frequencyChanged)
Q_PROPERTY(quint32 service MEMBER currentService NOTIFY stationChanged)
Q_PROPERTY(quint32 autoService MEMBER autoService NOTIFY autoServiceChanged)
Expand Down Expand Up @@ -290,6 +291,7 @@ private slots:
void lastChannelChanged();
void autoChannelChanged(QString autoChannel);
void ensembleChanged();
void ensembleIdChanged();
void frequencyChanged();
void stationChanged();
void autoServiceChanged(quint32 autoService);
Expand Down

0 comments on commit 6a1adf0

Please sign in to comment.