Browse Source

Update map API.

chirpmodem-v8.1.0
Jon Beniston 4 weeks ago
parent
commit
b48deee21c
  1. 14
      swagger/sdrangel/api/swagger/include/Map.yaml
  2. 66
      swagger/sdrangel/code/qt5/client/SWGMapSettings.cpp
  3. 18
      swagger/sdrangel/code/qt5/client/SWGMapSettings.h

14
swagger/sdrangel/api/swagger/include/Map.yaml

@ -54,6 +54,16 @@ MapSettings: @@ -54,6 +54,16 @@ MapSettings:
type: number
format: float
minimum: 0
distantLightIntensity:
description: Ambient light added to distant 3D models, so they are not dark silhouettes against a bright sky. 0 disables it.
type: number
format: float
minimum: 0
lowDetailModels:
description: Draw aircraft that are small on screen with their low detail model, where they have one (1 for yes, 0 for no).
type: integer
minimum: 0
maximum: 1
eciCamera:
description: Use an ECI rather than ECEF camera frame (1 for yes, 0 for no).
type: integer
@ -93,6 +103,10 @@ MapSettings: @@ -93,6 +103,10 @@ MapSettings:
description: Display the 3D map frame rate (1 for yes, 0 for no).
type: integer
minimum: 0
frameRate:
description: Frame rate to render the 3D map at, in frames per second. 0 to use the refresh rate of the display the map is on.
type: integer
minimum: 0
maximum: 1
displayMUF:
description: Display maximum-usable-frequency contours (1 for yes, 0 for no).

66
swagger/sdrangel/code/qt5/client/SWGMapSettings.cpp

@ -54,6 +54,10 @@ SWGMapSettings::SWGMapSettings() { @@ -54,6 +54,10 @@ SWGMapSettings::SWGMapSettings() {
m_sun_light_enabled_isSet = false;
light_intensity = 0.0f;
m_light_intensity_isSet = false;
distant_light_intensity = 0.0f;
m_distant_light_intensity_isSet = false;
low_detail_models = 0;
m_low_detail_models_isSet = false;
eci_camera = 0;
m_eci_camera_isSet = false;
fxaa = 0;
@ -70,6 +74,8 @@ SWGMapSettings::SWGMapSettings() { @@ -70,6 +74,8 @@ SWGMapSettings::SWGMapSettings() {
m_fog_isSet = false;
fps = 0;
m_fps_isSet = false;
frame_rate = 0;
m_frame_rate_isSet = false;
display_muf = 0;
m_display_muf_isSet = false;
displayfo_f2 = 0;
@ -156,6 +162,10 @@ SWGMapSettings::init() { @@ -156,6 +162,10 @@ SWGMapSettings::init() {
m_sun_light_enabled_isSet = false;
light_intensity = 0.0f;
m_light_intensity_isSet = false;
distant_light_intensity = 0.0f;
m_distant_light_intensity_isSet = false;
low_detail_models = 0;
m_low_detail_models_isSet = false;
eci_camera = 0;
m_eci_camera_isSet = false;
fxaa = 0;
@ -172,6 +182,8 @@ SWGMapSettings::init() { @@ -172,6 +182,8 @@ SWGMapSettings::init() {
m_fog_isSet = false;
fps = 0;
m_fps_isSet = false;
frame_rate = 0;
m_frame_rate_isSet = false;
display_muf = 0;
m_display_muf_isSet = false;
displayfo_f2 = 0;
@ -335,6 +347,10 @@ SWGMapSettings::fromJsonObject(QJsonObject &pJson) { @@ -335,6 +347,10 @@ SWGMapSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&sun_light_enabled, pJson["sunLightEnabled"], "qint32", "");
::SWGSDRangel::setValue(&light_intensity, pJson["lightIntensity"], "float", "");
::SWGSDRangel::setValue(&distant_light_intensity, pJson["distantLightIntensity"], "float", "");
::SWGSDRangel::setValue(&low_detail_models, pJson["lowDetailModels"], "qint32", "");
::SWGSDRangel::setValue(&eci_camera, pJson["eciCamera"], "qint32", "");
@ -352,6 +368,8 @@ SWGMapSettings::fromJsonObject(QJsonObject &pJson) { @@ -352,6 +368,8 @@ SWGMapSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&fps, pJson["fps"], "qint32", "");
::SWGSDRangel::setValue(&frame_rate, pJson["frameRate"], "qint32", "");
::SWGSDRangel::setValue(&display_muf, pJson["displayMUF"], "qint32", "");
::SWGSDRangel::setValue(&displayfo_f2, pJson["displayfoF2"], "qint32", "");
@ -459,6 +477,12 @@ SWGMapSettings::asJsonObject() { @@ -459,6 +477,12 @@ SWGMapSettings::asJsonObject() {
if(m_light_intensity_isSet){
obj->insert("lightIntensity", QJsonValue(light_intensity));
}
if(m_distant_light_intensity_isSet){
obj->insert("distantLightIntensity", QJsonValue(distant_light_intensity));
}
if(m_low_detail_models_isSet){
obj->insert("lowDetailModels", QJsonValue(low_detail_models));
}
if(m_eci_camera_isSet){
obj->insert("eciCamera", QJsonValue(eci_camera));
}
@ -483,6 +507,9 @@ SWGMapSettings::asJsonObject() { @@ -483,6 +507,9 @@ SWGMapSettings::asJsonObject() {
if(m_fps_isSet){
obj->insert("fps", QJsonValue(fps));
}
if(m_frame_rate_isSet){
obj->insert("frameRate", QJsonValue(frame_rate));
}
if(m_display_muf_isSet){
obj->insert("displayMUF", QJsonValue(display_muf));
}
@ -725,6 +752,26 @@ SWGMapSettings::setLightIntensity(float light_intensity) { @@ -725,6 +752,26 @@ SWGMapSettings::setLightIntensity(float light_intensity) {
this->m_light_intensity_isSet = true;
}
float
SWGMapSettings::getDistantLightIntensity() {
return distant_light_intensity;
}
void
SWGMapSettings::setDistantLightIntensity(float distant_light_intensity) {
this->distant_light_intensity = distant_light_intensity;
this->m_distant_light_intensity_isSet = true;
}
qint32
SWGMapSettings::getLowDetailModels() {
return low_detail_models;
}
void
SWGMapSettings::setLowDetailModels(qint32 low_detail_models) {
this->low_detail_models = low_detail_models;
this->m_low_detail_models_isSet = true;
}
qint32
SWGMapSettings::getEciCamera() {
return eci_camera;
@ -805,6 +852,16 @@ SWGMapSettings::setFps(qint32 fps) { @@ -805,6 +852,16 @@ SWGMapSettings::setFps(qint32 fps) {
this->m_fps_isSet = true;
}
qint32
SWGMapSettings::getFrameRate() {
return frame_rate;
}
void
SWGMapSettings::setFrameRate(qint32 frame_rate) {
this->frame_rate = frame_rate;
this->m_frame_rate_isSet = true;
}
qint32
SWGMapSettings::getDisplayMuf() {
return display_muf;
@ -1079,6 +1136,12 @@ SWGMapSettings::isSet(){ @@ -1079,6 +1136,12 @@ SWGMapSettings::isSet(){
if(m_light_intensity_isSet){
isObjectUpdated = true; break;
}
if(m_distant_light_intensity_isSet){
isObjectUpdated = true; break;
}
if(m_low_detail_models_isSet){
isObjectUpdated = true; break;
}
if(m_eci_camera_isSet){
isObjectUpdated = true; break;
}
@ -1103,6 +1166,9 @@ SWGMapSettings::isSet(){ @@ -1103,6 +1166,9 @@ SWGMapSettings::isSet(){
if(m_fps_isSet){
isObjectUpdated = true; break;
}
if(m_frame_rate_isSet){
isObjectUpdated = true; break;
}
if(m_display_muf_isSet){
isObjectUpdated = true; break;
}

18
swagger/sdrangel/code/qt5/client/SWGMapSettings.h

@ -82,6 +82,12 @@ public: @@ -82,6 +82,12 @@ public:
float getLightIntensity();
void setLightIntensity(float light_intensity);
float getDistantLightIntensity();
void setDistantLightIntensity(float distant_light_intensity);
qint32 getLowDetailModels();
void setLowDetailModels(qint32 low_detail_models);
qint32 getEciCamera();
void setEciCamera(qint32 eci_camera);
@ -106,6 +112,9 @@ public: @@ -106,6 +112,9 @@ public:
qint32 getFps();
void setFps(qint32 fps);
qint32 getFrameRate();
void setFrameRate(qint32 frame_rate);
qint32 getDisplayMuf();
void setDisplayMuf(qint32 display_muf);
@ -227,6 +236,12 @@ private: @@ -227,6 +236,12 @@ private:
float light_intensity;
bool m_light_intensity_isSet;
float distant_light_intensity;
bool m_distant_light_intensity_isSet;
qint32 low_detail_models;
bool m_low_detail_models_isSet;
qint32 eci_camera;
bool m_eci_camera_isSet;
@ -251,6 +266,9 @@ private: @@ -251,6 +266,9 @@ private:
qint32 fps;
bool m_fps_isSet;
qint32 frame_rate;
bool m_frame_rate_isSet;
qint32 display_muf;
bool m_display_muf_isSet;

Loading…
Cancel
Save