mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-07 08:24:43 -04:00
LimeRFE USB support: REST API fixes
This commit is contained in:
@@ -894,7 +894,7 @@ int WebAPIAdapterSrv::instanceLimeRFEConfigGet(
|
||||
|
||||
int WebAPIAdapterSrv::instanceLimeRFEConfigPut(
|
||||
SWGSDRangel::SWGLimeRFESettings& query,
|
||||
SWGSDRangel::SWGLimeRFESettings& response,
|
||||
SWGSDRangel::SWGSuccessResponse& response,
|
||||
SWGSDRangel::SWGErrorResponse& error)
|
||||
{
|
||||
LimeRFEController controller;
|
||||
@@ -914,6 +914,7 @@ int WebAPIAdapterSrv::instanceLimeRFEConfigPut(
|
||||
settings.m_rxHAMChannel = (LimeRFEController::HAMChannel) query.getRxHamChannel();
|
||||
settings.m_rxCellularChannel = (LimeRFEController::CellularChannel) query.getRxCellularChannel();
|
||||
settings.m_rxPort = (LimeRFEController::RxPort) query.getRxPort();
|
||||
settings.m_rxOn = query.getRxOn() != 0;
|
||||
settings.m_amfmNotch = query.getAmfmNotch() != 0;
|
||||
settings.m_attenuationFactor = query.getAttenuationFactor();
|
||||
settings.m_txChannels = (LimeRFEController::ChannelGroups) query.getTxChannels();
|
||||
@@ -921,14 +922,12 @@ int WebAPIAdapterSrv::instanceLimeRFEConfigPut(
|
||||
settings.m_txHAMChannel = (LimeRFEController::HAMChannel) query.getTxHamChannel();
|
||||
settings.m_txCellularChannel = (LimeRFEController::CellularChannel) query.getTxCellularChannel();
|
||||
settings.m_txPort = (LimeRFEController::TxPort) query.getTxPort();
|
||||
settings.m_txOn = query.getTxOn() != 0;
|
||||
|
||||
controller.settingsToState(settings);
|
||||
|
||||
rc = controller.configure();
|
||||
|
||||
response.init();
|
||||
response = query;
|
||||
|
||||
if (rc != 0)
|
||||
{
|
||||
error.init();
|
||||
@@ -937,6 +936,8 @@ int WebAPIAdapterSrv::instanceLimeRFEConfigPut(
|
||||
return 500;
|
||||
}
|
||||
|
||||
response.init();
|
||||
*response.getMessage() = QString("LimeRFE device at %1 configuration updated successfully").arg(*query.getDevicePath());
|
||||
return 200;
|
||||
}
|
||||
|
||||
@@ -971,6 +972,7 @@ int WebAPIAdapterSrv::instanceLimeRFERunPut(
|
||||
}
|
||||
|
||||
response.init();
|
||||
*response.getMessage() = QString("LimeRFE device at %1 mode updated successfully").arg(*query.getDevicePath());
|
||||
return 200;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user