mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Ref T730, style
This commit is contained in:
committed by
Mat Sutcliffe
parent
6071e77b7f
commit
2fed1e7e99
@@ -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:
|
||||
|
||||
@@ -160,7 +160,7 @@ namespace BlackCore
|
||||
|
||||
if (it)
|
||||
{
|
||||
(*it)->setFrequency(radioTransceiver.frequency);
|
||||
(*it)->setFrequency(radioTransceiver.frequencyHz);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -475,7 +475,7 @@ namespace BlackCore
|
||||
const CAirlineIcaoCode &networkAirlineIcao, const QString &networkLiveryInfo, const QString &networkModelString,
|
||||
const CAircraftMatcherSetup &setup, const CAircraftModelList &modelSet, CAircraftModel::ModelType type, CStatusMessageList *log)
|
||||
{
|
||||
Q_UNUSED(setup);
|
||||
Q_UNUSED(setup)
|
||||
|
||||
CLivery livery;
|
||||
livery.setAirlineIcaoCode(networkAirlineIcao);
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace BlackMisc
|
||||
namespace Audio
|
||||
{
|
||||
//! Value object for a voice setup
|
||||
//! \deprecated
|
||||
class BLACKMISC_EXPORT CVoiceSetup : public CValueObject<CVoiceSetup>
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -17,12 +17,12 @@ namespace BlackSound
|
||||
{
|
||||
if (count > m_tempBufferSize)
|
||||
{
|
||||
qDebug() << "Count too large for temp buffer";
|
||||
qDebug() << "Count too large for temp buffer" << count;
|
||||
return 0;
|
||||
}
|
||||
qint64 availableSamples = m_resourceSound.audioData().size() - m_position;
|
||||
|
||||
qint64 samplesToCopy = qMin(availableSamples, count);
|
||||
const qint64 samplesToCopy = qMin(availableSamples, count);
|
||||
samples.clear();
|
||||
samples.fill(0, samplesToCopy);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user