1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

REST API: updates for MIMO (4)

This commit is contained in:
f4exb
2019-12-24 19:08:11 +01:00
parent 6855602a7f
commit d11f56adb9
16 changed files with 799 additions and 41 deletions
+29 -12
View File
@@ -531,31 +531,48 @@ bool TestMI::applySettings(const TestMISettings& settings, bool force)
}
int TestMI::webapiRunGet(
int subsystemIndex,
SWGSDRangel::SWGDeviceState& response,
QString& errorMessage)
{
(void) errorMessage;
m_deviceAPI->getDeviceEngineStateStr(*response.getState());
return 200;
if (subsystemIndex == 0)
{
m_deviceAPI->getDeviceEngineStateStr(*response.getState()); // Rx only
return 200;
}
else
{
errorMessage = QString("Subsystem index invalid: expect 0 (Rx) only");
return 404;
}
}
int TestMI::webapiRun(
bool run,
int subsystemIndex,
SWGSDRangel::SWGDeviceState& response,
QString& errorMessage)
{
(void) errorMessage;
m_deviceAPI->getDeviceEngineStateStr(*response.getState());
MsgStartStop *message = MsgStartStop::create(run);
m_inputMessageQueue.push(message);
if (m_guiMessageQueue) // forward to GUI if any
if (subsystemIndex == 0)
{
MsgStartStop *msgToGUI = MsgStartStop::create(run);
m_guiMessageQueue->push(msgToGUI);
m_deviceAPI->getDeviceEngineStateStr(*response.getState()); // Rx only
MsgStartStop *message = MsgStartStop::create(run);
m_inputMessageQueue.push(message);
if (m_guiMessageQueue) // forward to GUI if any
{
MsgStartStop *msgToGUI = MsgStartStop::create(run);
m_guiMessageQueue->push(msgToGUI);
}
return 200;
}
else
{
errorMessage = QString("Subsystem index invalid: expect 0 (Rx) only");
return 404;
}
return 200;
}
int TestMI::webapiSettingsGet(