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

View File

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

View File

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

View File

@@ -34,12 +34,12 @@ namespace BlackCore
quint32 CSampleAtcStation::frequency() const quint32 CSampleAtcStation::frequency() const
{ {
return m_transceiver.frequency; return m_transceiver.frequencyHz;
} }
QString CSampleAtcStation::formattedFrequency() const 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 double CSampleAtcStation::radioDistanceM() const

View File

@@ -475,7 +475,7 @@ namespace BlackCore
const CAirlineIcaoCode &networkAirlineIcao, const QString &networkLiveryInfo, const QString &networkModelString, const CAirlineIcaoCode &networkAirlineIcao, const QString &networkLiveryInfo, const QString &networkModelString,
const CAircraftMatcherSetup &setup, const CAircraftModelList &modelSet, CAircraftModel::ModelType type, CStatusMessageList *log) const CAircraftMatcherSetup &setup, const CAircraftModelList &modelSet, CAircraftModel::ModelType type, CStatusMessageList *log)
{ {
Q_UNUSED(setup); Q_UNUSED(setup)
CLivery livery; CLivery livery;
livery.setAirlineIcaoCode(networkAirlineIcao); livery.setAirlineIcaoCode(networkAirlineIcao);

View File

@@ -25,6 +25,7 @@ namespace BlackMisc
namespace Audio namespace Audio
{ {
//! Value object for a voice setup //! Value object for a voice setup
//! \deprecated
class BLACKMISC_EXPORT CVoiceSetup : public CValueObject<CVoiceSetup> class BLACKMISC_EXPORT CVoiceSetup : public CValueObject<CVoiceSetup>
{ {
public: public:

View File

@@ -17,12 +17,12 @@ namespace BlackSound
{ {
if (count > m_tempBufferSize) if (count > m_tempBufferSize)
{ {
qDebug() << "Count too large for temp buffer"; qDebug() << "Count too large for temp buffer" << count;
return 0; return 0;
} }
qint64 availableSamples = m_resourceSound.audioData().size() - m_position; qint64 availableSamples = m_resourceSound.audioData().size() - m_position;
qint64 samplesToCopy = qMin(availableSamples, count); const qint64 samplesToCopy = qMin(availableSamples, count);
samples.clear(); samples.clear();
samples.fill(0, samplesToCopy); samples.fill(0, samplesToCopy);