1
0
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:
srcejon 2025-02-04 16:00:04 +00:00
parent 4627be2e50
commit 08537b5a5a
6 changed files with 43 additions and 2 deletions

View File

@ -9967,6 +9967,9 @@ margin-bottom: 20px;
};
defs.MapAircraftState = {
"properties" : {
"callsign" : {
"type" : "string"
},
"aircraftType" : {
"type" : "string"
},
@ -59590,7 +59593,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2025-02-04T14:51:14.949+01:00
Generated 2025-02-04T16:59:42.434+01:00
</div>
</div>
</div>

View File

@ -230,6 +230,8 @@ MapCoordinate:
MapAircraftState:
description: "Aircraft state for PFD/ND"
properties:
callsign:
type: string
aircraftType:
type: string
onSurface:

View File

@ -230,6 +230,8 @@ MapCoordinate:
MapAircraftState:
description: "Aircraft state for PFD/ND"
properties:
callsign:
type: string
aircraftType:
type: string
onSurface:

View File

@ -9967,6 +9967,9 @@ margin-bottom: 20px;
};
defs.MapAircraftState = {
"properties" : {
"callsign" : {
"type" : "string"
},
"aircraftType" : {
"type" : "string"
},
@ -59590,7 +59593,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2025-02-04T14:51:14.949+01:00
Generated 2025-02-04T16:59:42.434+01:00
</div>
</div>
</div>

View File

@ -28,6 +28,8 @@ SWGMapAircraftState::SWGMapAircraftState(QString* json) {
}
SWGMapAircraftState::SWGMapAircraftState() {
callsign = nullptr;
m_callsign_isSet = false;
aircraft_type = nullptr;
m_aircraft_type_isSet = false;
on_surface = 0;
@ -84,6 +86,8 @@ SWGMapAircraftState::~SWGMapAircraftState() {
void
SWGMapAircraftState::init() {
callsign = new QString("");
m_callsign_isSet = false;
aircraft_type = new QString("");
m_aircraft_type_isSet = false;
on_surface = 0;
@ -136,6 +140,9 @@ SWGMapAircraftState::init() {
void
SWGMapAircraftState::cleanup() {
if(callsign != nullptr) {
delete callsign;
}
if(aircraft_type != nullptr) {
delete aircraft_type;
}
@ -181,6 +188,8 @@ SWGMapAircraftState::fromJson(QString &json) {
void
SWGMapAircraftState::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&callsign, pJson["callsign"], "QString", "QString");
::SWGSDRangel::setValue(&aircraft_type, pJson["aircraftType"], "QString", "QString");
::SWGSDRangel::setValue(&on_surface, pJson["onSurface"], "qint32", "");
@ -245,6 +254,9 @@ SWGMapAircraftState::asJson ()
QJsonObject*
SWGMapAircraftState::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(callsign != nullptr && *callsign != QString("")){
toJsonValue(QString("callsign"), callsign, obj, QString("QString"));
}
if(aircraft_type != nullptr && *aircraft_type != QString("")){
toJsonValue(QString("aircraftType"), aircraft_type, obj, QString("QString"));
}
@ -321,6 +333,16 @@ SWGMapAircraftState::asJsonObject() {
return obj;
}
QString*
SWGMapAircraftState::getCallsign() {
return callsign;
}
void
SWGMapAircraftState::setCallsign(QString* callsign) {
this->callsign = callsign;
this->m_callsign_isSet = true;
}
QString*
SWGMapAircraftState::getAircraftType() {
return aircraft_type;
@ -566,6 +588,9 @@ bool
SWGMapAircraftState::isSet(){
bool isObjectUpdated = false;
do{
if(callsign && *callsign != QString("")){
isObjectUpdated = true; break;
}
if(aircraft_type && *aircraft_type != QString("")){
isObjectUpdated = true; break;
}

View File

@ -42,6 +42,9 @@ public:
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGMapAircraftState* fromJson(QString &jsonString) override;
QString* getCallsign();
void setCallsign(QString* callsign);
QString* getAircraftType();
void setAircraftType(QString* aircraft_type);
@ -118,6 +121,9 @@ public:
virtual bool isSet() override;
private:
QString* callsign;
bool m_callsign_isSet;
QString* aircraft_type;
bool m_aircraft_type_isSet;