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

@@ -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();