|
|
|
|
@ -27,6 +27,7 @@
@@ -27,6 +27,7 @@
|
|
|
|
|
#include "SWGLoggingInfo.h" |
|
|
|
|
#include "SWGAudioDevices.h" |
|
|
|
|
#include "SWGAudioDevicesSelect.h" |
|
|
|
|
#include "SWGLocationInformation.h" |
|
|
|
|
#include "SWGErrorResponse.h" |
|
|
|
|
|
|
|
|
|
#include "maincore.h" |
|
|
|
|
@ -261,6 +262,35 @@ int WebAPIAdapterSrv::instanceAudioPatch(
@@ -261,6 +262,35 @@ int WebAPIAdapterSrv::instanceAudioPatch(
|
|
|
|
|
return 200; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int WebAPIAdapterSrv::instanceLocationGet( |
|
|
|
|
SWGSDRangel::SWGLocationInformation& response, |
|
|
|
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) |
|
|
|
|
{ |
|
|
|
|
response.setLatitude(m_mainCore.m_settings.getLatitude()); |
|
|
|
|
response.setLongitude(m_mainCore.m_settings.getLongitude()); |
|
|
|
|
|
|
|
|
|
return 200; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int WebAPIAdapterSrv::instanceLocationPut( |
|
|
|
|
SWGSDRangel::SWGLocationInformation& response, |
|
|
|
|
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) |
|
|
|
|
{ |
|
|
|
|
float latitude = response.getLatitude(); |
|
|
|
|
float longitude = response.getLongitude(); |
|
|
|
|
|
|
|
|
|
latitude = latitude < -90.0 ? -90.0 : latitude > 90.0 ? 90.0 : latitude; |
|
|
|
|
longitude = longitude < -180.0 ? -180.0 : longitude > 180.0 ? 180.0 : longitude; |
|
|
|
|
|
|
|
|
|
m_mainCore.m_settings.setLatitude(latitude); |
|
|
|
|
m_mainCore.m_settings.setLongitude(longitude); |
|
|
|
|
|
|
|
|
|
response.setLatitude(m_mainCore.m_settings.getLatitude()); |
|
|
|
|
response.setLongitude(m_mainCore.m_settings.getLongitude()); |
|
|
|
|
|
|
|
|
|
return 200; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void WebAPIAdapterSrv::getDeviceSetList(SWGSDRangel::SWGDeviceSetList* deviceSetList) |
|
|
|
|
{ |
|
|
|
|
deviceSetList->init(); |
|
|
|
|
|