Ref T730, style

This commit is contained in:
Klaus Basan
2019-09-25 17:25:33 +02:00
committed by Mat Sutcliffe
parent 6071e77b7f
commit 2fed1e7e99
7 changed files with 18 additions and 10 deletions

View File

@@ -35,7 +35,10 @@ namespace BlackCore
//! Inout buffer
CAudioInputBuffer(QObject *parent = nullptr);
//! Start
void start();
//! Stop
void stop();
//! \copydoc QIODevice::readData
@@ -49,6 +52,7 @@ namespace BlackCore
void frameAvailable(const QByteArray &frame);
protected:
//! \copydoc QIODevice::timerEvent
void timerEvent(QTimerEvent *event) override;
private:
@@ -92,7 +96,10 @@ namespace BlackCore
void stop();
signals:
//! Volume stream data
void inputVolumeStream(const InputVolumeStreamArgs &args);
//! OPUS data
void opusDataAvailable(const OpusDataAvailableArgs &args);
private:

View File

@@ -160,7 +160,7 @@ namespace BlackCore
if (it)
{
(*it)->setFrequency(radioTransceiver.frequency);
(*it)->setFrequency(radioTransceiver.frequencyHz);
}
}

View File

@@ -122,20 +122,20 @@ namespace BlackCore
{
//! Properties @{
quint16 id;
quint32 frequency;
quint32 frequencyHz;
double LatDeg = 0.0;
double LonDeg = 0.0;
double HeightMslM = 0.0;
double HeightAglM = 0.0;
//! @}
MSGPACK_DEFINE(id, frequency, LatDeg, LonDeg, HeightMslM, HeightAglM)
MSGPACK_DEFINE(id, frequencyHz, LatDeg, LonDeg, HeightMslM, HeightAglM)
//! To JSON
QJsonObject toJson() const
{
QJsonObject json;
json["ID"] = id;
json["Frequency"] = static_cast<int>(frequency);
json["Frequency"] = static_cast<int>(frequencyHz);
json["LatDeg"] = LatDeg;
json["LonDeg"] = LonDeg;
json["HeightMslM"] = HeightMslM;
@@ -148,7 +148,7 @@ namespace BlackCore
{
TransceiverDto dto;
dto.id = static_cast<quint16>(json.value("id").toInt());
dto.frequency = static_cast<quint32>(json.value("frequency").toInt());
dto.frequencyHz = static_cast<quint32>(json.value("frequency").toInt());
dto.LatDeg = json.value("latDeg").toDouble();
dto.LonDeg = json.value("lonDeg").toDouble();
dto.HeightMslM = json.value("heightMslM").toDouble();

View File

@@ -34,12 +34,12 @@ namespace BlackCore
quint32 CSampleAtcStation::frequency() const
{
return m_transceiver.frequency;
return m_transceiver.frequencyHz;
}
QString CSampleAtcStation::formattedFrequency() const
{
return QString::number(m_transceiver.frequency / 1000000.0, 'f', 3);
return QString::number(m_transceiver.frequencyHz / 1000000.0, 'f', 3);
}
double CSampleAtcStation::radioDistanceM() const