mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-06 07:07:48 -04:00
Add callsign to aircraft state
This commit is contained in:
parent
4627be2e50
commit
08537b5a5a
@ -9967,6 +9967,9 @@ margin-bottom: 20px;
|
|||||||
};
|
};
|
||||||
defs.MapAircraftState = {
|
defs.MapAircraftState = {
|
||||||
"properties" : {
|
"properties" : {
|
||||||
|
"callsign" : {
|
||||||
|
"type" : "string"
|
||||||
|
},
|
||||||
"aircraftType" : {
|
"aircraftType" : {
|
||||||
"type" : "string"
|
"type" : "string"
|
||||||
},
|
},
|
||||||
@ -59590,7 +59593,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2025-02-04T14:51:14.949+01:00
|
Generated 2025-02-04T16:59:42.434+01:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -230,6 +230,8 @@ MapCoordinate:
|
|||||||
MapAircraftState:
|
MapAircraftState:
|
||||||
description: "Aircraft state for PFD/ND"
|
description: "Aircraft state for PFD/ND"
|
||||||
properties:
|
properties:
|
||||||
|
callsign:
|
||||||
|
type: string
|
||||||
aircraftType:
|
aircraftType:
|
||||||
type: string
|
type: string
|
||||||
onSurface:
|
onSurface:
|
||||||
|
@ -230,6 +230,8 @@ MapCoordinate:
|
|||||||
MapAircraftState:
|
MapAircraftState:
|
||||||
description: "Aircraft state for PFD/ND"
|
description: "Aircraft state for PFD/ND"
|
||||||
properties:
|
properties:
|
||||||
|
callsign:
|
||||||
|
type: string
|
||||||
aircraftType:
|
aircraftType:
|
||||||
type: string
|
type: string
|
||||||
onSurface:
|
onSurface:
|
||||||
|
@ -9967,6 +9967,9 @@ margin-bottom: 20px;
|
|||||||
};
|
};
|
||||||
defs.MapAircraftState = {
|
defs.MapAircraftState = {
|
||||||
"properties" : {
|
"properties" : {
|
||||||
|
"callsign" : {
|
||||||
|
"type" : "string"
|
||||||
|
},
|
||||||
"aircraftType" : {
|
"aircraftType" : {
|
||||||
"type" : "string"
|
"type" : "string"
|
||||||
},
|
},
|
||||||
@ -59590,7 +59593,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2025-02-04T14:51:14.949+01:00
|
Generated 2025-02-04T16:59:42.434+01:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,6 +28,8 @@ SWGMapAircraftState::SWGMapAircraftState(QString* json) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SWGMapAircraftState::SWGMapAircraftState() {
|
SWGMapAircraftState::SWGMapAircraftState() {
|
||||||
|
callsign = nullptr;
|
||||||
|
m_callsign_isSet = false;
|
||||||
aircraft_type = nullptr;
|
aircraft_type = nullptr;
|
||||||
m_aircraft_type_isSet = false;
|
m_aircraft_type_isSet = false;
|
||||||
on_surface = 0;
|
on_surface = 0;
|
||||||
@ -84,6 +86,8 @@ SWGMapAircraftState::~SWGMapAircraftState() {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGMapAircraftState::init() {
|
SWGMapAircraftState::init() {
|
||||||
|
callsign = new QString("");
|
||||||
|
m_callsign_isSet = false;
|
||||||
aircraft_type = new QString("");
|
aircraft_type = new QString("");
|
||||||
m_aircraft_type_isSet = false;
|
m_aircraft_type_isSet = false;
|
||||||
on_surface = 0;
|
on_surface = 0;
|
||||||
@ -136,6 +140,9 @@ SWGMapAircraftState::init() {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGMapAircraftState::cleanup() {
|
SWGMapAircraftState::cleanup() {
|
||||||
|
if(callsign != nullptr) {
|
||||||
|
delete callsign;
|
||||||
|
}
|
||||||
if(aircraft_type != nullptr) {
|
if(aircraft_type != nullptr) {
|
||||||
delete aircraft_type;
|
delete aircraft_type;
|
||||||
}
|
}
|
||||||
@ -181,6 +188,8 @@ SWGMapAircraftState::fromJson(QString &json) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
SWGMapAircraftState::fromJsonObject(QJsonObject &pJson) {
|
SWGMapAircraftState::fromJsonObject(QJsonObject &pJson) {
|
||||||
|
::SWGSDRangel::setValue(&callsign, pJson["callsign"], "QString", "QString");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&aircraft_type, pJson["aircraftType"], "QString", "QString");
|
::SWGSDRangel::setValue(&aircraft_type, pJson["aircraftType"], "QString", "QString");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&on_surface, pJson["onSurface"], "qint32", "");
|
::SWGSDRangel::setValue(&on_surface, pJson["onSurface"], "qint32", "");
|
||||||
@ -245,6 +254,9 @@ SWGMapAircraftState::asJson ()
|
|||||||
QJsonObject*
|
QJsonObject*
|
||||||
SWGMapAircraftState::asJsonObject() {
|
SWGMapAircraftState::asJsonObject() {
|
||||||
QJsonObject* obj = new QJsonObject();
|
QJsonObject* obj = new QJsonObject();
|
||||||
|
if(callsign != nullptr && *callsign != QString("")){
|
||||||
|
toJsonValue(QString("callsign"), callsign, obj, QString("QString"));
|
||||||
|
}
|
||||||
if(aircraft_type != nullptr && *aircraft_type != QString("")){
|
if(aircraft_type != nullptr && *aircraft_type != QString("")){
|
||||||
toJsonValue(QString("aircraftType"), aircraft_type, obj, QString("QString"));
|
toJsonValue(QString("aircraftType"), aircraft_type, obj, QString("QString"));
|
||||||
}
|
}
|
||||||
@ -321,6 +333,16 @@ SWGMapAircraftState::asJsonObject() {
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString*
|
||||||
|
SWGMapAircraftState::getCallsign() {
|
||||||
|
return callsign;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGMapAircraftState::setCallsign(QString* callsign) {
|
||||||
|
this->callsign = callsign;
|
||||||
|
this->m_callsign_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGMapAircraftState::getAircraftType() {
|
SWGMapAircraftState::getAircraftType() {
|
||||||
return aircraft_type;
|
return aircraft_type;
|
||||||
@ -566,6 +588,9 @@ bool
|
|||||||
SWGMapAircraftState::isSet(){
|
SWGMapAircraftState::isSet(){
|
||||||
bool isObjectUpdated = false;
|
bool isObjectUpdated = false;
|
||||||
do{
|
do{
|
||||||
|
if(callsign && *callsign != QString("")){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
if(aircraft_type && *aircraft_type != QString("")){
|
if(aircraft_type && *aircraft_type != QString("")){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,9 @@ public:
|
|||||||
virtual void fromJsonObject(QJsonObject &json) override;
|
virtual void fromJsonObject(QJsonObject &json) override;
|
||||||
virtual SWGMapAircraftState* fromJson(QString &jsonString) override;
|
virtual SWGMapAircraftState* fromJson(QString &jsonString) override;
|
||||||
|
|
||||||
|
QString* getCallsign();
|
||||||
|
void setCallsign(QString* callsign);
|
||||||
|
|
||||||
QString* getAircraftType();
|
QString* getAircraftType();
|
||||||
void setAircraftType(QString* aircraft_type);
|
void setAircraftType(QString* aircraft_type);
|
||||||
|
|
||||||
@ -118,6 +121,9 @@ public:
|
|||||||
virtual bool isSet() override;
|
virtual bool isSet() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
QString* callsign;
|
||||||
|
bool m_callsign_isSet;
|
||||||
|
|
||||||
QString* aircraft_type;
|
QString* aircraft_type;
|
||||||
bool m_aircraft_type_isSet;
|
bool m_aircraft_type_isSet;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user